Volodymyr Voytyshyn<br />08/27/2011<br />ASP.NET MVC<br />as the next stepin web development<br />
Goal<br />What is ASP.NET MVC?<br />
Contents<br /><ul><li>About MVC Pattern
ASP.NET Platform
Sample Application
ASP.NET MVC Project Concepts
ASP.NET MVC Key Features
MVC vsWebForms
Conclusion</li></li></ul><li>AboutMVC Pattern<br />
History of MVC Pattern<br />Concept of MVC is described in 1979 by TrygveReenskaug (Norway)<br />One of the first version ...
Main Idea of MVC<br />Separate view and data source<br />View<br />Model<br />Controller<br />
Classic MVC (Active Model)<br />View<br />Handle view events<br />Notify for Changes<br />Controller<br />Get data<br />Mo...
Classic MVC (Passive Model)<br />View<br />Handle view events<br />Notify for Changes<br />Get data<br />Controller<br />M...
MVP<br />View<br />Handle view events<br />Put data<br />Presenter<br />Update data<br />Get data<br />Model<br />Mediator...
MVP: Key Differences with Classic MVC<br />Presenter knows all about View<br />Presenter communicates with data source dir...
ASP.NET Platform<br />
ASP.NET Web Forms Key Versions<br />ASP.NET 4.0<br />2010<br />ASP.NET 3.5<br />2007<br />ASP.NET 2.0<br />2005<br />ASP.N...
ASP.NET MVC Key Versions<br />ASP.NET MVC 3<br />2011<br />ASP.NET MVC 2<br />2010<br />ASP.NET MVC 1<br />2009<br />ASP.N...
ASP.NET Components<br />Web Forms View Engine<br />Razor View Engine<br />ASP.NET <br />Web Forms<br />ASP.NET <br />MVC<b...
Sample Application<br />
Concept<br />Project name: “Easy Reporting”<br />Idea: time tracking system for developers<br />
Key Use Cases<br />
Components<br />
Basic Concepts of MVC Project<br />
Typical MVC Project Structure<br />
Simple Controller and Action<br />ProjectController.cs<br />Controller<br />Action<br />
Simple View<br />Index.cshtml<br />
Simple Client Page<br />
Mediator<br />MVC Implementation<br />Client<br />Controller<br />View<br />Action<br />Model<br />
ASP.NET MVC Key features<br />
Action Results<br />ActionResult – base class of result of an action<br />View<br />Redirect<br />JavaScript<br />Json<br ...
Action Filters<br />Filter types:<br />Authorization<br />Action<br />Result<br />Exception<br /><ul><li>Filter scope:
Action
Controller
Application</li></ul>Action Filter<br />Action<br />Standard filters:<br />Authorize<br />HttpGet<br />HttpPost<br />Outpu...
Action Filters: Example<br />ProjectController.cs<br />
View Engines Concept<br />Razor<br />ASP.NET MVC<br />*.aspx / *.ascx / *.master<br />Etc.<br />
Passing data into View<br />Action<br />View<br />Model<br />ViewData<br />ViewBag<br />TempData<br />
HTML Helpers<br />HTML Helper – “server control” in ASP.NET MVC<br />Classic HTML Helpers<br />Declarative HTML Helpers<br />
Partial Views<br />Partial view – “user control” in ASP.NET MVC<br />Footer.cshtml<br />_Layout.cshtml<br />Header.cshtml<...
Layout pages and sections<br />Layout page – “master page” in ASP.NET MVC<br />Section – “ContentPlaceHolder” in ASP.NET M...
Routing<br />Controller<br />Client<br />URL<br />Routing Engine<br />Action<br />Params<br />Default route - /controller/...
Dependency Injection<br />IServiceLocator<br />MvcServiceLocator<br />Setup<br />Controller Factory<br />Implement<br />Co...
Upcoming SlideShare
Loading in …5
×

SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web-програм"

2,008 views

Published on

Володимир Войтишин (м. Рівне)

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

  • Be the first to like this

No Downloads
Views
Total views
2,008
On SlideShare
0
From Embeds
0
Number of Embeds
379
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web-програм"

  1. 1. Volodymyr Voytyshyn<br />08/27/2011<br />ASP.NET MVC<br />as the next stepin web development<br />
  2. 2. Goal<br />What is ASP.NET MVC?<br />
  3. 3. Contents<br /><ul><li>About MVC Pattern
  4. 4. ASP.NET Platform
  5. 5. Sample Application
  6. 6. ASP.NET MVC Project Concepts
  7. 7. ASP.NET MVC Key Features
  8. 8. MVC vsWebForms
  9. 9. Conclusion</li></li></ul><li>AboutMVC Pattern<br />
  10. 10. History of MVC Pattern<br />Concept of MVC is described in 1979 by TrygveReenskaug (Norway)<br />One of the first version of MVC is implemented in Smalltallk-80 class library<br />
  11. 11. Main Idea of MVC<br />Separate view and data source<br />View<br />Model<br />Controller<br />
  12. 12. Classic MVC (Active Model)<br />View<br />Handle view events<br />Notify for Changes<br />Controller<br />Get data<br />Model<br />Update data<br />Data Source<br />Mediator<br />
  13. 13. Classic MVC (Passive Model)<br />View<br />Handle view events<br />Notify for Changes<br />Get data<br />Controller<br />Model<br />Update data<br />Data Source<br />Mediator<br />
  14. 14. MVP<br />View<br />Handle view events<br />Put data<br />Presenter<br />Update data<br />Get data<br />Model<br />Mediator<br />
  15. 15. MVP: Key Differences with Classic MVC<br />Presenter knows all about View<br />Presenter communicates with data source directly<br />Events in Model and View removed<br />Presenter implements main presentation logic<br />Presenter is mediator between Model and View<br />
  16. 16. ASP.NET Platform<br />
  17. 17. ASP.NET Web Forms Key Versions<br />ASP.NET 4.0<br />2010<br />ASP.NET 3.5<br />2007<br />ASP.NET 2.0<br />2005<br />ASP.NET 1.0<br />2002<br />ASP<br />1998<br />
  18. 18. ASP.NET MVC Key Versions<br />ASP.NET MVC 3<br />2011<br />ASP.NET MVC 2<br />2010<br />ASP.NET MVC 1<br />2009<br />ASP.NET<br />
  19. 19. ASP.NET Components<br />Web Forms View Engine<br />Razor View Engine<br />ASP.NET <br />Web Forms<br />ASP.NET <br />MVC<br />ASP.NET Core<br />Caching<br />Pages<br />Handlers<br />Roles<br />Modules<br />Controls<br />Profile<br />Security<br />Globalization<br />Master Pages<br />Membership<br />Etc.<br />
  20. 20. Sample Application<br />
  21. 21. Concept<br />Project name: “Easy Reporting”<br />Idea: time tracking system for developers<br />
  22. 22. Key Use Cases<br />
  23. 23. Components<br />
  24. 24. Basic Concepts of MVC Project<br />
  25. 25. Typical MVC Project Structure<br />
  26. 26. Simple Controller and Action<br />ProjectController.cs<br />Controller<br />Action<br />
  27. 27. Simple View<br />Index.cshtml<br />
  28. 28. Simple Client Page<br />
  29. 29. Mediator<br />MVC Implementation<br />Client<br />Controller<br />View<br />Action<br />Model<br />
  30. 30. ASP.NET MVC Key features<br />
  31. 31. Action Results<br />ActionResult – base class of result of an action<br />View<br />Redirect<br />JavaScript<br />Json<br />File<br />HTTP<br />Content<br />Empty<br />
  32. 32. Action Filters<br />Filter types:<br />Authorization<br />Action<br />Result<br />Exception<br /><ul><li>Filter scope:
  33. 33. Action
  34. 34. Controller
  35. 35. Application</li></ul>Action Filter<br />Action<br />Standard filters:<br />Authorize<br />HttpGet<br />HttpPost<br />OutputCache<br />HandleError<br />Action Filter<br />
  36. 36. Action Filters: Example<br />ProjectController.cs<br />
  37. 37. View Engines Concept<br />Razor<br />ASP.NET MVC<br />*.aspx / *.ascx / *.master<br />Etc.<br />
  38. 38. Passing data into View<br />Action<br />View<br />Model<br />ViewData<br />ViewBag<br />TempData<br />
  39. 39. HTML Helpers<br />HTML Helper – “server control” in ASP.NET MVC<br />Classic HTML Helpers<br />Declarative HTML Helpers<br />
  40. 40. Partial Views<br />Partial view – “user control” in ASP.NET MVC<br />Footer.cshtml<br />_Layout.cshtml<br />Header.cshtml<br />
  41. 41. Layout pages and sections<br />Layout page – “master page” in ASP.NET MVC<br />Section – “ContentPlaceHolder” in ASP.NET MVC<br />
  42. 42. Routing<br />Controller<br />Client<br />URL<br />Routing Engine<br />Action<br />Params<br />Default route - /controller/action/id<br />
  43. 43. Dependency Injection<br />IServiceLocator<br />MvcServiceLocator<br />Setup<br />Controller Factory<br />Implement<br />Controller<br />Service Locator Implementation<br />Instantiate<br />Action Filter<br />View<br />
  44. 44. Unit Testing<br />TestableApplication<br />UsingInversion of Control principle<br />Can be tested:<br />Controllers<br />Routes<br />Html helpers<br />UI Models<br />View logic<br />Etc.<br />
  45. 45. MVC Control Libraries<br />Client Side Controls<br />JQuery IU<br />DOJO<br />Etc.<br />Server Side Controls<br />Telerik<br />DevExpress<br />Etc.<br />
  46. 46. MVC VS WebForms<br />
  47. 47. When we do not need MVC?<br />I need MVC, because<br />… it is better than Web Forms<br />… it implements MVC architecture<br />… I want to escape from view state<br />… I donot want automatically generated id in HTML<br />… I want to get full control over HTML<br />… I want more friendly URLs<br />
  48. 48. MVC Benefits<br />Automated testing <br />Powerful AJAX client side<br />Flexibility, extensibility, clarity<br />Easy of learning and easy of using<br />Clearly separated client side and server side<br />
  49. 49. MVC Disadvantages<br />Speed of development (particularly in early stages)<br />… but you can win when you make changes in finished product<br />
  50. 50. Conclusion<br />ASP.NET MVC<br />Convenient<br />Easier<br />Clearer<br />Faster<br />
  51. 51. Volodymyr Voytyshyn<br />5 KnyahyniOlhy Str., Rivne 33000, Ukraine<br />Tel: +38(066) 41 83 509<br />E-mail: vvoit@softserveinc.com<br />voytyshyn@gmail.com<br />Skype: voytyshin<br />Thank You!<br />Copyright ©2011 SoftServe, Inc.<br />Contacts<br />

×