1 / 32

top model

AMERICA’S NEXT. top model . view controller. Phil Haack Senior Program Manager Microsoft Corporation. Objectives and Takeaways What’s in it for you?. Session Objectives Introduce you to this crazy new MVC thing Convince you that it’s not as crazy as it seems Not bore you to sleep

affrica
Download Presentation

top model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AMERICA’S NEXT top model view controller Phil Haack Senior Program Manager Microsoft Corporation

  2. Objectives and TakeawaysWhat’s in it for you? • Session Objectives • Introduce you to this crazy new MVC thing • Convince you that it’s not as crazy as it seems • Not bore you to sleep • Key Takeaways • ASP.NET MVC puts you in full control • Excitement about ASP.NET MVC • Lack of Sleep

  3. Urban Myth Point of Clarification ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In

  4. What is ASP.NET MVC?I ask myself this every night • A new Web Application Project type • Simply an option • Not a replacement for WebForms • Builds on top ASP.NET • Manual vs Automatic Transmission

  5. demo File | New

  6. What is MVC? • A design pattern • Acronym for Model ● View ● Controller • Separation of concerns

  7. What is MVC? Step 1 Incoming request routed to Controller Controller Request

  8. What is MVC? Step 2 Controller processes request and creates presentation Model Controller Model

  9. What is MVC? Step 3 Model is passed to View Controller View

  10. What is MVC? Step 4 View transforms Model into appropriate output format Controller View

  11. What is MVC? Step 5 Response is rendered Controller View Response

  12. Framework Goals • Frictionless Testability • Tight control over <markup> • User/SEO friendly URLs • Leverage the benefits of ASP.NET • Conventions and Guidance

  13. Separation of Concerns • Each component has one responsibility • SRP – Single Responsibility Principle • DRY – Don’t Repeat Yourself • More easily testable (TDD) • Helps with concurrent development

  14. TLAs!

  15. Clean URLs • REST-like • /products/update • /blog/posts/2008/08/12/mvc-is-cool • Friendlier to humans • Hack /product.aspx?categoryid=123 to become • Becomes /products/kittens/ • Friendlier to web crawlers • Search engine optimization (SEO)

  16. Extensible • Replace any component of the system • Interface-based architecture • Very few sealed methods / classes • Plays well with others

  17. "Webby" Supports PRG (Post-Redirect-Get) Pattern 

  18. demo HaackOverflow

  19. Experiments in Transparency • Heavy community involvement • Forums • Twitter, Blogs, CodePlex • Trying out new ideas • Functional project template • Includes unit tests and source on CodePlex

  20. Experiments in Agility • Daily Triage Meetings and weekly design meetings • 94% Code Coverage/1209 unit tests • Ship early and often

  21. The Road to RTM Wow! 10 Releases!

  22. ASP.NET • > MVC Web Forms

  23. Choosing Between MVC and WebForms More control over details Or… • MVC • Do it yourself • Separation of concerns • TDD • Extensibility everywhere • WebForms • Control ecosystem • State management • Design time support • ASP.NET • Services • Caching • Routing • Localization Ready-to-use building blocks

  24. Use Them Both!

  25. Summary • Not a replacement for WebForms • All about alternatives • Extensible • As simple or complex as it needs to be to suit your tasks • Fundamental • Part of the System.Web namespace • It’s still ASP.NET under the hood!

  26. Resources • ASP.NET MVC - http://asp.net/mvc/ • ASP.NET on CodePlex - http://codeplex.com/aspnet/ • ASP.NET MVC E-Book - http://bit.ly/mvc-ebook

  27. Shameless Book Plug 1st Chapter Free! http://bit.ly/mvc-ebook

  28. Extended Forehead Edition!

  29. Please Complete an Evaluation FormYour feedback is important! • Evaluation forms can be found on each chair • Temp Staff at the back of the room have additional evaluation form copies

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

More Related