The One Where I Say Something Nice About .NET

I’m working my way through  Pro ASP.NET MVC Framework, by Steven Sanderson, published by Apress. So far, I like it, for values of ‘it’ of both the book and the framework.

The book — well, the reviews on Amazon were glowing, and they’re basically right: clear prose style, ideas well expressed, and enough critique of other Microsoft technologies that you can tell it’s not a Microsoft Press title.

The framework … is interesting. It mostly abandons the ASP.NET model of server-side controls, postbacks, and viewstate in favor of plain HTML and CSS. (Though there are still advantages to using their HTML helper functions rather than coding up raw HTML yourself.) For pity’s sake, they even make jQuery available for your AJAX hacking pleasure.

What has always bothered me about “classic” ASP.NET was that it seemed to be an attempt to transplant the VB/WebForms style of development — drag-and-drop controls, a low-level event loop — onto the web. It’s a layer of abstraction over the web in an attempt to hide that fact that it is the web.

And it shows in terms of performance. Outside of low-latency intranets, the underlying architecture doesn’t support the chatty postback/viewstate implementation needed to emulate a desktop GUI event loop.

ASP.NET MVC, in contrast, feels like a web-native architecture. It’s designed around the strengths and limitations of HTTP, rather than fighting against it.

On top of that, it encourages the strong separation of concerns implied by ‘MVC’; it nudges the developer towards unit testing and test-driven development; and with the source code placed under an OSI-approved license, it represents a step by Microsoft into the world of Open Source.

All in all, I think ASP.NET MVC is quite cool.

Comments are closed.