Introduction to ASP.NET MVCEng. KhaledMusaiedOct 2010
AgendaWhat is ASP.NET MVC?ASP.NET MVC Power.ASP.NET Web Forms vs. ASP.NET MVCASP.NET MVC Parts:ModelControllerViewRouter
What is ASP.NET MVC?New Web Application (Presentation Layer).Based on Model-View-Controller Design Pattern.
ASP.NET MVC PowerComplete control on HTML.Smooth Web 2.0 Development .SEO-friendly URLs.Easy Test Driven Development (TDD).Stateless.
ASP.NET Web Forms vs. ASP.NET MVCASP.NET Web Forms Advantages:Fast Development.Windows Application Development Experience.Event Driven.View State.Web Controls.Disadvantages:Hard to Control HTML.Unfriendly URLs.Single “Form” tag in single page.
ASP.NET Web Forms vs. ASP.NET MVCASP.NET MVCAdvantages:Model-View-Controller Design Pattern.Web Application Development Experience.Easy to control HTML.Friendly URLs (SEO).Disadvantages:Stateless. More Development Time.
ASP.NET MVC PartsModel ( Data Object).Controller (Control Application Actions).View (Renders HTML).Router (URL Mapping).
Model
Controller
View
View output (Web Forms)
View output (MVC)Clean HTML
Routershttp://yoursite.com/Security/LoginDefault Valuehttp://yoursite.com/Loginhttp://yoursite.com/Products/Details/58URLhttp://yoursite.com/Products/58Regular Expressionhttp://yoursite.com/Customers/Details.aspx?id=21http://yoursite.com/Customers/Details/21
DemosHello World Demo.Single Form Demo.Two Forms Demo.JavaScript Demo.Routers Demo.
Th@nk$Q / A

Introduction to ASP.NET MVC