Friday, 1 October 2010
For those of you that used to love Classic ASP and hated Web Forms, MVC 2 is the answer.
I attended a 2 day refresher course on ASP.Net MVC 2 presented by Stuart Leeks from Microsoft. I’ve read up on Model View Controller (MVC) and MVC 2 and gotten myself up to speed, but this was the first opportunity I had to really sit down and spend some quality time on this.
In Summary; MVC 2 gives the developer all the control back that Web Forms took away. This is both good and bad though. It’s good because developers can become creative again without spending their time trying to work around all the rigidity of web forms. It’s bad because with freedom comes responsibility.
Implementing MVC has to be done with a well-designed approach up front. If you don’t design a good structure and stick with it, or try to make it work by growing an application organically, you will end up with a rat’s nest of a mess.
The MVC pattern is really good and well supported by Microsoft Development tools. Both Visual Studio 2008 and Visual Studio 2010.
While VS 2010 comes with everything ready to go out of the box, you need to download and install the following updates to give you all the same functionality in VS 2008:
It is well worth a look and in my opinion developers will all breathe a sigh of relief once they get there heads around this. It should be noted that MVC 2 is not competing with Web Forms. A well designed and executed solution in both could be equally effective, performant and scalable, but in my humble opinion, it’s just more fun. You get to code again rather than trying to hammer Web Forms into submission.
Some thoughts though:
.