CNUG ASP.NET MVC 4 – New Features
-
Upload
mayank-srivastava -
Category
Technology
-
view
551 -
download
0
description
Transcript of CNUG ASP.NET MVC 4 – New Features
![Page 1: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/1.jpg)
ASP.NET MVC 4 – New Features
By Mayank Srivastava
MPS Partners LLC
![Page 2: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/2.jpg)
About me
Mayank Srivastava Senior Consultant / Specialist Web,
MPS Partners LLC.
http://MayankSrivastava.com
MayankSri
CN
UG
07
-18
-20
12
![Page 3: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/3.jpg)
Know your audience
• Experience on ASP.NET MVC prior versions?
• Understanding of ASP.NET MVC framework?
• jQuery Mobile / HTML 5?
CN
UG
07
-18
-20
12
![Page 4: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/4.jpg)
Topics
• Quick Look
• Solution Templates – Web and Mobile
• Cloud Ready
• Controller Anywhere
• Cleaner Global.ascx.cs
• Display Modes and Mobile Features
• Web APIs
• Bundling and minification
• Task-based async controllers
• Razor enhancements
CN
UG
07
-18
-20
12
![Page 5: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/5.jpg)
Quick Look
CN
UG
07
-18
-20
12
![Page 6: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/6.jpg)
The Mobile Buzz…
Why Target Mobile Platform?
CN
UG
07
-18
-20
12
![Page 7: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/7.jpg)
Case for Mobile
CN
UG
07
-18
-20
12
World’s population 7 billion Total Mobile Broadband Users Hit 1 Billion in 2011 The new primary way to browse the web.
![Page 8: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/8.jpg)
Top 10 CIO Technology Priorities in 2012 - Survey by Gartner
1. Analytics and business intelligence. (Last year's rank: 5)
2. Mobile technologies. (Last year's rank : 3)
3. Cloud computing, including SaaS. (Last year's rank : 1)
4. Collaboration/workflow technologies. (Last year's rank : 8)
5. Legacy modernization.
6. IT management. (Last year's rank : 4)
7. CRM
8. ERP applications
9. Security
10. Virtualization. (Last year's rank : 2)
CN
UG
07
-18
-20
12
![Page 9: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/9.jpg)
Building a Mobile Web App
Leveraging your existing skills to build Mobile applications.
What are the options?
Client Side:
HTML 5 / CSS 3 – Meta Viewport tag / Media Queries
Server Side
ASP.NET MVC – Display Modes
CN
UG
07
-18
-20
12
![Page 10: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/10.jpg)
Client side: CSS style – Pre HTML 5
CN
UG
07
-18
-20
12
![Page 11: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/11.jpg)
What is HTML 5
• New version of HTML
• A new standard UI platform.
• Accepted on wide verity of platforms, not just web
• Metro Apps
• Apple web kit
• Android platform
• Packaging HTML 5 Websites as Apps using Phone Gap (aka Adobe Cordova)
http://phonegap.com/
CN
UG
07
-18
-20
12
![Page 12: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/12.jpg)
Client side : Adaptive rendering
Problems: Bandwidth -Amount of data sent over the wire same whether mobile or desktop.
Application performance – Potentially additional data fetch for mobile.
User Experience – Smaller screen might need simpler UI design (button/links).
CN
UG
07
-18
-20
12
DAL
Business Logic
Presentation Logic (URL)
Desktop Browser
IE Mobile Win Phone
Safari iPhone
Safari iPad
DB
Web Application Browsers Standard markup
![Page 13: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/13.jpg)
Server side : Display Modes
Being able to send different views to different devices.
CN
UG
07
-18
-20
12
DAL
Business Logic
Presentation Logic (URL)
Desktop Browser
IE Mobile Win Ph 7
Safari iPhone
Safari iPad
DB
Web Application Browsers Client specific markup
![Page 14: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/14.jpg)
Demo
• Display modes
• jQuery Mobile
CN
UG
07
-18
-20
12
![Page 15: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/15.jpg)
Web API
• A framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices
• A platform for building RESTful applications on the .NET Framework
• New landing page - http://www.asp.net/web-api
• Demo from Channel 9 http://www.asp.net/web-api/samples
CN
UG
07
-18
-20
12
![Page 16: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/16.jpg)
Improvements to Mobile Web
CN
UG
07
-18
-20
12
DAL
Business Logic
Web API
Desktop Browser
IE Mobile Win Ph 7
Safari iPhone
Safari iPad
DB
Web Application Browsers Client specific HTML & JS based App
Web App
Web App
Web App
Web App
![Page 17: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/17.jpg)
Client side JavaScript libraries
• Knockout.js
• http://knockoutjs.com/
• http://learn.knockoutjs.com/
• History.js
• https://github.com/balupton/history.js/wiki/Showcase
• Upshot.js
http://nuget.org/packages/upshot
Single page Applications
• http://code.msdn.microsoft.com/ASPNET-Single-Page-d6d7172c
CN
UG
07
-18
-20
12
![Page 18: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/18.jpg)
Web APIs Demo
CN
UG
07
-18
-20
12
![Page 19: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/19.jpg)
Bundling and Minification
CN
UG
07
-18
-20
12
Productivity feature
Compression and bundling
• CSS
• JavaScript
• Folder Bundles
• Declarative Static bundles
• Custom Dynamic bundles
![Page 20: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/20.jpg)
Async Controllers
Old Event-based Asynchronous Pattern
CN
UG
07
-18
-20
12
![Page 21: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/21.jpg)
Async Controllers
Task based asynchronous pattern
CN
UG
07
-18
-20
12
![Page 22: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/22.jpg)
Razor Enhancements
• Use of ~ as Root.
CN
UG
07
-18
-20
12
![Page 23: CNUG ASP.NET MVC 4 – New Features](https://reader033.fdocuments.us/reader033/viewer/2022042613/5538e3dd550346f02f8b48df/html5/thumbnails/23.jpg)
Download DEMO & Slides
http://blogs.MPSPartners.com/MayankSrivastava/Default.aspx
Also
http://www.MayankSrivastava.com/
CN
UG
07
-18
-20
12
Questions