asp.net mvc for smart people
DESCRIPTION
ASP.NET MVC For Smart People. Scott Galloway, Program Manager, ASP.NET Microsoft Corporation [email protected] http://www.mostlylucid.net http://www.twitter.com/scottgal. What is ASP.NET MVC?. A new Web Application Project type Simply an option Not a replacement for WebForms - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/1.jpg)
ASP.NET MVC For Smart PeopleScott Galloway, Program Manager, ASP.NETMicrosoft [email protected]://www.mostlylucid.nethttp://www.twitter.com/scottgal
![Page 2: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/2.jpg)
What is ASP.NET MVC?
• A new Web Application Project type• Simply an option• Not a replacement for WebForms• Builds on top ASP.NET• Manual vs Automatic Transmission
![Page 3: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/3.jpg)
How was it developed?• Transparently• Regular source code releases on CodePlex• Previews 1 – 5, Beta, RC1, RC2. 8 releases!• Community feedback via forums,
StackOverflow, etc…• Agilely• 94% Code Coverage/1051 unit tests• Daily Triage Meetings and weekly design
meetings• Small agile team
![Page 4: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/4.jpg)
What is MVC?
• A design pattern• Acronym for
Model ● View ● Controller• Separation of concerns
![Page 5: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/5.jpg)
What is MVC?
Step 1Incoming request directed to Controller
Request
Controller
![Page 6: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/6.jpg)
What is MVC?
Step 2Controller processes request and forms a data Model
Controller
Model
![Page 7: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/7.jpg)
What is MVC?
Step 3Model is passed to View
Controller
View
![Page 8: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/8.jpg)
What is MVC?
Step 4View transforms Model into appropriate output format
Controller
View
![Page 9: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/9.jpg)
What is MVC?
Step 5Response is rendered
Response
Controller
View
![Page 10: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/10.jpg)
Demo File->New
![Page 11: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/11.jpg)
Framework Goals
• Frictionless Testability• Tight control over markup• User/SEO friendly URLs• Leverage the benefits of ASP.NET• Conventions and Guidance
![Page 12: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/12.jpg)
Separation Of Concerns
• Each component has one responsibility• SRP – Single Responsibility Principle• DRY – Don’t Repeat Yourself
• More easily testable• Helps with concurrent
development
![Page 13: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/13.jpg)
Extensible
• Replace any component of the system• Interface-based architecture• Very few sealed methods / classes
• Plays well with others
![Page 14: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/14.jpg)
WebForms are great …
• Mature, proven technology• Huge Third Party Control
Ecosystem• Scalable• Extensible• Familiar feel to WinForms
developers
![Page 15: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/15.jpg)
… they have problems
• Abstractions aren’t very abstract• Difficult to test• Lack of control over markup• It does things you didn’t tell it to
do
![Page 16: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/16.jpg)
Demo A real app (kind of)
![Page 17: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/17.jpg)
Resources• Phil Haack’s blog:
www.haacked.com• ASP.NET MVC Site:
www.asp.net/mvc• Scott Guthrie’s blog:
weblogs.asp.net/scottgu• Rob Conery’s blog:
blog.wekeroad.com/
![Page 18: ASP.NET MVC For Smart People](https://reader035.vdocuments.site/reader035/viewer/2022062222/56816364550346895dd438b6/html5/thumbnails/18.jpg)