ASP.NET MVC 4 Overview

31
ASP.NET MVC 4 Overview 23.10.2012 Gunnar Peipman

description

My ASP.NET MVC 4 introduction session at Sinergija12.

Transcript of ASP.NET MVC 4 Overview

Page 1: ASP.NET MVC 4 Overview

ASP.NET MVC 4 Overview

23.10.2012

Gunnar Peipman

Page 2: ASP.NET MVC 4 Overview

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

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

New project templates

Page 5: ASP.NET MVC 4 Overview

Available templates

• Empty• Basic• Internet application• Intranet application• Mobile application• Web API• Single Page Application

Page 6: ASP.NET MVC 4 Overview

Support for DotNetOpenAuth

Page 7: ASP.NET MVC 4 Overview

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

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

Demo: DotNetOpenAuth

Page 10: ASP.NET MVC 4 Overview

Bundling and minification

Page 11: ASP.NET MVC 4 Overview

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

Demo: Bundling and minification

Page 13: ASP.NET MVC 4 Overview

Results

Files Size

No optimizations 21 750KB

Bundling and minification 10 337KB

52% 55%

Page 14: ASP.NET MVC 4 Overview

Mobile enhancements

Page 15: ASP.NET MVC 4 Overview

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

Demo: Mobile site in action

Page 17: ASP.NET MVC 4 Overview

Device based filtering

Page 18: ASP.NET MVC 4 Overview

Era of multiple devices

Page 19: ASP.NET MVC 4 Overview

What are challences?

• Different screen sizes• Support for touch/multi-touch• Different technical platforms

Page 20: ASP.NET MVC 4 Overview

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

Demo: Device based filtering

Page 22: ASP.NET MVC 4 Overview

Task support for async controllers

Page 23: ASP.NET MVC 4 Overview

ASP.NET Web API

Page 24: ASP.NET MVC 4 Overview

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

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

Demo: Web API controllers

Page 27: ASP.NET MVC 4 Overview

What’s coming next

Page 28: ASP.NET MVC 4 Overview

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

Thank you for your attention.

Page 30: ASP.NET MVC 4 Overview

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

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