ASP.NET MVC 2 RC is available for download

These are the features that have been introduced in the ASP.NET MVC 2 Release Candidate release.

ASP.NET MVC validation scripts have been moved to their own file

To help reduce conflicts with other Ajax libraries, the built-in ASP.NET MVC validation scripts are now in a separate JavaScript file.

ASP.NET MVC validation scripts can be included at the top or bottom of a page

The server component that renders the client validation metadata now renders the metadata into a JavaScript variable. This allows the validation scripts to be included either at the top of the page or at the bottom, because the scripts will look for the variable and load the metadata when it is available.

ASP.NET MVC validation scripts support globalization

When the required ASP.NET Ajax globalization scripts are included in a page, the validation logic uses the culture-specific data for data types (such as dates and numbers) when it validates input text. The new Html.GlobalizationScript helper method can be used to render a reference to the globalization script for the current culture.

Html.ValidationSummary helper method can display model-level errors

Instead of always displaying all validation errors, the Html.ValidationSummary helper method has a new option to display only model-level errors. This enables model-level errors to be displayed in the validation summary and field-specific errors next to each field.

T4 templates in Visual Studio generate code that is specific to the target version of the .NET Framework

A new property is available to T4 files from the ASP.NET MVC T4 host that specifies the version of the .NET Framework that is used by the application. This allows T4 templates to generate code and markup that is specific to a version of the .NET Framework. In Visual Studio 2008, the value is always .NET 3.5. In Visual Studio 2010, the value is either .NET 3.5 or .NET 4.

Here’s the download link:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3b537c55-0948-4e6a-bf8c-aa1a78878da0

NHibernate vs Entity Framework: a performance test

I just found an interesting comparison in performance of two common ORM frameworks: Microsoft Entity Framework and NHibernate. Here’s a quick summary of the performance comparison:

Operation / Number of operations NHiberante – 4K Entity Framework – 4K NHiberante – 40K Entity Framework- 40K Winner
Store 37.37 9.19 1500 98 Entity Framework
Read over relations 1.01 0.54 10.13 4.18 Entity Framework
Read by ID 3.06 25.22 246 230 NHibernate with smaller amount of objects
Update 6.61 7.34 77 72 Both
Delete 3.35 16.76 58 1824 NHibernate

If you’re interested in the details of the performance measurements, please go to GregDoesIt.com.

Multi-Monitor Support in Visual Studio 2010

In Visual Studio 2008,  all documents/files/designers are hosted within a single top-level window – which unfortunately means that you can’t partition the IDE across multiple monitors.

VS 2010 addresses this by now allowing editors, designers and tool-windows to be moved outside the top-level window and positioned anywhere you want, and on any monitor on your system.  This allows you to significantly improve your use of screen area, and optimize your overall development workflow.

If you work on a system that has multiple monitors connected to it, you will find the new multi-monitor support feature within VS2010 a big productivity boost. But if you don’t already have multiple monitors connected to your computer, this might be a good excuse to get some…

For more information, please see the original post at:

http://weblogs.asp.net/scottgu/archive/2009/08/31/multi-monitor-support-vs-2010-and-net-4-series.aspx

Visual Studio Addon: NArrange

NArrange is a .NET code beautifier that automatically organizes code members and elements within .NET classes.

Why You Should Use NArrange?

There are several reasons you may want to consider using NArrange for your .NET software project:

  • Reduces the amount of time developers spend arranging members within code files. With NArrange, you don’t need to worry about where you place a new member definition in a class… just type away and run NArrange prior to compilation. After formatting, the new member will be automatically moved to the appropriate location in the source file.
  • Helps enforce coding style standards
  • When used as part of check-in procedures, NArrange can help reduce source code repository conflicts.
  • NArrange can automatically group similar code members into predefined region blocks, if supported by the language (C# and VB).
  • Reduces the amount of time spent searching for specific members in a code file. Through standard arrangement of source code files, every member of the team will know exactly where in a file to look for private fields, constructors, etc.
  • Flexibility – NArrange allows you to configure how members are organized (grouping, sorting, regions, etc.)
  • Sort Usings

For more information about this free product (open source), please go here.

Windows 7 Training Kit For Developers

The Windows 7 Training Kit for Developers includes presentations, hands-on labs, and demos. This content is based on Windows 7 RTM and it is designed to help you learn how to build applications that are compatible with and shine on Windows 7 by utilizing key Windows 7 features such as:

  • Taskbar
  • Libraries
  • Multi Touch
  • Sensors and Location
  • Ribbon
  • Trigger Start Services
  • Instrumentation and ETW
  • Application Compatability

And Application Compatibility topics such as:

  • Version Checking
  • UAC Data Redirection
  • Session 0 Isolation
  • Installer Detection
  • User Interface Privilege Isolation
  • High DPI

Click here to download it from Microsoft’s web site.