inset
Web Matrix Makes ASP.NET More Accessible
Jul. 8, 2002

Web Matrix, a new development tool for creating Web applications and services that run on ASP.NET, is designed to be easier for the casual Web developer to use than Visual Studio.NET, Microsoft’s flagship development tool. Microsoft's main goal with Web Matrix is to create a self-sustaining and supporting developer community around its ASP.NET Web server API, which is particularly important if the company is to regain the attention of developers who in recent years have been more attracted to competitors such as Linux, Apache, and Java. Developers considering Web Matrix should note that support is only available through the community Web site and not through Microsoft’s Product Support Services.

(For more a complete discussion of ASP.NET, see "ASP.NET Improves Development of Web Applications" on page 3 of the Jan. 2002 Update.)

Simplifies ASP.NET Development

Web Matrix, available now in a prerelease version, was designed to appeal to casual developers who are comfortable with HTML and some simple scripting. The new tool includes the core set of features necessary to build ASP.NET pages and customize those pages by writing code. Among these features are the following:

Graphical editor for ASP.NET pages. Web Matrix includes an editor for creating and editing ASP.NET pages. The editor allows developers to edit the page graphically (by dragging and dropping components and prewritten HTML) as well as by editing the underlying HTML.

Palette of controls. Web Matrix includes a palette of controls that can be placed on ASP.NET pages. Some of these controls are simple HTML elements, such as a button or a text box. Others represent more complex functionality, such as a calendar or a text field that validates its contents based on criteria supplied by the developer.

Ability to customize via VB or C#. Besides laying out the elements of an ASP.NET page, Web Matrix allows developers to add code to the page. When a developer double-clicks on a button control on a page, for example, Web Matrix brings up a simple editor in which the developer can write code in either the Visual Basic or C# language; ASP.NET will execute that code when the button is pressed by the user of the application.

Wizards for common coding tasks. Because many applications are likely to require similar coding tasks, Web Matrix includes a set of wizards (for some reason called "Code Builders" instead of wizards) that automate creating commonly used code. For example, the "Send E-Mail" wizard collects information from the developer, such as the name of the e-mail account, mail server, and so on, and then generates a code fragment that sends mail with those parameters.

Web server for testing and development. Web Matrix includes a standalone Web server that enables ASP.NET applications to run locally. Having a standalone Web server is particularly important for developers using Windows XP Home Edition, because that edition of Windows does not include Internet Information Services (IIS), Microsoft's Web server.

Encourages Community

In recent years, the attention of the developer community has moved away from Microsoft and its technologies (such as Windows) and toward technologies such as Linux, Apache, and Java. Microsoft sees recapturing the attention of that community as a critical step in establishing .NET as the dominant platform for creating and using Web services.

Web Matrix includes several features designed to connect users with one another and to foster a sense of community around ASP.NET. Microsoft has created a Web site focused on ASP.NET and Web Matrix with product documentation, sample code, and discussion forums frequented by members of the ASP.NET development team. In addition, developers can upload custom-created controls or services to the site, which then publishes a list of these components via a Web service. Developers using Web Matrix are able to query the Web service, locate new components written by other developers, and download these components without leaving the tool. Microsoft hopes this will encourage developers to share their components with one another and will help generate excitement around ASP.NET within the developer community.

Limitations vs. Visual Studio

Almost all the features of Web Matrix are also available in Visual Studio, Microsoft’s flagship development tool. (For a complete discussion of Visual Studio, see "Visual Studio.NET Launched" on page 16 in the Mar. 2002 Update.) However, Web Matrix was developed from scratch as an ASP.NET development tool and is not simply a stripped-down version of Visual Studio. Developers should be aware of the following key differences:

Web Matrix is significantly smaller. At a little over 1MB, Web Matrix was designed to be easily downloadable. Visual Studio, on the other hand, was never designed to be downloaded, and a typical installation of the Professional Edition is about 3.5GB.

No IntelliSense. Perhaps the most significant disadvantage of Web Matrix compared with Visual Studio is that while Web Matrix includes basic code-editing features, such as syntax coloring (where language elements are color-coded to improve readability), it lacks IntelliSense, which offers various options to complete a block of code after a developer has typed only part of that code. In many ways, IntelliSense serves as "on-the-fly documentation" because developers do not need to look up the names of data types and functions in order to use them. In particular, developers who are new to ASP.NET will find themselves resorting to online documentation much more often then they would if IntelliSense were included.

Inline code vs. code behind. Web Matrix and Visual Studio use different techniques for integrating the HTML of an ASP.NET page with the code that controls its behavior. Web Matrix uses a technique called "inline code," in which the application code is kept in the same file as the HTML, whereas Visual Studio uses a technique called "code behind," in which the HTML of the page and the programming code are stored in separate files. Inline code is generally simpler for developers who are already familiar with HTML and languages such as JavaScript, because it does not require them to maintain two files or to use tools such as compilers to build the code in the separate file. (ASP.NET automatically invokes the compilers for inline code included in an ASP.NET page.) The chief advantage of the code-behind model is that it allows developers who write code and designers who create a Web page's HTML to work relatively independently from one another without fear of accidentally modifying each other’s work. In addition, the different techniques used by Visual Studio.NET and Web Matrix mean that ASP.NET files created with one tool cannot be used in the graphical editor of the other. (For more information on the difference between inline code and code behind, see the illustration "Code Behind" on page 4 of the Jan. 2002 Update.)

No project system. One difference that developers will notice is that Web Matrix is file-based and lacks Visual Studio's project system, which allows developers to organize the pieces of an application in projects and then describe how projects relate to one another. The Visual Studio project system automates management of complex development projects (by keeping track of which files belong to which projects, for instance) but introduces considerable complexity, so the Web Matrix team decided to avoid it entirely. Instead of offering myriad project types as Visual Studio does (ranging from ASP.NET pages to Windows services), Web Matrix allows developers to build Web pages or Web services and save them as ordinary, standalone files and offers no built-in way of organizing those files.

No debugger. Web Matrix does not include an integrated debugger. Developers using the tool will need to resort to other means, such as writing to a log file or displaying extra messages on the screen, to locate bugs in their code.

Community-only support. Web Matrix will not be supported by the normal Product Support Services channel. Users will need to rely on the community Microsoft is helping to foster to answer technical questions and resolve problems with the tool. This lack of a formal support organization makes Web Matrix more suitable for exploratory development or for casual development than for production development by IT organizations or ISVs.

Availability and Resources

A "Technology Preview" of Web Matrix is currently available for download. Microsoft has not said whether a final version of the tool will be released and whether it will be updated over time. It is quite possible that Web Matrix is simply an interim tool until Microsoft can develop an edition of Visual Studio that can be easily downloaded and provide the simplicity and community-oriented features of Web Matrix.

The ASP.NET community site is at www.asp.net and Web Matrix can be downloaded from www.asp.net/Webmatrix/default.aspx?tabindex=4&tabid=46.

More information on Visual Studio can be found at msdn.microsoft.com/vstudio.