SlideShare a Scribd company logo
ZZ BC#8 Hello ASP.NET MVC 4 (dks)
About me
0 Chalermpon Areepong
   0 Microsoft MVP Thailand (ASP.NET)
0 Work for ICBC THAI
0 Blog http://nine69.wordpress.com
0 User Group
 https://www.facebook.com/groups/MVCTHAIDEV
AGENDA
0 Enhancement to default project template
0 New Razor 2.0
0 Bundling and Minification
0 ASP.NET WEB APIs
0 Enhanced support for asynchronous methods
0 New Mobile Support
Enhancements to Default
     Project Templates
0 Design for adaptive rendering to look good in both
 desktop browsers and mobile browsers without any
 customization.
Demo
0 Show new default project template
New Razor 2.0
0 Razor now supports conditional attributes. In an
  HTML element
<input type="checkbox“ name="check1" value="check1" checked="@checked1" />


0 Support path “~/” for all HTML attributes
Demo
0 Razor 2
Bundling and Minifacation
0 Reduce size of script and css file (remove whitespace)
0 New App_Start Folder
  0 BundleConfig.cs
0 BundleConfig. RegisterBundles()
   bundles.Add(new ScriptBundle("~/bundles/jquery").Include("~/Scripts/jquery-1.*"));
   bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
   *changes from Beta

0 Call in View
   @Scripts.Render("~/bundles/jquery")
   @Styles.Render("~/Content/themes/base/css", "~/Content/css")
Demo
0 Bundling and Minifacation
ASP.NET WEB APIs
0 Change name from WCF Web API
0 Easy to build HTTP services
0 Support Browsers and Mobile devices
0 Build RESTful applications on the .NET Framework
ASP.NET WEB APIs
               HTTP get, post, etc.




 Device App
                    Request
                 json, xml, form

                                      ASP.NET
  Web App
                                      WEB API
                      Response
                      json, xml
   Others
HTTP Request
ASP.NET WEB APIs
0 Modern HTTP programming model: Directly access and
    manipulate HTTP requests and responses in your Web APIs
    using a new, strongly typed HTTP object model.
0   Full support for routes:
0   Content negotiation: support for XML, JSON, and Form URL-
    encoded formats and custom format.
0   Model binding and validation: like controller base
0   Filters: support filter such as [Authorize]attribute.
0   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.
0   Improved Testability:
    use HttpRequestMessage and HttpResponseMessage to create a
    unit test project
ASP.NET WEB APIs
0 Code-based configuration: ASP.NET Web API configuration is accomplished
    solely through code, leaving your config files clean. Use the provide service
    locator pattern to configure extensibility points.
0   Improved support for Inversion of Control (IoC) containers: support
    dependency resolver abstraction
0   Self-host: Web APIs can be hosted in your own process in addition to IIS
    while still using the full power of routes and other features of Web API.
0   Create custom help and test pages: using the new IApiExplorer service to
    get a complete runtime description of your web APIs.
0   Monitoring and diagnostics: System.Diagnostics, ETW and third party
    logging frameworks.
0   Link generation: Use the ASP.NET Web API UrlHelper to generate links to
    related resources in the same application.
0   Web API project template: new project template
0   Scaffolding: by Add Controller dialog to quickly.
Demo
0 Basic Web API
0 SelfHost ( AspNetWebApi.Selfhost )
0 MVC Chat
Enhanced support for
    asynchronous methods
0 Support Async in .NET Framework 4.5
   0 TASK<T>
0 New “async”, “await” keyword
0 Reduce async code
      public async Task<ActionResult> GetSocialDatas(string username){
        var facebook = new FBService();
        var twitter = new TwitterService();
        return View(“SocialData",
          new SocialDataViewModel {
          FBWalls = await facebook.GetWallsAsync(string username),
          TwTimeLines = await twitter.GetTimeLineAsync(string username)
        });
      }


http://wiki.jvmlangsummit.com/images/3/33/Async_in_.NET.pdf
Demo
0 MVC New Async Operation
New Mobile Support
0 Mobile Project Template
  0 jQuery mobile script
  0 Mobile Theme
New Mobile Support
0 ViewSwitcher
   0 Detect device
   0 Switch view to mobile layout
   0 Can create layout for device by specification
Demo
0 New Mobile Support
End

More Related Content

PPTX
Web API authentication and authorization
PDF
Build your website with angularjs and web apis
PDF
Vaadin NYC Meetup
PPTX
RIA / SPA with ASP.NET
PPT
OWIN (Open Web Interface for .NET)
PPT
ASP.NET AJAX with Visual Studio 2008
PDF
Vaadin 7 by Joonas Lehtinen
PDF
Vaadin codemotion 2014
Web API authentication and authorization
Build your website with angularjs and web apis
Vaadin NYC Meetup
RIA / SPA with ASP.NET
OWIN (Open Web Interface for .NET)
ASP.NET AJAX with Visual Studio 2008
Vaadin 7 by Joonas Lehtinen
Vaadin codemotion 2014

What's hot (20)

PPTX
PPTX
Code Generation for Azure with .net
PDF
C# ASP.NET WEB API APPLICATION DEVELOPMENT
PPTX
API Versioning in the Cloud
PPTX
New microsoft office power point presentation
PPTX
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
PPTX
DevIntersections 2014 Web API Slides
PPTX
PPTX
Creating a custom connector in mule
PPTX
Introduction of ASP.NET MVC and AngularJS
PPTX
Mule integration with linkedin
PPTX
Introduction to ASP.NET 5
PPTX
Introduction to ASP.NET MVC
PPT
ASP.NET MVC Presentation
PPTX
Introduction to CodeIgniter
PDF
Content as a Service with Umbraco Headless
PDF
SpringPeople Building Web Sites with ASP.NET MVC FRAMEWORK
PPTX
AngularJS Scopes
PPTX
ASP.NET Web API
PDF
Difference between asp.net mvc 3 and asp.net mvc 4
Code Generation for Azure with .net
C# ASP.NET WEB API APPLICATION DEVELOPMENT
API Versioning in the Cloud
New microsoft office power point presentation
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
DevIntersections 2014 Web API Slides
Creating a custom connector in mule
Introduction of ASP.NET MVC and AngularJS
Mule integration with linkedin
Introduction to ASP.NET 5
Introduction to ASP.NET MVC
ASP.NET MVC Presentation
Introduction to CodeIgniter
Content as a Service with Umbraco Headless
SpringPeople Building Web Sites with ASP.NET MVC FRAMEWORK
AngularJS Scopes
ASP.NET Web API
Difference between asp.net mvc 3 and asp.net mvc 4
Ad

Viewers also liked (20)

PPTX
Scalable Resilient Web Services In .Net
PPTX
Iasi code camp 12 october 2013 corneliu rimboiu - bridging java and .net
PPTX
Authentication, Authorization, and Identity – More than meets the eye…
PPTX
Performance in .net best practices
PPTX
Asp.net mvc security
PPTX
DDD Melbourne 2014 security in ASP.Net Web API 2
PPT
Smooth Sort
PDF
Design & Deploy a data-driven Web API in 2 hours
PDF
Secure RESTful Web Services for ASP.NET Web API
PPTX
End to End Security with MVC and Web API
PPTX
Building Scalable .NET Web Applications
PDF
Tips and Tricks For Faster Asp.NET and MVC Applications
PPTX
ASP.NET Core 1.0 Overview: Post-RC2
PPTX
Overview of the .Net Collection Framework and Immutable Collections
PDF
5. web api 2 aspdotnet-mvc5-slides
PPTX
ASP.NET Core MVC + Web API with Overview (Post RC2)
PPTX
Scaling asp.net websites to millions of users
PPTX
10 performance and scalability secrets of ASP.NET websites
PPTX
ASP.NET Mvc 4 web api
PPTX
Learning ASP.NET 5 and MVC 6
Scalable Resilient Web Services In .Net
Iasi code camp 12 october 2013 corneliu rimboiu - bridging java and .net
Authentication, Authorization, and Identity – More than meets the eye…
Performance in .net best practices
Asp.net mvc security
DDD Melbourne 2014 security in ASP.Net Web API 2
Smooth Sort
Design & Deploy a data-driven Web API in 2 hours
Secure RESTful Web Services for ASP.NET Web API
End to End Security with MVC and Web API
Building Scalable .NET Web Applications
Tips and Tricks For Faster Asp.NET and MVC Applications
ASP.NET Core 1.0 Overview: Post-RC2
Overview of the .Net Collection Framework and Immutable Collections
5. web api 2 aspdotnet-mvc5-slides
ASP.NET Core MVC + Web API with Overview (Post RC2)
Scaling asp.net websites to millions of users
10 performance and scalability secrets of ASP.NET websites
ASP.NET Mvc 4 web api
Learning ASP.NET 5 and MVC 6
Ad

Similar to ZZ BC#8 Hello ASP.NET MVC 4 (dks) (20)

PPTX
ASP.NET - Building Web Application..in the right way!
PPTX
ASP.NET - Building Web Application..in the right way!
PPTX
PPTX
Intro to .NET for Government Developers
PPTX
Web API or WCF - An Architectural Comparison
PDF
Difference between asp.net web api and asp.net mvc
PDF
ASP.NET MVC - Whats The Big Deal
PDF
Asp.net difference faqs- 8
PPTX
MVC 6 - the new unified Web programming model
PPTX
ASP.NET Brief History
PPTX
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
PPTX
SoCal Code Camp 2011 - ASP.NET MVC 4
PPTX
PDF
ASP.NET Web API Interview Questions By Scholarhat
PDF
Introduction to ASP.NET MVC
PPTX
Asp.net With mvc handson
PPTX
What's new in asp.net mvc 4
PPTX
CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API
PDF
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!
Intro to .NET for Government Developers
Web API or WCF - An Architectural Comparison
Difference between asp.net web api and asp.net mvc
ASP.NET MVC - Whats The Big Deal
Asp.net difference faqs- 8
MVC 6 - the new unified Web programming model
ASP.NET Brief History
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
SoCal Code Camp 2011 - ASP.NET MVC 4
ASP.NET Web API Interview Questions By Scholarhat
Introduction to ASP.NET MVC
Asp.net With mvc handson
What's new in asp.net mvc 4
CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)

More from Chalermpon Areepong (8)

PPTX
DevRock #02 akka.net intro part
PPTX
Java script for web developer
PPTX
ASP.NET WEB API Training
PPTX
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
PPTX
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
PPTX
Build your web app with asp.net mvc 2 from scratch
PPTX
Gf vtzz-05--j queryshowcase
PPTX
DevRock #02 akka.net intro part
Java script for web developer
ASP.NET WEB API Training
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
Build your web app with asp.net mvc 2 from scratch
Gf vtzz-05--j queryshowcase

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Approach and Philosophy of On baking technology
PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Spectroscopy.pptx food analysis technology
PPTX
A Presentation on Artificial Intelligence
PPTX
sap open course for s4hana steps from ECC to s4
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Review of recent advances in non-invasive hemoglobin estimation
“AI and Expert System Decision Support & Business Intelligence Systems”
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Machine learning based COVID-19 study performance prediction
Approach and Philosophy of On baking technology
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Spectroscopy.pptx food analysis technology
A Presentation on Artificial Intelligence
sap open course for s4hana steps from ECC to s4
The Rise and Fall of 3GPP – Time for a Sabbatical?
Spectral efficient network and resource selection model in 5G networks
gpt5_lecture_notes_comprehensive_20250812015547.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Electronic commerce courselecture one. Pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
NewMind AI Weekly Chronicles - August'25-Week II
Diabetes mellitus diagnosis method based random forest with bat algorithm
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

ZZ BC#8 Hello ASP.NET MVC 4 (dks)

  • 2. About me 0 Chalermpon Areepong 0 Microsoft MVP Thailand (ASP.NET) 0 Work for ICBC THAI 0 Blog http://nine69.wordpress.com 0 User Group https://www.facebook.com/groups/MVCTHAIDEV
  • 3. AGENDA 0 Enhancement to default project template 0 New Razor 2.0 0 Bundling and Minification 0 ASP.NET WEB APIs 0 Enhanced support for asynchronous methods 0 New Mobile Support
  • 4. Enhancements to Default Project Templates 0 Design for adaptive rendering to look good in both desktop browsers and mobile browsers without any customization.
  • 5. Demo 0 Show new default project template
  • 6. New Razor 2.0 0 Razor now supports conditional attributes. In an HTML element <input type="checkbox“ name="check1" value="check1" checked="@checked1" /> 0 Support path “~/” for all HTML attributes
  • 8. Bundling and Minifacation 0 Reduce size of script and css file (remove whitespace) 0 New App_Start Folder 0 BundleConfig.cs 0 BundleConfig. RegisterBundles() bundles.Add(new ScriptBundle("~/bundles/jquery").Include("~/Scripts/jquery-1.*")); bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css")); *changes from Beta 0 Call in View @Scripts.Render("~/bundles/jquery") @Styles.Render("~/Content/themes/base/css", "~/Content/css")
  • 9. Demo 0 Bundling and Minifacation
  • 10. ASP.NET WEB APIs 0 Change name from WCF Web API 0 Easy to build HTTP services 0 Support Browsers and Mobile devices 0 Build RESTful applications on the .NET Framework
  • 11. ASP.NET WEB APIs HTTP get, post, etc. Device App Request json, xml, form ASP.NET Web App WEB API Response json, xml Others HTTP Request
  • 12. ASP.NET WEB APIs 0 Modern HTTP programming model: Directly access and manipulate HTTP requests and responses in your Web APIs using a new, strongly typed HTTP object model. 0 Full support for routes: 0 Content negotiation: support for XML, JSON, and Form URL- encoded formats and custom format. 0 Model binding and validation: like controller base 0 Filters: support filter such as [Authorize]attribute. 0 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. 0 Improved Testability: use HttpRequestMessage and HttpResponseMessage to create a unit test project
  • 13. ASP.NET WEB APIs 0 Code-based configuration: ASP.NET Web API configuration is accomplished solely through code, leaving your config files clean. Use the provide service locator pattern to configure extensibility points. 0 Improved support for Inversion of Control (IoC) containers: support dependency resolver abstraction 0 Self-host: Web APIs can be hosted in your own process in addition to IIS while still using the full power of routes and other features of Web API. 0 Create custom help and test pages: using the new IApiExplorer service to get a complete runtime description of your web APIs. 0 Monitoring and diagnostics: System.Diagnostics, ETW and third party logging frameworks. 0 Link generation: Use the ASP.NET Web API UrlHelper to generate links to related resources in the same application. 0 Web API project template: new project template 0 Scaffolding: by Add Controller dialog to quickly.
  • 14. Demo 0 Basic Web API 0 SelfHost ( AspNetWebApi.Selfhost ) 0 MVC Chat
  • 15. Enhanced support for asynchronous methods 0 Support Async in .NET Framework 4.5 0 TASK<T> 0 New “async”, “await” keyword 0 Reduce async code public async Task<ActionResult> GetSocialDatas(string username){ var facebook = new FBService(); var twitter = new TwitterService(); return View(“SocialData", new SocialDataViewModel { FBWalls = await facebook.GetWallsAsync(string username), TwTimeLines = await twitter.GetTimeLineAsync(string username) }); } http://wiki.jvmlangsummit.com/images/3/33/Async_in_.NET.pdf
  • 16. Demo 0 MVC New Async Operation
  • 17. New Mobile Support 0 Mobile Project Template 0 jQuery mobile script 0 Mobile Theme
  • 18. New Mobile Support 0 ViewSwitcher 0 Detect device 0 Switch view to mobile layout 0 Can create layout for device by specification
  • 19. Demo 0 New Mobile Support
  • 20. End