Tuesday, 6 July 2010
03:06 PM
By now you'll probably know that we released (in beta) a new version, I guess you'd call it, of ASP.NET. It's not really a new version -- same old ASP.NET behind the scenes -- just a new and simpler syntax on top of ASP.NET. There are various ways to think about this, like "MVC for the rest of us" or "ASP Classic done right" or, you know, many others. :-) The emphasis is on reducing the amount of code (indeed, the "concept count") required to do many of the things that people want to be able to do with websites.
I just love this stuff. The Web Forms model was predicated on the idea of making web development something like forms for Windows client apps -- the page is a form, you drop controls onto it, set their properties, and respond to their events. This basically worked, although as many people pointed out over the years, this type of client-forms analogy was a leaky abstraction. There's a certain black-box quality to the Web Forms model, and doing tricky stuff -- perhaps just adding controls on the fly -- tended to make it clear just how much man there was behind the curtain. Plus its 8+ years of development have left it with a certain amont of cruft; even internally we still see questions about how to do things with (e.g.) the DataGrid control.
ASP.NET MVC of course seeks to remove all this and, in a sense, get back to the basics of GET and POST, and instead of patching over them, embraces the realities of Web programming, like statelessness. The theory of MVC is lovely, but the implementation remains, at this point anyway, something that seems a bit ambitious as a candidate for Web Development 101.[1] (Likewise Ajax, which in spite of the elegance of libraries like jQuery, is still for the code junkie.)
And now there's Razor syntax. I said it earlier sort of jocularly, but in a sense it really is MVC for the rest of us. It has the purity of MVC -- the abstraction level is (comparatively) low (no "web controls"), it trucks openly with standard Web mechanics, it does not spill gallons of markup into your pages. Plus it offers a set of APIs that represent, to sound contradictory for a moment, thoughtful abstractions of functionality that is popular and, lest we forget, can sometimes be annoyingly complex to accomplish in "normal" ASP.NET, like database access or managing files. Plus it's completely backed by ASP.NET and beyond that, the .NET Framework in a -- and if I read this word much more I'm going to scream -- seamless way.
For years I've poked at redoing my blog app, through ASP.NET 2.0, Dynamic Data, and then MVC. This time, I might really do it.[2] :-)
Anyway, we did something a little different for the documentation this time around as well. More about that next time.
[categories]
aspnet, webmatrix
|
link
|