ATD9 2013 One ASP.NET

27
One ASP.NET Hrvoje Hudoletnjak 4.12.2013

description

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

Transcript of ATD9 2013 One ASP.NET

Page 1: ATD9 2013 One ASP.NET

One ASP.NET

Hrvoje Hudoletnjak4.12.2013

Page 2: ATD9 2013 One ASP.NET

AGENDA

• Then and now – why?

• Stories‐ UI App

‐ Server side App

‐ Middleware

‐ Host

• Conclusion

• QA

Page 3: ATD9 2013 One ASP.NET

2001

Page 4: ATD9 2013 One ASP.NET

MVCWEBAPISIGNALR

Page 5: ATD9 2013 One ASP.NET

Benefits of Each ASP.NET Component Framework

Framework Productivity Control UI Realtime

Web Forms X X

MVC X X

WebAPI X X

SignalR X

Page 6: ATD9 2013 One ASP.NET
Page 7: ATD9 2013 One ASP.NET

ASP.NET STACK – A LA CARTE

ASP.NET

WebForms

Sites

WebPages

SinglePageApps

MVCWebAPI

SignalR

Services

YOU! YOU!

Page 8: ATD9 2013 One ASP.NET

UISERVER SIDEMIDDLEWAREHOSTStories

Page 9: ATD9 2013 One ASP.NET

• 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

Page 10: ATD9 2013 One ASP.NET

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

Page 11: ATD9 2013 One ASP.NET

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

Page 12: ATD9 2013 One ASP.NET

UI SERVER CODE MIDDLEWARE HOST

Page 13: ATD9 2013 One ASP.NET

UI SERVER CODE MIDDLEWARE HOST

Page 14: ATD9 2013 One ASP.NET

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

Page 15: ATD9 2013 One ASP.NET

UI SERVER CODE MIDDLEWARE HOST

MVC 5

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

Page 16: ATD9 2013 One ASP.NET

UI SERVER CODE MIDDLEWARE HOST

WebAPI 2

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

Page 17: ATD9 2013 One ASP.NET

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

Page 18: ATD9 2013 One ASP.NET

UI SERVER CODE MIDDLEWARE HOST

Page 19: ATD9 2013 One ASP.NET

NEW ASP.NET

• Modular

• Lightweight

• Composable

• Portabable

• Performance & Scalability

• Multiple frameworks, hosts, middleware

• Pipeline pattern

• Open source & community driven

Page 20: ATD9 2013 One ASP.NET

OWINOpen Web Interface for dot Net

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

UI SERVER CODE MIDDLEWARE HOST

Done.

Page 21: ATD9 2013 One ASP.NET

UI SERVER CODE MIDDLEWARE HOST

Application

Application framework• WebAPI• SignalR• NancyFx

Server• SystemWeb• HttpListener

Host• IIS• Custom• OwinHost.exe

KATANA

NOWIN

etc

Page 22: ATD9 2013 One ASP.NET

UI SERVER CODE MIDDLEWARE HOST

install-package Microsoft.Owin.Host.SystemWeb

Page 23: ATD9 2013 One ASP.NET

UI SERVER CODE MIDDLEWARE HOST

• Server‐ SystemWeb

‐ HttpListener

‐ Nowin

• Host‐ IIS

‐ Custom

‐ OwinHost.exe

MS implementation of OWIN: Katana

Page 24: ATD9 2013 One ASP.NET

DEMO TIME!

Page 25: ATD9 2013 One ASP.NET

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

Page 26: ATD9 2013 One ASP.NET

Thank you!Q&A?

Twitter.com/hhrvojeAbout.me/[email protected]

Page 27: ATD9 2013 One ASP.NET

© 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.