A Guide to Learning ASP.NET MVC Beta 1

Now that ASP.NET MVC Beta 1 is out, how do you learn how to use it? How do you learn how to build ASP.NET MVC applications? Here are my recommendations.

The main website for all information related to ASP.NET MVC is located at:

http://www.ASP.net/mvc

This website contains a large number of videos, tutorials, and links to blogs and documentation. Here is how I would suggest navigating all of this material.

First, I would recommend watching the video Creating a Tasklist Application with ASP.NET MVC located at:

http://www.asp.net/learn/mvc-videos/video-395.aspx

In this 38 minute video, I walk through creating a very basic MVC application from start to finish. The sample application is nothing fancy. The goal of the video is to give you an overall sense of the different parts of an ASP.NET MVC application.

If you want to learn how to build a more complex application then I would recommend that you watch the series of Pair Programming videos that I created with Paul Litwin. In these videos, we build a Workout Log application. This is a simple database driven application that includes form validation. You can view this series of videos here:

http://www.asp.net/learn/mvc-videos/#MVCPairProgramming

If you are interested in watching a series of videos that really dive into the advanced features of building an ASP.NET MVC application, then I would suggest that you watch Rob Conery’s series of videos on building an e-commerce application:

http://www.asp.net/learn/mvc-videos/#MVCStorefrontStarterKit

Next, to get a better understanding of each of the different features of ASP.NET MVC, I would recommend that you take a look at the preview of the ASP.NET MVC Quickstarts. The Quickstarts provide you with basic documentation on each of the different features of the ASP.NET MVC framework:

http://quickstarts.asp.net/previews/mvc/

Next, take advantage of the ASP.NET MVC tutorials and videos located at:

http://www.ASP.net/mvc

The tutorials and videos are cross-linked. You can choose to either watch the video or read the corresponding tutorial. The written tutorials are available in both VB.NET and C#. Here’s a list of the current tutorials available at the www.ASP.net/mvc website:

Creating a Tasklist Application with ASP.NET MVC

Stephen Walther builds an entire ASP.NET MVC application from start to finish. This tutorial is a great introduction for people who are new to the ASP.NET MVC Framework and who want to get a sense of the process of building an ASP.NET MVC application.

Understanding Models, Views, and Controllers

Confused about Models, Views, and Controllers? In this tutorial, Stephen Walther introduces you to the different parts of an ASP.NET MVC application.

Understanding Controllers, Controller Actions, and Action Results

In this tutorial, Stephen Walther introduces you to ASP.NET MVC controllers. You learn how to create new controllers and return different types of action results.

Understanding Views, View Data, and HTML Helpers

What is an ASP.NET MVC View and how does it differ from a HTML page? In this tutorial, Stephen Walther introduces you to Views and demonstrates how you can take advantage of View Data and HTML Helpers within a View.

An Introduction to URL Routing

In this tutorial, Stephen Walther demonstrates how browser requests get mapped to controller actions through URL Routing. You also learn how to create a custom route that displays different blog entries depending on the date passed in a URL.

Preventing JavaScript Injection Attacks

Prevent JavaScript Injection Attacks and Cross-Site Scripting Attacks from happening to you. In this tutorial, Stephen Walther explains how you can easily defeat these types of attacks by HTML encoding your content.

Creating Unit Tests for ASP.NET MVC Applications

Learn how to create unit tests for controller actions. In this tutorial, Stephen Walther demonstrates how to test whether a controller action returns a particular view, returns a particular set of data, or returns a different type of action result.

Creating Custom HTML Helpers

Create new HTML Helpers to make it easier to generate view content. Stephen Walther demonstrates two simple methods of creating new HTML Helpers.

Creating Model Classes with LINQ to SQL

Learn how to create data access classes by taking advantage of Microsoft LINQ to SQL. In this video tutorial, you learn how to use a LINQ to SQL DataContext class directly within a controller. You also learn how to use the Repository Pattern to create testable and flexible database-driven applications.

Displaying a Table of Database Data

Need to display a set of database records in an MVC view? Learn two methods of displaying records in an HTML table. You learn how to perform all of the formatting inline. You also learn how to create a template with an MVC partial.

Using ASP.NET MVC with Different Versions of IIS

In this tutorial, you learn how to use ASP.NET MVC, and URL Routing, with different versions of Internet Information Services. You learn different strategies for using ASP.NET MVC with IIS 7.0 (classic mode), IIS 6.0, and earlier versions of IIS.

Creating Page Layouts with View Master Pages

By taking advantage of view master pages, you can create a common layout for the pages in your ASP.NET MVC application. In this tutorial, Stephen Walther introduces you to view master pages. You learn how to create a two-column page layout.

Passing Data to View Master Pages

In this tutorial, Stephen Walther explains how you can pass database data to a view master page. He demonstrates how to create an Application controller that modifies the view data returned by every controller action within an ASP.NET MVC application.

Understanding Action Filters

In this tutorial, you are introduced to action filters. You learn how action filters work and how to implement custom action filters. We create a custom action filter that logs the stages of processing a controller action and action result to the Visual Studio Output window.

Finally, there is a lot of really great ASP.NET MVC information in blogs. These are the blogs that I would read on a daily basis:

ScottGu’s Blog – Scott Guthrie’s blog is the best place to get the latest ASP.NET MVC announcements. He also writes really clearly written walkthroughs that describe how to build basic MVC applications.

Haacked – Phil Haack is the Program Manager for ASP.NET MVC.

Stephen Walther on ASP.NET MVC – My blog on ASP.NET MVC. I’ve written over 40 tips on building applications with ASP.NET MVC. I’ve also been building two complete sample applications.

Computer Zen – Scott Hanselman’s web log. Scott is another member of my team. His blog is a great source for all technical information on .NET.

WekeRoad – Rob Conery has been building an entire ecommerce application with ASP.NET MVC.

Hope these resources help! If you have any other recommendations for sources of information on ASP.NET MVC, then please leave a comment. Remember that you can always find the latest ASP.NET MVC information by visiting the primary Microsoft ASP.NET MVC site:

http://www.ASP.net/mvc

6 Comments

Comments have been disabled for this content.