First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

This post is a mile high overview of the history of ASP.NET MVC, the features it brought with the various versions and the extensibility points introduced.

I am starting to work on both a series of webcasts and articles and I was doing some preparatory work, collecting information on the various features and extensibility points that got into the various (official) releases of ASP.NET MVC, so I thought it could have been useful to share my little summary.

There have been 3 major official releases, and 1 small tool update.

ASP.NET MVC 1.0

The first official release, dated MIX 2009, brought all the core features of the framework, which made their way through the years till today:

  • Obviously, the MVC concept, with the streamlined processing pipeline and the separation of the processing of the request (in the Controller) and the rendering of the output (in the View)
  • The concept of routing (then made into the official framework)
  • Lightweight helpers for rendering HTML tags
  • Ajax helpers to easily ajaxify links and forms
  • Automatic binding of posted forms to .NET objects and a kind of model validation

This was a huge step toward a new web, but the first release needed a bit too much of infrastructural development in order to be productive in enterprise scenarios and in big applications. Luckily ASP.NET MVC was the first Microsoft product to really be extensible. Most of the core components could be extended or even totally replaced with your own implementation: for example, Dependency Injection was not supported, so you had to developed your own custom controller factory to create controllers based on a IoC container. Also there was no default model implementation in ASP.NET and people expecting something like RoR were a bit disappointed.

ASP.NET MVC v2

The following year, same timeframe (MIX 2010), the second version of the framework came out. The theme of this update was enhancing productivity and making maintenance easier in bigger applications:

  • Model validation based on attributes, both server and client side
  • Areas to partition bigger applications
  • Html Templated helpers, to automatically render edit forms and display pages based on the model and attributes applied on it
  • Asynchronous Controllers
  • Lambda based Html Helpers to remove most of the "magic strings" previously needed in html helpers

In this version a few other extensibility were introduced in addition to the ones already available in ASP.NET MVC 1.0:

  • Model Metadata Provider and ModelValidationProvider
  • Validation Attributes and validation logic
  • Custom templates

The inclusion of the model validation and display attributes was also a first step toward some kind of support for a default model inside ASP.NET MVC.

ASP.NET MVC 3

At the beginning of the year, less than a year after the previous version, version 3 was released, together with a bunch of other pretty interesting tools, like NuGet, IIS Express and SQL Server Express.

The new features introduced with this latest version:

  • Works only on .NET4
  • Unobtrusive javascript validation and general better javascript love
  • Remote validation
  • Dependency Resolver
  • The new Razor view engine
  • Global Filters

In the context of extensibility, a few more were introduced:

  • Service Locator
  • Dependency Resolver
  • Filter Provider
  • IValidatableObject

Additionally, a new "New Project" dialog that allows you to choose different project templates as base for your ASP.NET MVC 3 application was introduced. It includes the usual template (with user management and login pages) but is open for including other project templates very easily.

ASP.NET MVC Tool Update

Finally, as tradition, they released something also at MIX 2011: no changes to the library itself, but just an upgrade to the tooling around MVC:

  • They integrated the great MvcScaffolding into Visual Studio, to easily create controllers and CRUD views based on the model
  • Libraries included by default (jQuery, jQuery UI and modernizer for example) are included as NuGet packages so that they can be easily upgraded
  • Entity Framework CodeFirst is included as default data access library in the default project template
  • The default template is HTML5 enabled (if a checkbox is selected, views will have the semantic HTML5 tags)

With this last update ASP.NET MVC finally had a default implementation of the M part of the pattern: Entity Framework CodeFirst with automatic creation of the DB schema, attributes for data validation and editing, and scaffolding for the automatic generation of CRUD actions and views.

How mature is ASP.NET MVC?

The first bits of ASP.NET MVC were introduced in October 2007, at the first ALT.NET Conference by Scott Guthrie, and it then took almost 2 year to reach the stability need for the first release. In total we can say that ASP.NET MVC is being used by the general public since almost 4 years: that’s a pretty long time.

I hope you found this little excursus useful and if you think I missed anything important, please don’t hesitate to add a comment.

Tags:
posted on Wednesday, June 29, 2011 5:49 PM

Comments on this entry:

# re: The history of ASP.NET MVC, so far

Left by Justin at 6/29/2011 7:36 PM

I was really happy when I was able to start using MVC at work. The only issue I have with it is the fast pace that the releases seem to be coming in. For most people that are always starting new apps I guess this is not an issue but for me we have 2 or 3 flagship apps that have evolved over the last 6 or 7 years and it is painful keeping up with the latest version. We are currently transitioning to Windows Server 2008 and I have the code moved to MVC 2. I'll probably wait for MVC 4 and skip 3.

# re: The history of ASP.NET MVC, so far

Left by Simone Chiaretta at 6/29/2011 11:39 PM

I don't think it's such a big issue: the main features were introduced in MVC 1.0
v2 and 3 only added some sugar on top of it: sure, sugar makes working on ASP.NET MVC sweeter, but the core is still the same.
I'd go to MVC3 directly, unless you have problem with moving to .NET 4

# re: The history of ASP.NET MVC, so far

Left by Justin at 6/30/2011 12:46 AM

Well currently we are still on Winsow Server 2003 and IIS6 so I am stuck with MVC 1. When we began planning our upgrade to Server 2008 I began upgrading the codebases to MVC as MVC was not out then.

Once the new server is launched I may see what it involves ot move to MVC 3. These are applications that were started in .NET 1.1 so it has been challenging to keep it up to date.

# re: The history of ASP.NET MVC, so far

Left by AlfeG at 6/30/2011 3:10 PM

Justin, why You can't use MVC 3 on 2003 server?
It's working like a sharm on mine.
And a few years ago moved a big project from 1.1 -> 3.5 -> 4.0 without any big problems

# re: The history of ASP.NET MVC, so far

Left by mezu at 7/2/2011 10:31 PM

@Justin

I have deployed a couple of MVC3 apps on Win2k3 running II6 and my apps are working fine.

# re: The history of ASP.NET MVC, so far

Left by uns at 7/4/2011 11:07 AM

Hi,
I agree with Justin. Not only MVC but for every microsoft product like .NET framework,Entity Framework,silverlight,wcf,wpf it has become a problem that there is newer version of each product one after the another.Many times we have to learn the older version and implement newer one or vice a versa.
Thanks.

# re: The history of ASP.NET MVC, so far

Left by Bartek at 7/4/2011 1:40 PM

Excellent article, and really puts MVC in perspective. I haven't made the jump yet, the few times I've tried I hit a pretty steep learning curve and decided to stick with webforms as I had limited time. Have since found out (and blogged) that many of the features in MVC will be ending up in Webforms anyway... http://bit.ly/dNhBd8

# re: The history of ASP.NET MVC, so far

Left by robini at 7/6/2011 3:12 PM

Features in MVC end up in webforms and vice versa, but that doesn't mean you should necessarily stick with webforms. The two are fundamentally different architectures and both have their place (i.e. advantages and disadvantages) but if you're building a large application then MVC is much easier for you and your team to maintain in the long run. The MVC learning curve can be steep, but it's also immensely enjoyable. Trust me - once you get used to it, you'll never want to go back to webforms!

# re: The history of ASP.NET MVC, so far

Left by Simone Chiaretta at 7/6/2011 3:19 PM

@Robini, @Bartek:
Yes, features from ASP.NET MVC gets into webforms, but I think that webforms is still a but too heavy-weight, it has its place, but for the kind of webapps I'm building, I still to find it :)
Not to mention Razor, which I thinks is still not an option in WebForms.

# re: The history of ASP.NET MVC, so far

Left by darshan at 7/6/2011 7:00 PM

nice article, saved my time... would love to go for MVC 3.0

# re: The history of ASP.NET MVC, so far

Left by Arthur Barreto at 7/6/2011 10:48 PM

very nice article!

# re: The history of ASP.NET MVC, so far

Left by Rais Hussain at 7/7/2011 11:25 AM

@Robini:

You are right. I got independence from ViewState, MVC Web Form reduces page size and loading time. ASP.NET MVC is very easy to understand as compare to ASP.NET Web Forms.

# re: The history of ASP.NET MVC, so far

Left by Ahsima at 7/18/2011 3:22 PM

Thanks for the asp.net mvc update. We are also updated with your information. Thanks

Ahsima

Comments have been closed on this topic.