BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

ASP.NET MVC Preview 2 Brings Out Many Value Additions

| by Hartmut Wilms on Mar 10, 2008. Estimated reading time: 2 minutes |

The ASP.NET MVC Framework Preview 2 has been released last week and offers a lot of new features and many refactorings.

A very important point to note is that the framework has been separated from the ASP.NET Extensions/Futures package, and is now available as an individual download. This clearly shows the rising interest in and importance of the MVC Framework.

There is a concise summary of all new features here on InfoQ. Vishal Joshi elaborates on the new Visual Studio integration features.

He has also written about the ASP.NET MVC Test Framework Integration that supports unit testing within web applications:

If you have Visual Studio Unit Test framework on your machine (i.e. in Visual Studio 2008 SKUs Professional and Above) then on creation of ASP.NET MVC Web Application you will automatically be prompted to create a test project.   Not only that, due to the popular community request Visual Studio will now also provide a mechanism to extend this test framework system to integrate external unit testing frameworks like NUnit, MBUnit, xUnit etc.

Currently the Visual Studio integration contains project templates for MSTest only. Vishal shows how to write a template that supports the NUnit framework and the Rhino.Mocks library. Joe Cartano provides an implementation of Vishals guidance as part of his ASP.NET MVC Test Framework Integration Walkthrough as well as an overview of the ASP.NET MVC Framework Preview 2 (Mix 2008) Resources.

If you are new to the ASP.NET MVC framework, you might have a look at Scott Hanselman's series of screencasts on the topic. These screencast provide a nice introduction based on the current MIX08 release:

  • Displaying Data
    This screencast is about how data gets displayed in ASP.NET MVC. One of the changes is support for a wide variety of test frameworks You might create a test project from the ASP.MVC Web App template within Visual Studio.
  • Editing Data and Making Forms
    Scott shows how to edit data within HTML forms. In addition he shows three different options of inserting links to controller actions and how to create and use MVC User Controls.
  • Advanced Techniques
    Some of the advanced techniques of ASP.NET MVC are described within this screencast. Scott introduces action filters, which are attributes that add pre and post processing logic to controller actions. He also shows how to integrate and create custom view engines and custom controllers. At last he explains catch all routes that grab everything from the wildcard '*' to the end of the request URI and transform it into a named parameter value.
  • Testing
    The last part of the series is about testing ASP.NET MVC applications and especially about mocking certain aspects of web application development. Scott talks about MvcMockHelpers, which is not part of the MVC bundle, yet. This static class helps to make mocking a lot easier in ASP.NET MVC applications.

Further information is available on the ASP.NET MVC web site, and in the ASP.NET MVC forums.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and dont miss out on content that matters to you

BT