ASP.NET MVC 4 Overview 23.10.2012 Gunnar Peipman
About me • Name: Gunnar Peipman • From: Tallinn, Estonia • MVP: ASP.NET, 5 years • Job: developer, architect, consultant • Community: speaker, blogger • Hobbies: new tech, beers, heavy metal, national cuisines travelling
Agenda • New project templates • Support for DotNetOpenAuth • Bundling and minification • Device based filtering • Mobile enhancements • Task support for async controllers • ASP.NET Web API • What is coming next?
New project templates
Available templates • Empty • Basic • Internet application • Intranet application • Mobile application • Web API • Single Page Application
Support for DotNetOpenAuth
What is DotNetOpenAuth • Library that supports different external authentication systems • Supported: – Twitter – Live ID – Google Accounts – Facebook – All othet OAuth providers • Now ships with ASP.NET MVC
How it is used in MVC? • Coming with internet application template • Switched off by default • Easy to enable and use • Users can log in through external systems • Users can join their different accounts on your application level
Demo: DotNetOpenAuth
Bundling and minification
Why bundling and minification? • Bundling: files of same time are concatenated • More than one group of files is supported • Saves some requests to web server • Minificaton: making script and css files smaller • Whitespace is removed • For JS it is possible to use short names of vars • Saves some bandwidth • For user: page loads faster
Demo: Bundling and minification
Results Files Size No optimizations 21 750KB Bundling and minification 10 337KB 52% 55%
Mobile enhancements
New mobile sites • Built on jQuery mobile • Support bundling and minification • Can use device based views • Can use CSS media queries • Support Viewport meta tag
Demo: Mobile site in action
Device based filtering
Era of multiple devices
What are challences? • Different screen sizes • Support for touch/multi-touch • Different technical platforms
Device based filtering • ASP.NET MVC detects devices automatically • If there is view for device then it is used automatically • Device settings can be overridden in code
Demo: Device based filtering
Task support for async controllers
ASP.NET Web API
What is Web API? • Simple and lightweight framework extension to write Web 2.0 API-s • Uses ASP.NET MVC framework • Makes use of HTTP standard command • Supports content negotiation • Supports self-hosting
Web API and WCF • Web API: – is quick and simple service layer – is scaled with web application – perfect fit for modern public web apps and their API-s • WCF: – is powerful enterprise-class service framework – scales differently than web application – supports complex components like workflows
Demo: Web API controllers
What’s coming next
Planned for Fall 2012 Update • SignalR • Support for Windows Azure Active Directory • Web API – OData, tracing, help page generation • Single Page Application • Project template for Facebook applications • Web optimization framework update • NuGet update • Providers system update
Thank you for your attention.
Help us choose the best Sinergija lecturer! HTC and Microsoft will award you – at the conference end, we’ll give one HTC Windows Phone 8X to someone from the audience – randomly. Go to www.mssinergija.net, log in and cast your votes! You can rate only lectures that you were present at, just once. More lectures you rate, more chances you have. Please use computers at the front of this room, or rate lecture from your phone or home computer, at Sinergija portal. This prize contest will end at Thursday, October 24th at 21:00. Winner will be announced at the official Sinergija web portal, www.mssinergija.net Please rate this lecture and WIN Windows Phone 8X by HTC! Powered by:
Microsoft and Open Source gateway for deeper exploration of open source engagements http://www.microsoft.com /openness Port25 blogs from the platform community and the OSS Lab teams http://Port25.technet.com Codeplex resources for developers and consumers of open source projects http://www.codeplex.com Interoperability Bridges technical collaborative works http://www.interoperabilit ybridges.com Open Up cross-Industry Interoperability and Standards activities http://www.microsoft.com /interop/openup Shared Source portal for Programmatically sharing code http://www.microsoft.com /sharedsource OData open source starter kit for Internet publishing of Government datasets using the Open Data http://ogdisdk.cloudapp.ne t Open Spec protocols, file formats, standards, technical Specifications http://www.microsoft.c om/openspecific ations BizSpark Program for Start-Up companies from both commercial and open source backgrounds http://www.microsoft.com /bizspark Openness and Interoperability @Microsoft How can I receive up-to-date Openness announcements from Microsoft? In addition to the websites above, you can receive regular updates to Microsoft’s openness, interoperability and standards efforts via the following channels: • http://blogs.technet.com/b/openness/ • http://blogs.msdn.com/b/interoperability/ • http://twitter.com/OpenAtMicrosoft • http://port25.technet.com • http://channel9.msdn.com/Blogs/Interoperability

ASP.NET MVC 4 Overview

  • 1.
    ASP.NET MVC 4Overview 23.10.2012 Gunnar Peipman
  • 2.
    About me • Name:Gunnar Peipman • From: Tallinn, Estonia • MVP: ASP.NET, 5 years • Job: developer, architect, consultant • Community: speaker, blogger • Hobbies: new tech, beers, heavy metal, national cuisines travelling
  • 3.
    Agenda • New projecttemplates • Support for DotNetOpenAuth • Bundling and minification • Device based filtering • Mobile enhancements • Task support for async controllers • ASP.NET Web API • What is coming next?
  • 4.
  • 5.
    Available templates • Empty •Basic • Internet application • Intranet application • Mobile application • Web API • Single Page Application
  • 6.
  • 7.
    What is DotNetOpenAuth •Library that supports different external authentication systems • Supported: – Twitter – Live ID – Google Accounts – Facebook – All othet OAuth providers • Now ships with ASP.NET MVC
  • 8.
    How it isused in MVC? • Coming with internet application template • Switched off by default • Easy to enable and use • Users can log in through external systems • Users can join their different accounts on your application level
  • 9.
  • 10.
  • 11.
    Why bundling andminification? • Bundling: files of same time are concatenated • More than one group of files is supported • Saves some requests to web server • Minificaton: making script and css files smaller • Whitespace is removed • For JS it is possible to use short names of vars • Saves some bandwidth • For user: page loads faster
  • 12.
    Demo: Bundling andminification
  • 13.
    Results Files Size No optimizations21 750KB Bundling and minification 10 337KB 52% 55%
  • 14.
  • 15.
    New mobile sites •Built on jQuery mobile • Support bundling and minification • Can use device based views • Can use CSS media queries • Support Viewport meta tag
  • 16.
  • 17.
  • 18.
  • 19.
    What are challences? •Different screen sizes • Support for touch/multi-touch • Different technical platforms
  • 20.
    Device based filtering •ASP.NET MVC detects devices automatically • If there is view for device then it is used automatically • Device settings can be overridden in code
  • 21.
  • 22.
    Task support forasync controllers
  • 23.
  • 24.
    What is WebAPI? • Simple and lightweight framework extension to write Web 2.0 API-s • Uses ASP.NET MVC framework • Makes use of HTTP standard command • Supports content negotiation • Supports self-hosting
  • 25.
    Web API andWCF • Web API: – is quick and simple service layer – is scaled with web application – perfect fit for modern public web apps and their API-s • WCF: – is powerful enterprise-class service framework – scales differently than web application – supports complex components like workflows
  • 26.
    Demo: Web APIcontrollers
  • 27.
  • 28.
    Planned for Fall2012 Update • SignalR • Support for Windows Azure Active Directory • Web API – OData, tracing, help page generation • Single Page Application • Project template for Facebook applications • Web optimization framework update • NuGet update • Providers system update
  • 29.
    Thank you foryour attention.
  • 30.
    Help us choosethe best Sinergija lecturer! HTC and Microsoft will award you – at the conference end, we’ll give one HTC Windows Phone 8X to someone from the audience – randomly. Go to www.mssinergija.net, log in and cast your votes! You can rate only lectures that you were present at, just once. More lectures you rate, more chances you have. Please use computers at the front of this room, or rate lecture from your phone or home computer, at Sinergija portal. This prize contest will end at Thursday, October 24th at 21:00. Winner will be announced at the official Sinergija web portal, www.mssinergija.net Please rate this lecture and WIN Windows Phone 8X by HTC! Powered by:
  • 31.
    Microsoft and Open Source gatewayfor deeper exploration of open source engagements http://www.microsoft.com /openness Port25 blogs from the platform community and the OSS Lab teams http://Port25.technet.com Codeplex resources for developers and consumers of open source projects http://www.codeplex.com Interoperability Bridges technical collaborative works http://www.interoperabilit ybridges.com Open Up cross-Industry Interoperability and Standards activities http://www.microsoft.com /interop/openup Shared Source portal for Programmatically sharing code http://www.microsoft.com /sharedsource OData open source starter kit for Internet publishing of Government datasets using the Open Data http://ogdisdk.cloudapp.ne t Open Spec protocols, file formats, standards, technical Specifications http://www.microsoft.c om/openspecific ations BizSpark Program for Start-Up companies from both commercial and open source backgrounds http://www.microsoft.com /bizspark Openness and Interoperability @Microsoft How can I receive up-to-date Openness announcements from Microsoft? In addition to the websites above, you can receive regular updates to Microsoft’s openness, interoperability and standards efforts via the following channels: • http://blogs.technet.com/b/openness/ • http://blogs.msdn.com/b/interoperability/ • http://twitter.com/OpenAtMicrosoft • http://port25.technet.com • http://channel9.msdn.com/Blogs/Interoperability