|
Microsoft's MVC framework is currently one of its fastest pieces of development. Hot on the heels of version 2.0 (issued in March) we now have a preview of version 3.0 - download from: Microsoft Downloads.

The update claims to be compatible with version 2.0 so you can install the new framework and carry on working. It can be installed along side the earlier versions adding a new set of project templates to Visual Studio. It also works with Web Developer 2010 Express.
The biggest change is the inclusion of the Razor view engine. You can now select between a standard ASPX or a Razor based MVC 3 project:

Whether you think that Razor is a good idea or not is another matter. It produces denser code and mixes HTML and procedural code in a way that could easily become uncontrolled. On the other hand it is undeniably simpler and more direct. At the moment the Razor syntax is not fully supported by IntelliSense but it will be in the next release, along with unit testing and a default page layout.
The other big new feature is the Add View dialog box now allows you to select which template engine to use. A drop down list lets you pick from any that you have installed. This makes it easier to use and develop third-party template engines.
If you are keen on using Ajax the new JSON binding support will also be welcome. You can build a JSON request in the usual way, using jQuery makes it easy, and then write an action method to handle the request that accepts a parameter with properties that correspond to the JSON fields posted. That is the Javascript object that the JSON would generate is automatically available as a .NET object. Support for the jQuery validation library and better support for "unobtrusive" Javascript - even though this is a vague concept.
Support for the Dependency Injection (DI)way of doing things has also been augmented. You can now use DI in controllers, views and action filters. Future previews will support DI in model binders, value providers and model metadata providers. MVC 3 supports the Common Service Locator library. DI is not a pattern much used in web application development but it is a natural match for the MVC approach.
There are a host of other minor improvements: Controller global filters, new ActionResult types, new model validation attributes and permanent redirects.
Although you can still use the ViewData property to pass data to the view you can now also use the dynamic ViewModel and access data via properties rather than dictionary keys. This seems like a good use of the new dynamic language facilities.
For more information see: http://www.asp.net/mvc

Further reading
Microsoft WebMatrix and Razor
MVC - it's the routing stupid!
ASP.Net MVC in Action
The Joomla MVC classes
Dependency Injection
Google Shuts Services But Quietly 22/05/2013
Over the past week Google has quietly shut down a number of services while getting us to focus on its shiny new offerings. But there have been some important casualties. The mentality of slash and bur [ ... ]
|
FBI Fun With Codes 04/05/2013
The FBI has set a new challenge for codebreakers. Amongst all the serious stuff on its site like lists of the most wanted fugitives you'll find a dot code puzzle just waiting to be solved.
| | More News |
<ASIN:0735627142>
<ASIN:1934356530>
<ASIN:193518279X>
<ASIN:1430227125>
<ASIN:0470643188>
<ASIN:1430228865>
<ASIN:1430225297> |