Search
Categories
Navigation
Twitter Updates

Twitter Updates

    follow me on Twitter
    « Are Your Controllers Playing Music? | Main | Custom Error Pages in ASP.NET MVC »
    Friday
    Sep042009

    So, You Want to Learn ASP.NET MVC?

    It’s true that some members of the .NET community may have already become bored with MVC 1.0, moving on to the preview release of MVC 2.0. The posts on Twitter, however, suggest that the vast majority of .NET developers are still coming to terms with the six-month old framework.

    If you’re one of those developers who has heard about MVC, but not yet spent much time digging in, this post will hopefully outline some options for how you can best get up-to-speed with the newest web framework in the .NET ecosystem.

    Large pile of books - Photo by: austinevan (Flickr)Books & Tutorials

    There are quite a few books and tutorials about MVC available, but I’ve found the following two to be the most beneficial.

    NerdDinner Tutorial

    • What it is: Published as part of Wrox’s Professional ASP.NET MVC 1.0, the NerdDinner tutorial remains the preeminent ASP.NET MVC tutorial, walking you through building a complete MVC application using LINQ to SQL.
    • Why it’s worth your time: It focuses on the bare essentials of the framework, only briefly touching on advanced topics like dependency injection and testability. While some have cited this as a limitation, it’s beneficial if you’re interested in quickly getting exposure to MVC and deciding if it’s worth further investigation. Best of all, it’s available free online in either PDF or HTML formats, which is good since the rest of the Wrox book is rather mediocre.
    • Who should check it out: If you’ve heard about MVC and you just want to see if it’s worth investigating, this is a great place to start. If you want to dive deep into dependency injection and holistic unit testing, alternative data access strategies or other more advanced topics related to MVC, the next option is a better fit.

    Pro ASP.NET MVC Framework by Steven Sanderson

    • What it is: Often cited as the best of the first wave of ASP.NET MVC books, Steven Sanderson’s Pro ASP.NET MVC Framework provides a deeper and more complete look at MVC.
    • Why it’s worth your time: It provides chapters introducing the MVC pattern, walks you through the SportsStore application tutorial and covers topics like dependency injection and unit testing more comprehensively than the Wrox book.
    • Who should check it out: If you enjoy learning about technologies through books, this is all but required reading. At 550 pages, it’s best for the developer who has dipped their toe in the MVC waters and decided that they definitely want to invest the time in gaining a solid understanding of the framework.

    MVC Sample Applications

    Bunny staring at a computer screen - Photo by: tm_lv (Flickr)Books and tutorials are a good approach to learning, but some people prefer to simply jump in and read some code. Here are a few MVC code-bases that can help you round out your understanding of the framework.

    • NerdDinner: The code from the Wrox book mentioned above.
    • SportsStore: The code from Steven Sanderson’s book, mentioned above.
    • Oxite: A blogging engine
    • MiniUrl: A link shortening application

    Further Resources & Advanced Topics

    If you’ve dug through some of the above resources and decided that MVC is something you’d like to start developing real applications in, the following resources and projects can help. Several of these items could be the topic for dozens of posts, so they’re mentioned here for awareness more than in-depth coverage.

    • ASP.NET MVC Cheat Sheets: These provide a handy overview of several key aspects of the framework; they’re great for when you’re getting started with actual development on the framework.
    • MvcContrib: An open-source project that provides several extensions to MVC as well as integrations with other frameworks (such as Inversion of Control and alternative view engines).
    • Spark View Engine: An alternative view engine for MVC (and MonoRail) that focuses on HTML syntax over the embedded C# syntax common in the default Web Forms engine.
    • Sharp Architecture: An architectural framework for building MVC applications with NHibernate. It also includes a Northwind sample application that’s worth taking a look at.

    Thin ice warning - Photo by: Robbie1 (Flickr)Common Issues

    As people dig in to ASP.NET MVC, a couple of common issues seem to crop up repeatedly. The following posts may help address these pitfalls.

    Wrapping Up

    While this is a lot of stuff to look through, picking a few of the resources should give you a taste of the framework, and allow you to decide if further investigation is warranted. MVC is a big change from Web Forms, so switching is likely to take some time. Hopefully the links above will let you quickly decide whether or not it’s worth the investment.

    PrintView Printer Friendly Version

    EmailEmail Article to Friend

    Reader Comments

    There are no comments for this journal entry. To create a new comment, use the form below.

    PostPost a New Comment

    Enter your information below to add a new comment.

    My response is on my own website »
    Author Email (optional):
    Author URL (optional):
    Post:
     
    Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>