2. MVC pattern overview
Is an architectural pattern that separates an application into three main components: the model, the view, and the
controller
3. MVC pattern advantages
• Managing complexity is easy
• Convention over configuration
• No view state
• Full control over the behavior of the application
• Better support of TDD
4. ASP.NET MVC
The ASP.NET MVC framework is a lightweight, highly testable presentation
framework that (as with Web Forms-based applications) is integrated with
existing ASP.NET features, such as master pages and membership-based
authentication. The MVC framework is defined in the System.Web.Mvc assembly
7. ASP.NET MVC vs. ASP.NET Web Forms
MVC
Web Forms
Easy TDD
Difficult TDD
Front Controller
Page Controller
No ViewState
ViewState
Large teams
Small teams
Full behavior Control
Rapid development
8. ASP.NET MVC4 new features
• ASP.NET web API
• Project templates enhancements
• Mobile project template
• Display modes
• JQuery mobile and View switcher
• Bundling and minification
• OAuth, OpenID
9. Creating ASP.NET MVC applications
Visual Studio 2012 supports MVC 4 and 3 web application projects
10. ASP.NET MVC4 project templates
Empty
Basic
Internet Application
Intranet Application
Mobile Application
Web API
Single Page Applications
Facebook application
11. ASP.NET MVC View Engines
View Engines are responsible for rendering the HTML from your views to the browser. The view engine template will have
different syntax for implementation. Currently there are few number of view engines available for MVC and the top four
view engines are Razor, traditional ASPX, Spark and Nhaml.
Razor is the best view engine. Uses @ for rendering HTML
Web forms engine uses <%%>
See the other view engines doc at
http://www.codeproject.com/Articles/467850/ASP-NET-MVC-view-engines
http://channel9.msdn.com/coding4fun/articles/Developer-Review-Four-ASPNET-MVC-View-Engines