ASP.NET MVC<br />Scott Guthrie<br />Corporate Vice President<br />Developer Division – Microsoft<br />scottgu@microsoft.co...
All in the Family<br />ASP.NET<br />Dynamic Data <br />& AJAX<br />Presentation<br />ASP.NET<br />WebForms<br />ASP.NET<br...
ASP.NET MVC<br />More control over your &lt;html/&gt;<br />Intuitive website URLs<br />Client side JavaScript integration<...
ASP.NET WebForms 4 improvements…<br />Client ID control<br />Granular viewstate control<br />Routing integration<br />CSS ...
www.asp.net/mvc<br />
File-&gt;New Project<br />Code<br />
ASP.NET MVC maps incoming URLs to <br />Action methods on Controller classes<br />
SimpleController<br />Code<br />
“Separation of Concerns”<br />
Controllerscanpass data to View templatesto render a response back to a client<br />
Using a View Template<br />Code<br />
Model refers to the objects that represent the data of the application and the corresponding validation and domain logic<b...
Create a ModelImplement ProductsController<br />Code<br />
Routes rules enable flexible publishing of SEO URLs <br />
Custom Route Rule<br />Code<br />
A service layer can help encapsulate an application’s business logic and data operations<br />
Service Layer<br />Code<br />
CRUD = Create, Read, Update and Delete<br />
CRUD<br />Code<br />
“Skinny Controllers”<br />with “Fat Models”<br />
Validation<br />Code<br />
Action Filters support declaratively applying re-usable logic to controllers and action methods<br />
[Authorize] Filter<br />Code<br />
Automated Unit Tests enable coding with confidence<br />
Unit Testing (Part 1)<br />Code<br />
Dependency Injection:“Don’t call us, we’ll call you”<br />
Unit Testing (Part 2):No database required<br />Code<br />
Summary<br />More control over your &lt;html/&gt;<br />Intuitive website URLs<br />Client side JavaScript integration<br /...
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be...
Upcoming SlideShare
Loading in...5
×

ASP.NET MVC Reading July 2009

1,708

Published on

ASP.NET MVC presentation given by Scott Guthrie at Vista Squad user group meeting at Microsoft UK on 3rd July 2009

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,708
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

ASP.NET MVC Reading July 2009

  1. 1. ASP.NET MVC<br />Scott Guthrie<br />Corporate Vice President<br />Developer Division – Microsoft<br />scottgu@microsoft.com<br />http://weblogs.asp.net/scottgu<br />
  2. 2. All in the Family<br />ASP.NET<br />Dynamic Data <br />& AJAX<br />Presentation<br />ASP.NET<br />WebForms<br />ASP.NET<br />MVC<br />ASP.NET<br />Core<br />Core <br />Runtime<br />
  3. 3. ASP.NET MVC<br />More control over your &lt;html/&gt;<br />Intuitive website URLs<br />Client side JavaScript integration<br />Testability and TDD support<br />Not for everyone<br />Manual vs. automatic transmission<br />
  4. 4. ASP.NET WebForms 4 improvements…<br />Client ID control<br />Granular viewstate control<br />Routing integration<br />CSS based rendering<br />Databinding improvements<br />Control enhancements<br />Much more<br />http://www.asp.net/learn/whitepapers/aspnet40<br />
  5. 5. www.asp.net/mvc<br />
  6. 6. File-&gt;New Project<br />Code<br />
  7. 7. ASP.NET MVC maps incoming URLs to <br />Action methods on Controller classes<br />
  8. 8. SimpleController<br />Code<br />
  9. 9. “Separation of Concerns”<br />
  10. 10. Controllerscanpass data to View templatesto render a response back to a client<br />
  11. 11. Using a View Template<br />Code<br />
  12. 12. Model refers to the objects that represent the data of the application and the corresponding validation and domain logic<br />
  13. 13. Create a ModelImplement ProductsController<br />Code<br />
  14. 14. Routes rules enable flexible publishing of SEO URLs <br />
  15. 15. Custom Route Rule<br />Code<br />
  16. 16. A service layer can help encapsulate an application’s business logic and data operations<br />
  17. 17. Service Layer<br />Code<br />
  18. 18. CRUD = Create, Read, Update and Delete<br />
  19. 19. CRUD<br />Code<br />
  20. 20. “Skinny Controllers”<br />with “Fat Models”<br />
  21. 21. Validation<br />Code<br />
  22. 22. Action Filters support declaratively applying re-usable logic to controllers and action methods<br />
  23. 23. [Authorize] Filter<br />Code<br />
  24. 24. Automated Unit Tests enable coding with confidence<br />
  25. 25. Unit Testing (Part 1)<br />Code<br />
  26. 26. Dependency Injection:“Don’t call us, we’ll call you”<br />
  27. 27. Unit Testing (Part 2):No database required<br />Code<br />
  28. 28. Summary<br />More control over your &lt;html/&gt;<br />Intuitive website URLs<br />Client side JavaScript integration<br />Testability and TDD support<br />Works with VS 2008 and .NET 3.5 today<br />Will be a built-in option with VS 2010<br />Visit http://www.asp.net/mvc to learn more<br />
  29. 29. © 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.<br />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.<br />

×