+ All Categories
Home > Documents > Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While...

Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While...

Date post: 17-Jan-2018
Category:
Upload: blaze-moody
View: 218 times
Download: 0 times
Share this document with a friend
Description:
ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In
32
top model Phil Haack Senior Program Manager Microsoft Corporation AMERICA’S NEXT view controller
Transcript
Page 1: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

top model Phil HaackSenior Program ManagerMicrosoft Corporation

A M E R I C A ’ S N E X T

view controller

Page 2: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Objectives and TakeawaysWhat’s in it for you?

Session Objectives Introduce you to this crazy new MVC thingConvince you that it’s not as crazy as it seemsNot bore you to sleep

Key TakeawaysASP.NET MVC puts you in full controlExcitement about ASP.NET MVCLack of Sleep

Page 3: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Urban Myth Point of Clarification

ScottGu Wrote The First Prototype of ASP.NET MVC While Flying

A Plane

In

Page 4: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

What is ASP.NET MVC?I ask myself this every night

A new Web Application Project typeSimply an option

Not a replacement for WebFormsBuilds on top ASP.NETManual vs Automatic Transmission

Page 5: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

File | New

demo

Page 6: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

What is MVC?

A design patternAcronym for Model ● View ● ControllerSeparation of concerns

Page 7: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

What is MVC?

Step 1Incoming request routed to Controller

Request

Controller

Page 8: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

What is MVC?

Step 2Controller processes request and creates presentation

Model

Controller

Model

Page 9: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

What is MVC?

Step 3Model is passed to View

Controller

View

Page 10: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

What is MVC?

Step 4View transforms Model into appropriate output format

Controller

View

Page 11: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

What is MVC?

Step 5Response is rendered

Response

Controller

View

Page 12: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Framework Goals

Frictionless TestabilityTight control over <markup>User/SEO friendly URLsLeverage the benefits of ASP.NETConventions and Guidance

Page 13: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.
Page 14: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Separation of ConcernsEach component has one responsibility

SRP – Single Responsibility PrincipleDRY – Don’t Repeat Yourself

More easily testable (TDD)Helps with concurrent development

Page 15: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

TLAs!

Page 16: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Clean URLsREST-like

/products/update/blog/posts/2008/08/12/mvc-is-cool

Friendlier to humansHack /product.aspx?categoryid=123 to becomeBecomes /products/kittens/

Friendlier to web crawlersSearch engine optimization (SEO)

Page 17: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

ExtensibleReplace any component of the system

Interface-based architectureVery few sealed methods / classes

Plays well with others

Page 18: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

"Webby"

Supports PRG (Post-Redirect-Get) Pattern

Page 19: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

HaackOverflow

demo

Page 20: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Experiments in TransparencyHeavy community involvement

ForumsTwitter, Blogs, CodePlex

Trying out new ideasFunctional project templateIncludes unit tests and source on CodePlex

Page 21: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Experiments in AgilityDaily Triage Meetings and weekly design meetings94% Code Coverage/1209 unit testsShip early and often

Page 22: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

The Road to RTM

Dec CTP 2007

Previews 2, 2.5, 3, 4, 5

BETA

RC 1RC 2

RTM!March 17 2009

Wow! 10 Releases!

Page 23: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

ASP.NET>

MVCWeb Forms

Page 24: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Choosing Between MVC and WebForms

WebForms• Control ecosystem• State management• Design time support

ASP.NET• Services• Caching• Routing• Localization

MVC• Do it yourself• Separation of concerns•TDD• Extensibility everywhere

More control over details

Ready-to-use building blocks

Or…

Page 25: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Use Them Both!

Page 26: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

SummaryNot a replacement for WebForms

All about alternativesExtensible

As simple or complex as it needs to be to suit your tasks

FundamentalPart of the System.Web namespaceIt’s still ASP.NET under the hood!

Page 27: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

ResourcesASP.NET MVC - http://asp.net/mvc/ASP.NET on CodePlex - http://codeplex.com/aspnet/

ASP.NET MVC E-Book - http://bit.ly/mvc-ebook

Page 28: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Shameless Book Plug

1st Chapter Free! http://bit.ly/mvc-ebook

Page 29: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Extended Forehead Edition!

Page 30: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Please Complete an Evaluation FormYour feedback is important!

Evaluation forms can be found on each chairTemp Staff at the back of the room have additional evaluation form copies

Page 31: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

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

Page 32: Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.

Recommended