ASP.NET MVC final version is on its way to be released soon, RC is already ready to be downloaded!
Most of us have been waiting for ASP.NET MVC to get to its final release so we can use it in our projects. The main reason to do that is because until it is in its Release Candidate version, its features are subject to change at anytime. However, that was until yesterday. Now its Release Candidate version is public and can be downloaded by clicking this link and also you can see its release notes by clicking this link.
Good news is that ASP.NET MVC’s final version will be released next month, in February 2009.
Some important changes might be listed as below.
- “Create Controller” action in Visual Studio context menu in Solution Explorer.
- “Add View” action in Visual Studio context menu inside an Action method’s body. This will let you create an empty View or a View that has been specially created for the type that is being passed as a parameter to the View. E.g.: return View(user) will create a basic View that has “user” entity’s type’s properties.
- Ability to customize any kind of templates being used by MVC using T4 (Text Template Transformation Toolkit) – further reading. Both machine-wide and project-wide!
- RC release now includes a out of the box MSBuild task so you can compile the views within your ASP.NET MVC project.
- Views can work without Code-Behind files. You can still use the advantages of strongly typed base type. E.g.: Inherits=”System.Web.Mvc.ViewPage<MyCustomType>”
- To access the Model’s data, you don’t need to use “ViewData.Model” anymore. “Model” is a top-level property from now on. “ViewData.Model” still works though.
- An out of the box MSBuild task is included in the setup if you want to compile the code within the views.
- You are not required to use Bind attribute with Prefix value set to an empty string [Bind(Prefix=””)] by the default behavior.
- Supports protection to “Cross-site request forgery” attacks with an out of the box attribute: ValidateAntiForgeryToken. You may apply this attribute to the actions that you want to protect.
- FileResult (an out of the box ActionResult) to response a file instead of some other views using an action. Also there is the new File() method to create and return a file.
Visit http://www.asp.net/mvc for more details.