ASP.NET 4.5
   Developer Preview
          Jon Galloway
http://weblogs.asp.net/jgalloway
        SoCal Code Camp
Agenda
•   Overall focus areas for ASP.NET 4.5
•   ASP.NET 4.5 Web Forms
•   Common features
•   Where to find more
Visual Studio 11
ASP.NET 4.5 Web Forms
• Data
  – Strongly typed binding
  – Attributed models (and their advantages)
  – Model binding
• HTML5
• HTML Encoding
ASP.NET Core

Caching       Modules     Globalization

 Pages         Controls   Master Pages

 Profile        Roles     Membership

Intrinsics    Handlers        etc.
Web          Web
        MVC
Forms         Pages
   ASP.NET Core

   .NET Runtime
Data in ASP.NET MVC
• What does MVC look like?
                             Controller
   Request     Controller    Retrieves Model
                             “Does Stuff”




                             View
    Response     View        Visually represents
                             the model
Data access paradigms




Database First         Model First          Code First


Start with schema,   Design a model,     Code a model,
generate a model     generate a schema   generate a schema
                     and code
ASP.NET 4.5 Web Forms
• Data
  – Strongly typed binding
  – Attributed models (and their advantages)
     • Code-first
     • Dynamic Data aware
     • Easy to use unobtrusive validation
  – Model binding
• HTML5
• HTML Encoding
HTML5 Form Features
ASP.NET Common Features
•   Async
•   Bundling / Minification
•   Flexible Validation
•   Performance
Async Handlers / Modules
public class MyAsyncHandler : HttpTaskAsyncHandler
{
    // ...

    // ASP.NET automatically takes care of integrating the Task based override
    // with the ASP.NET pipeline.
    public override async Task ProcessRequestAsync(HttpContext context)
    {
        WebClient wc = new WebClient();
        var result =
            await wc.DownloadStringTaskAsync("http://www.microsoft.com");
        // Do something with the result
    }
}
ASP.NET Common Features
•   Async
•   Bundling / Minification
•   Flexible Validation
•   Performance
Where to find more
• http://asp.net/vnext
• http://www.microsoft.com/visualstudio/en-
  us/visual-studio-11

SoCal Code Camp 2011 - ASP.NET 4.5

  • 1.
    ASP.NET 4.5 Developer Preview Jon Galloway http://weblogs.asp.net/jgalloway SoCal Code Camp
  • 2.
    Agenda • Overall focus areas for ASP.NET 4.5 • ASP.NET 4.5 Web Forms • Common features • Where to find more
  • 3.
  • 4.
    ASP.NET 4.5 WebForms • Data – Strongly typed binding – Attributed models (and their advantages) – Model binding • HTML5 • HTML Encoding
  • 5.
    ASP.NET Core Caching Modules Globalization Pages Controls Master Pages Profile Roles Membership Intrinsics Handlers etc.
  • 6.
    Web Web MVC Forms Pages ASP.NET Core .NET Runtime
  • 7.
    Data in ASP.NETMVC • What does MVC look like? Controller Request Controller Retrieves Model “Does Stuff” View Response View Visually represents the model
  • 8.
    Data access paradigms DatabaseFirst Model First Code First Start with schema, Design a model, Code a model, generate a model generate a schema generate a schema and code
  • 9.
    ASP.NET 4.5 WebForms • Data – Strongly typed binding – Attributed models (and their advantages) • Code-first • Dynamic Data aware • Easy to use unobtrusive validation – Model binding • HTML5 • HTML Encoding
  • 10.
  • 11.
    ASP.NET Common Features • Async • Bundling / Minification • Flexible Validation • Performance
  • 12.
    Async Handlers /Modules public class MyAsyncHandler : HttpTaskAsyncHandler { // ... // ASP.NET automatically takes care of integrating the Task based override // with the ASP.NET pipeline. public override async Task ProcessRequestAsync(HttpContext context) { WebClient wc = new WebClient(); var result = await wc.DownloadStringTaskAsync("http://www.microsoft.com"); // Do something with the result } }
  • 13.
    ASP.NET Common Features • Async • Bundling / Minification • Flexible Validation • Performance
  • 14.
    Where to findmore • http://asp.net/vnext • http://www.microsoft.com/visualstudio/en- us/visual-studio-11

Editor's Notes

  • #8 Estimated Time: 4 minutesSo what does MVC look like when implemented over the web?When an HTTP request comes into the application it is mapped to a controller. Remember as we mentioned in the previous slide, in the MVC design pattern, the controller is the piece of the trifecta that handles all user input. In the case of a web application, user input is represented as HTTP requests [Advance Animation].Once the controller has received input, it performs whatever operations it needs to and then assembles a presentation model [Advance Animation].The controller then takes the model and passes it off to the view. Remember that the view is simply a visual representation of the model [Advance Animation].The view then “transforms” the model into whatever format it uses to represent it. In a web application, this would typically be HTML [Advance Animation].The view then serves the request by responding with its visual representation.