In this post we will discuss the tooling that is at our disposal and also some of the benefits or not so beneficial features it brings to the table.
- Benefits of using it
ASP.NET MVC is Microsoft's way of getting on the MVC wagon. It offers a lot more control over the application you're building, no more WebControls ( personally I never and hope to never have to use it ), pure XHTML as W3C would have you doing anyways.
At this moment, and I suspect for years to come, the market of web-apps is under the heavy influence of dynamic languages like Ruby, PHP, Groovy, Python etc. Although scripting languages, a couple of strong frameworks have arisen, from them the most important of all is Rails, a MVC framework that set the bar for all the frameworks to come, so to speak. The other contestants that I find worth mentioning are Joomla (PHP), Grails ( Groovy ), Pylons and Django (Python).
We, the .NET guys, needed something like that for a while, of course there was MonoRails for years, but it didn't get enough publicity. Now there is the Microsoft's solution ASP.NET MVC, and also another project from the OSS ( Open Source Space ) called FubuMVC, wich is an opinionated front-controller style framework. I'll talk about FubuMVC in another post though.
Next you have to go to File->New Project. And select from the Web category the Asp.NET MVC Web Application projec type.
Next you'll be displayed the following screen that let's you decide if you'll be using tests or not
For this part of the post it is not needed. Press ok and a sample project is created for you.
Let's have a look at the solution:
You can see that the content is organized in
Benefits of using it
For one you get a much richer experience since you have :
- Friendly URLS
- Easier testing of you workflow and services
- Better separation of concerns
- A powerfull architecture that allows you to even ditch the hole View-Engine and implement your own, or you could try Spark for a run.