ASP.NET MVC keeps all the good ASP.NET stuff like databinding, user controls etc... and add a pure Model-View-Controller pattern to your app. Mixed with Linq, and considering Unit Tests now come out of the box with VS 2008 Professional, you now have a web framework that's very similar to Ruby on Rails, with a much better IDE and the whole .Net framework to support it.
I'm building an app using the MVC framework, and I have to say I like it a lot. I was very familiar with webforms, custom web controls, ViewState and all that nice stuff. Quite powerful, yes. But now web UIs are getting more client-centric thanks to the rebirth of Javascript, all that server-side stuff is not necessary anymore. You really just want to serve a page, offer data services (SOAP/REST/whatever) and let javascript take care of the rest.
I've been very happy with the framework so far. The URL routing engine is nice, and the HTML helpers are great. Strong-typing and generic ViewData make views a breeze to put together.
There are only a few things I hope MS can put together before the release:
- Better AJAX support. I don't really care about UpdatePanels, but I'd like to be able to catch AJAX requests at the controller level and add ScriptManager instances to my controls without using a server form. Nikhil Kothari at Micrsofot worked on his own implementation. You check it out here.
- Ability to out views in generic http handlers (.ashx). Right now you can use pages and user controls. But whenever outputing content other than HTML (xml, JSON strings, images, binary data...), HTTP handlers are pretty handy.
- Ability to use sub-views. I'm not sure yet how that would work exactly, but right now if the page to render is pretty complex, your controller becomes responsible for too many parts of the page. A controller should be able to call sub-controllers, maybe linked to user controls... something like that.
If you're sick of the webform model but love .Net and Visual Studio, I'd strongly recommend you check this out. If you're familiar with other MVC frameworks, it'll look pretty familiar. If you're new to the idea, you'll finally learn what all the rage is about.
A new community preview should be released at Mix 08 next week. I'm looking forward to it.


0 comments:
Post a Comment