what’s new mvc 4
DESCRIPTION
TRANSCRIPT
What’s new in Mvc 4
By Brandon D’ImperioImaginarydevelopment.blogspot.com
Asp.Net 4.5 new features
• Bundling– Script– CSS
• Mobile features– New mobile project template– Many new features to support mobile apps
• Async Handlers/Modules• Performance• _references.js - sweet
Mvc 4 new stuff
• ASP.NET Web API• Full Async support for actions– Async<ActionResult> Index(){Return View();}
• Refreshed and modernized default project templates
Bundling
Impact of Bundling and Minification
Using B/M Without B/M Change
File Requests 9 34 256%
KB Sent 3.26 11.92 266%
KB Received 388.51 530 36%
Load Time 510 MS 780 MS 53%
Modernized Project Template• OAuth and OpenID support enabled • Html5 by default• Uses jQueryUI for login• Includes KnockoutJs• adaptive rendering - looks good in both
desktop browsers and mobile browsers without any customization
• Bundling/minification built-in• Includes WebApi Plumbing (or templates)
– Query composition: Use the [Queryable] filter attribute on an action that returns IQueryable to enable support for querying your web API via the OData query conventions.
Sources
• http://www.asp.net/mvc/mvc4• http://www.slideshare.net/jongalloway/socal-code-ca
mp-2011-aspnet-45• http://www.slideshare.net/jongalloway/socal-code-ca
mp-2011-aspnet-mvc-4• http://www.slideshare.net/simonech/whats-new-in-as
pnet-mvc-4• http://blogs.msdn.com/b/webdev/archive/2012/08/15
/oauth-openid-support-for-webforms-mvc-and-webpages.aspx
• http://haacked.com/archive/2012/03/11/itrsquos-the-little-things-about-asp-net-mvc-4.aspx
• http://www.asp.net/mvc/tutorials/mvc-4/using-asynchronous-methods-in-aspnet-mvc-4
• http://msdn.microsoft.com/en-us/vs11trainingcourse_aspnetmvc4_topic2.aspx
Little known or used Mvc features not specific to 4Views
HelpersCollection.cshtml
ModelBinding – complex nested type? Let json bind that sucker
Little known sources
• http://weblogs.asp.net/scottgu/archive/2011/05/12/asp-net-mvc-3-and-the-helper-syntax-within-razor.aspx