ATD9 2013 One ASP.NET

Post on 14-Jan-2015

776 views 0 download

Tags:

description

Presentation for Advanced Technology Day 9 conference about One ASP.NET concept

Transcript of ATD9 2013 One ASP.NET

One ASP.NET

Hrvoje Hudoletnjak4.12.2013

AGENDA

• Then and now – why?

• Stories‐ UI App

‐ Server side App

‐ Middleware

‐ Host

• Conclusion

• QA

2001

MVCWEBAPISIGNALR

Benefits of Each ASP.NET Component Framework

Framework Productivity Control UI Realtime

Web Forms X X

MVC X X

WebAPI X X

SignalR X

ASP.NET STACK – A LA CARTE

ASP.NET

WebForms

Sites

WebPages

SinglePageApps

MVCWebAPI

SignalR

Services

YOU! YOU!

UISERVER SIDEMIDDLEWAREHOSTStories

• Bootstrap, Modernizr, jQuery

• No MS preferable UI library‐ KnockoutJS and SignalR bundled in project template

• You pick lib that’s best for the job

• VS 2012.2/2013 improvements ‐ HTML/CSS/JS editor rewritten, good speed and

responsiveness

‐ intellisense for Knockout, Angular,...

‐ CSS intellisense

‐ Web Essentials extension

UI SERVER CODE MIDDLEWARE HOST

Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript.

MVVM

TWO WAY BINDING

TEMPLATING

= KNOCKOUT + REQUIRE + JQUERYMV*MODULARITYASYNC (PROMISES)NAVIGATION & STATE

MVCAPP STRUCTUREEVENTSMODELSCOLLECTIONSROUTERTEMPLATING

MV*DIRECTIVESTWO-WAY BINDINGDATA BINDINGRESTTEMPLATING

KNOCKOUT DURANDAL ANGULAR BACKBONE

UI SERVER CODE MIDDLEWARE HOST

SIGNALR, JQUERY, VANILLA JS, etc

UI SERVER CODE MIDDLEWARE HOST

UI SERVER CODE MIDDLEWARE HOST

UI SERVER CODE MIDDLEWARE HOST

GENERAL ASP.NET 4.5

• Async / await• Bundling & Optimization, Data annotations, Request

validation, Model binders, Strongly typed Data controls• Web Sockets support• HTML 5 templates• 30% less memory• 30% faster start

UI SERVER CODE MIDDLEWARE HOST

MVC 5

• Async / await• Nuget• Tooling: Scaffolding, HTML 5• Bootstrap template• ASP.NET Identity• EF 6

UI SERVER CODE MIDDLEWARE HOST

WebAPI 2

• REST• OWIN based• External Auth• CORS• Attribute routing• Request batching• OData improvements

UI SERVER CODE MIDDLEWARE HOST

ASP.NET IDENTITY

• Works with any framework• OWIN based• Persistance ignorance• EF, Sharepoint, Azure, AD, NoSQL, etc

• Roles and Claims• Async• External logins

UI SERVER CODE MIDDLEWARE HOST

NEW ASP.NET

• Modular

• Lightweight

• Composable

• Portabable

• Performance & Scalability

• Multiple frameworks, hosts, middleware

• Pipeline pattern

• Open source & community driven

OWINOpen Web Interface for dot Net

Using AppFunc = Func<IDictionary<string, object>, Task>;

UI SERVER CODE MIDDLEWARE HOST

Done.

UI SERVER CODE MIDDLEWARE HOST

Application

Application framework• WebAPI• SignalR• NancyFx

Server• SystemWeb• HttpListener

Host• IIS• Custom• OwinHost.exe

KATANA

NOWIN

etc

UI SERVER CODE MIDDLEWARE HOST

install-package Microsoft.Owin.Host.SystemWeb

UI SERVER CODE MIDDLEWARE HOST

• Server‐ SystemWeb

‐ HttpListener

‐ Nowin

• Host‐ IIS

‐ Custom

‐ OwinHost.exe

MS implementation of OWIN: Katana

DEMO TIME!

Conclusion

• Pick components you need – MVC, WebForms, Nancy, etc

• It’s all ASP.NET

• 10y ago we built different kind of apps

• We have to learn SPA – Knockout / Durandal, Angular, etc

• OWIN: more framworks, more middleware, more hosts

• Flexibility

Thank you!Q&A?

Twitter.com/hhrvojeAbout.me/hhrvojehrvoje@hudoletnjak.com

© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.