The MVC Team has today released the latest preview of the MVC Framework.
Last we got the Interim Release, which was a source refresh and not an official preview.
The previews are probably more stable in feature set, and are relatively well-tested, whereas the interim release feels more like a focus-group test with the developer community, of new ideas to the feature set that are not decided or sufficiently tested yet.
This is a great Idea - it opens for dialog, and makes me feel that we can actually still make a difference to the final product.
This Preview 3 release should probably be considered as the result of this, and I am very excited to see, what changes we are going to see.
So far i have noticed the following:
In the Interim release it was required that you return an ActionResult from an ActionMethod, this is no longer the case - you can choose either way, void or ActionResult.
Furthermore as specialized versions of an ActionResult, the following types are added:
- ViewResult: Renders the specified view to the response.
- EmptyResult: Does nothing. Returned if the action method must return a null result.
- RedirectResult: Performs an HTTP redirect to the specified URL.
- RedirectToRouteResult: Given some routing values, uses the routing API to determine the URL and then redirects to that URL.
- JsonResult: Serializes the specified ViewData object to JSON format.
- ContentResult: Writes the specified text content to the response.
Especially the JsonResult looks very interesting for Ajax scenarios.
Then we see some improvements to the HTML helper methods, and some improvements to routing, like allowing all special characters in routes and the addition of IgnoreRoute() method that lets you ignore certain URL patterns in processing.
All in all, very interesting and I am certainly going to dig deeper into this the next couple of days, getting my MVC applications up to date.
Related links