asp.net mvc 4 overview
DESCRIPTION
My ASP.NET MVC 4 introduction session at Sinergija12.TRANSCRIPT
![Page 1: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/1.jpg)
ASP.NET MVC 4 Overview
23.10.2012
Gunnar Peipman
![Page 2: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/2.jpg)
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 cuisinestravelling
![Page 3: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/3.jpg)
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?
![Page 4: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/4.jpg)
New project templates
![Page 5: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/5.jpg)
Available templates
• Empty• Basic• Internet application• Intranet application• Mobile application• Web API• Single Page Application
![Page 6: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/6.jpg)
Support for DotNetOpenAuth
![Page 7: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/7.jpg)
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
![Page 8: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/8.jpg)
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
![Page 9: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/9.jpg)
Demo: DotNetOpenAuth
![Page 10: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/10.jpg)
Bundling and minification
![Page 11: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/11.jpg)
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
![Page 12: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/12.jpg)
Demo: Bundling and minification
![Page 13: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/13.jpg)
Results
Files Size
No optimizations 21 750KB
Bundling and minification 10 337KB
52% 55%
![Page 14: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/14.jpg)
Mobile enhancements
![Page 15: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/15.jpg)
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
![Page 16: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/16.jpg)
Demo: Mobile site in action
![Page 17: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/17.jpg)
Device based filtering
![Page 18: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/18.jpg)
Era of multiple devices
![Page 19: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/19.jpg)
What are challences?
• Different screen sizes• Support for touch/multi-touch• Different technical platforms
![Page 20: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/20.jpg)
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
![Page 21: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/21.jpg)
Demo: Device based filtering
![Page 22: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/22.jpg)
Task support for async controllers
![Page 23: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/23.jpg)
ASP.NET Web API
![Page 24: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/24.jpg)
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
![Page 25: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/25.jpg)
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
![Page 26: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/26.jpg)
Demo: Web API controllers
![Page 27: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/27.jpg)
What’s coming next
![Page 28: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/28.jpg)
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
![Page 29: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/29.jpg)
Thank you for your attention.
![Page 30: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/30.jpg)
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:
![Page 31: ASP.NET MVC 4 Overview](https://reader033.vdocuments.mx/reader033/viewer/2022061616/5560c737d8b42a13088b4700/html5/thumbnails/31.jpg)
Microsoft andOpen Source
gateway for deeperexploration ofopen source
engagementshttp://www.microsoft.com/openness
Port25blogs from the
platform communityand the OSS Lab
teams http://Port25.technet.com
Codeplexresources for
developers andconsumers of open
source projectshttp://www.codeplex.com
InteroperabilityBridgestechnical collaborativeworks
http://www.interoperabilitybridges.com
Open Upcross-Industry
Interoperability andStandards activitieshttp://www.microsoft.com/interop/openup
Shared Sourceportal for
Programmaticallysharing code
http://www.microsoft.com/sharedsource
ODataopen source starter
kitfor Internet
publishingof Government
datasetsusing the Open Data
http://ogdisdk.cloudapp.net
Open Specprotocols, file
formats,standards, technical
Specificationshttp://www.microsoft.
com/openspecifi
cations
BizSparkProgram for Start-Up
companies from both
commercial and open
source backgroundshttp://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