ASPAlliance.com : The #1 Active Server Pages .NET Community The #1 ASP.NET Community
Search   Search

Subscribe   Subscribe

Powered by ORCSWeb Hosting


Site Stats


Powered By ASP.NET
 
Featured Sponsor

Featured Columnist


Featured Book
Professional ASP.NET
Professional ASP.NET

Find Prices
Read Review
Sample Chapter


New! asp.netPRO

We publish our articles in the standard RSS format.

Powerful .NET Email Component

Code Sharing Software

Introducing ASP.NET Web Matrix

When .NET was first introduced, there were precious few options for developing applications. During the beta, developers were forced to use simple text editors like Notepad in conjunction with the command line compiler. Later, Visual Studio .NET (VS.NET) was introduced and many of us who suffered through Visual Interdev thought our prayers for a complete Integrated Development Environment (IDE) were finally answered. VS.NET is a major step toward IDE nirvana but suffers from serious drawbacks, namely a few vexing bugs and cost. For example, VS.NET has the nasty habit of trashing your carefully laid out HTML pages under certain circumstances and wiping out content in others. In terms of cost, you can spend as much as $2500 for the Enterprise Architect version and even the stripped-down versions of VS.NET that are included with the stand alone VB.NET and C# products will set you back around $100.

Enter the Matrix. No, I'm not talking about Keanu Reeves' latest flick. ASP.NET Web Matrix is a new IDE designed for ASP.NET application development. It has a powerful WYSIWYG designer, support for databases and dozens of templates to help you with your ASP.NET projects. It's relatively small; the .msi file is only 1.2 MB compared to the whopping 1.8 GB download for VS.NET Enterprise Architect. Still, it shares many of the same capabilities of it's more powerful cousin. But perhaps the most important thing to note is it's price. It's free! This is truly a development environment that will bring ASP.NET to the masses! "But wait!" you say, "There's no such thing as a free lunch!" This is certainly true to some extent in this case. Web Matrix is missing what some will consider key features. You also won't be able to call Microsoft Tech Support to help you out of those inevitable binds at 4 a.m. ASP.NET Web Matrix is currently only supported on the new ASP.NET Forums. Those of you "in the know" recognize that this is not necessarily a bad thing as newsgroups are an excellent technical support resource albeit without the instant gratification of voice on the other end of the phone. That said, ASP.NET Web Matrix is still a major step forward for many developers.

So what can ASP.NET Web Matrix do? Well, first off, it has an excellent page designer that allows you to drag and drop HTML and ASP.NET server controls from a toolbox onto your page. You'll enjoy full access to the control's properties and events. As with VS.NET, server control event handlers are automatically "wired up" and you can even customize data grids right from the IDE. Best of all, when you switch from design mode to HTML View mode (and back, in my limited testing), Web Matrix doesn't appear to mess with your carefully laid out HTML! Those of you that have experienced the agony of losing or having VS.NET reformat markup will certainly appreciate this feature!

Web Matrix lets you test your pages without necessarily having an IIS web server set up. It comes with it's own built-in web server (the so-called ASP.NET Web Matrix Web Server). This should serve developers well when they need to bang out an application in short order. When you are ready to step up to IIS, you simply shut down the ASP.NET Web Matrix Web Server and rerun the page. Web Matrix will prompt you to establish a new IIS Virtual root directory! How cool is that? And when you are ready to deploy your application, you can upload your application via the built-in FTP capabilities. Good-bye FrontPage Extensions! You simply connect to your hosting provider (i.e. remote web server), transfer your files and disconnect. Very slick!

As with VS.NET, you can easily create ASP.NET pages, ASP.NET User Controls, HTML pages, XML Web Services, Classes, Style Sheets, Global.asax files, Web.Config files and plain old XML files. But they didn't stop there; they added templates for HTTP handlers, Mobile Pages, Output Caching, and several types of Data-driven pages. Sure, you could create many of these in VS.NET but it was never this easy. I especially like the new Data Report with Paging and Sorting and the Editable Data Grid Pages. At the very least, there was a lot of hand coding required to get paging to work correctly or get a truly usable editable grid. Of course, once you had it working, you could simply inherit from your grid class but inheritance still escapes many developers. Perhaps these templates will proliferate lots of duplicate code; only time will tell.

I kind of glossed over the database capabilities of Web Matrix but just about everything you need is there. You can connect to database servers, create new databases, add/modify/delete tables, create and edit stored procedures and generate ADO.NET code to access your data. Web Matrix includes a new feature called "Code Builders" that let you generate SELECT, INSERT, UPDATE and DELETE methods in your code. And unlike VS.NET, this is pretty nice code IMHO. VS.NET tends to produce volumes of highly generic code for accessing database data. In many ways, the Code Builders give you finer control and highly readable resulting code.

Community is another cool feature. Community gives you the capability to access online resources for Web Matrix and ASP.NET development without leaving the comfort of your IDE. The Community tab is located in the lower, right corner of the ASP.NET Web Matrix development environment and it pprovides you with easy access to forums, ASP.NET related web site links and will even let you store Windows Messenger contacts. If you've ever wanted browse through forums without having to open up a newsreader then you'll really like Community. You can even do it in your pajamas!

Okay, this almost sounds too good to be true right? So what do you lose if you switch from VS.NET to Web Matrix? First, you cannot compile from Web Matrix. You have to resort to the command line compiler for that. Second, there is no debugger. VS.NET has a huge advantage in this area. Third, Web Matrix does not automatically support the "code-behind" technique introduced by VS.NET. By default, it generates inline code and content instead. Fourth, there is no Visual SourceSafe integration. Last, for purposes of this introduction anyway, you lose Intellisense and it's statement completion, pop-up editing tips and class members lists. These may be serious detriments for VS.NET users. There are other features missing but these are my top five (or is that bottom five?)

In summary, ASP.NET Web Matrix looks very promising. As a community-supported tool, we can expect to see the application gather more capability as the community develops add-ins and the developers add feature in response to user requests. Should you switch to ASP.NET Web Matrix? As with most things, that depends on your circumstances. For VS.NET users, I expect to see Web Matrix used side-by-side with VS.NET. There is just too much to give up especially in terms of debugging. For those developers who don't have the cold hard cash to lay out for a full blown development environment, ASP.NET Web Matrix will likely be a welcome addition to their development tool kits.

For more information on ASP.NET Web Matrix, visit http://www.asp.net

That's all I know! Stay tuned for my upcoming "ASP.NET Web Matrix Tips and Tricks" articles. See ya then!

 Copyright © 2000-2003 ASPAlliance.com  Page Rendered at 12/3/2008 4:14:55 AM
 

Request Details

Session Id:mdlwdm55zevxfxuhcwn44dn3Request Type:GET
Time of Request:12/3/2008 4:14:54 AMStatus Code:200
Request Encoding:Unicode (UTF-8)Response Encoding:Unicode (UTF-8)

Trace Information

CategoryMessageFrom First(s)From Last(s)
aspx.pageBegin Init
aspx.pageEnd Init0.0001200.000120
aspx.pageBegin PreRender0.3914650.391345
aspx.pageEnd PreRender0.3915740.000109
aspx.pageBegin SaveViewState0.3920960.000522
aspx.pageEnd SaveViewState0.3921440.000048
aspx.pageBegin Render0.3921860.000043
aspx.pageEnd Render0.4010870.008901

Control Tree

Control IdTypeRender Size Bytes (including children)Viewstate Size Bytes (excluding children)
__PAGEASP.WebMatrix_aspx962710
    ASPAHeader1ASP.ASPAHeader_ascx874570
        ASPAHeader1:ucASPAHeaderSystem.Web.UI.WebControls.Literal874550
        ASPAHeader1:_ctl0System.Web.UI.LiteralControl20
    _ctl0System.Web.UI.ResourceBasedLiteralControl79280
    ASPAFooter1ASP.ASPAFooter_ascx8780
        ASPAFooter1:ucASPAFooterSystem.Web.UI.WebControls.Literal8760
        ASPAFooter1:_ctl0System.Web.UI.LiteralControl20
    _ctl1System.Web.UI.LiteralControl80

Cookies Collection

NameValueSize
ASP.NET_SessionIdmdlwdm55zevxfxuhcwn44dn342

Headers Collection

NameValue
Cache-Controlno-cache
Connectionclose
Pragmano-cache
AcceptAccept: application/xhtml+xml,text/html;q=0.9,text/plain;
Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encodinggzip
Accept-Languageen-us,en;q=0.5
Hostauthors.aspalliance.com
User-AgentCCBot/1.0 (+http://www.commoncrawl.org/bot.html)
X-Rewrite-URL/crickard/WebMatrix.aspx

Server Variables

NameValue
ALL_HTTPHTTP_CACHE_CONTROL:no-cache HTTP_CONNECTION:close HTTP_PRAGMA:no-cache HTTP_ACCEPT:Accept: application/xhtml+xml,text/html;q=0.9,text/plain; HTTP_ACCEPT_CHARSET:ISO-8859-1,utf-8;q=0.7,*;q=0.7 HTTP_ACCEPT_ENCODING:gzip HTTP_ACCEPT_LANGUAGE:en-us,en;q=0.5 HTTP_HOST:authors.aspalliance.com HTTP_USER_AGENT:CCBot/1.0 (+http://www.commoncrawl.org/bot.html) HTTP_X_REWRITE_URL:/crickard/WebMatrix.aspx
ALL_RAWCache-Control: no-cache Connection: close Pragma: no-cache Accept: Accept: application/xhtml+xml,text/html;q=0.9,text/plain; Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Encoding: gzip Accept-Language: en-us,en;q=0.5 Host: authors.aspalliance.com User-Agent: CCBot/1.0 (+http://www.commoncrawl.org/bot.html) X-Rewrite-URL: /crickard/WebMatrix.aspx
APPL_MD_PATH/LM/W3SVC/87257621/Root/crickard
APPL_PHYSICAL_PATHd:\domains\authors.aspalliance.com\crickard\
AUTH_TYPE 
AUTH_USER 
AUTH_PASSWORD 
LOGON_USER 
REMOTE_USER 
CERT_COOKIE 
CERT_FLAGS 
CERT_ISSUER 
CERT_KEYSIZE 
CERT_SECRETKEYSIZE 
CERT_SERIALNUMBER 
CERT_SERVER_ISSUER 
CERT_SERVER_SUBJECT 
CERT_SUBJECT 
CONTENT_LENGTH0
CONTENT_TYPE 
GATEWAY_INTERFACECGI/1.1
HTTPSoff
HTTPS_KEYSIZE 
HTTPS_SECRETKEYSIZE 
HTTPS_SERVER_ISSUER 
HTTPS_SERVER_SUBJECT 
INSTANCE_ID87257621
INSTANCE_META_PATH/LM/W3SVC/87257621
LOCAL_ADDR66.129.68.152
PATH_INFO/crickard/WebMatrix.aspx
PATH_TRANSLATEDd:\domains\authors.aspalliance.com\crickard\WebMatrix.aspx
QUERY_STRING 
REMOTE_ADDR38.103.63.60
REMOTE_HOST38.103.63.60
REMOTE_PORT47303
REQUEST_METHODGET
SCRIPT_NAME/crickard/WebMatrix.aspx
SERVER_NAMEauthors.aspalliance.com
SERVER_PORT80
SERVER_PORT_SECURE0
SERVER_PROTOCOLHTTP/1.1
SERVER_SOFTWAREMicrosoft-IIS/6.0
URL/crickard/WebMatrix.aspx
HTTP_CACHE_CONTROLno-cache
HTTP_CONNECTIONclose
HTTP_PRAGMAno-cache
HTTP_ACCEPTAccept: application/xhtml+xml,text/html;q=0.9,text/plain;
HTTP_ACCEPT_CHARSETISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODINGgzip
HTTP_ACCEPT_LANGUAGEen-us,en;q=0.5
HTTP_HOSTauthors.aspalliance.com
HTTP_USER_AGENTCCBot/1.0 (+http://www.commoncrawl.org/bot.html)
HTTP_X_REWRITE_URL/crickard/WebMatrix.aspx