InfoQ

News

ASP.NET MVC Preview 2 Brings Out Many Value Additions

Posted by Hartmut Wilms on Mar 10, 2008 04:14 AM

Community
.NET
Topics
.NET Framework
Tags
MVC,
ASP.NET

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.

No comments

Reply

Exclusive Content

Rationalizing the Presentation Tier

Thin client paradigm characterized by web applications is a kludge that needs to be repudiated. Old compromises are no longer needed and it's time to move the presentation tier to where it belongs.

Agile Project Management: Lessons Learned at Google

In this presentation filmed during QCon 2007, Jeff Sutherland, the creator of Scrum, talks about his visit at Google to do an analysis of Google's first implementation of Scrum.

AtomServer – The Power of Publishing for Data Distribution

In this article, Bryon Jacob and Chris Berry introduce AtomServer, their implementation of a full-fledged Atom Store based on Apache Abdera, which is now available as open source.

An Introduction to Virtualization

It is easy to think that virtualization applies only to servers. In reality the recent resurgence of the concept is also being applied to networking, storage, and application infrastructure.

REST Anti-Patterns

In this article, Stefan Tilkov explains some of the most common anti-patterns found in applications that claim to follow a "RESTful" design and suggests ways to avoid them.

Choosing between Routing and Orchestration in an ESB

In this article, Adrien Louis and Marc Dutoo discuss the differences and relative merits of using orchestration vs. routing in a typical ESB setup, and discuss various implementation options.

Enterprise Batch Processing with Spring

Wayne Lund discusses batch processing, Spring Batch objectives and features, scenarios for usage, Spring Batch architecture, scaling, example code, failures and retrying, and the future roadmap.

User Story Estimation Techniques

Developer Jay Fields draws on his experiences as a ThoughtWorks consultant to describe effective user story estimation techniques.