Head First ASP.Net MVC 2.0Zhiming JiangMSN GMD Integration
TOPICReviewGetting started with ASP.NET MVCUnderstanding ASP.NET MVCCustomizing and ExtendingBest PracticesMVC 2.0 New Features
reviewThe way of ASP.NET MVC
The Downside of ASP.NETVery complex page pipeline engineDifficult to maintain Impossible to testDifficulty partially arises from simulating Context, Request, Response, and Session objects.The cryptic control ids and sensitivities of ViewStateOverly mix business and presentation logicEvent-driven model
Innovation!
MVC FrameworkHistoryBased on Python1970S….2003 RoR{ ASP.NET MVC }2009.3 MVC1 2010.4 MVC2
ASP.NET MVCIS……New ASP.NET application development styleAnother is“ASP.NET Web Form”Fill the gaps of ASP.NET WebFormNew choiceFull control over URLsFull control over HTMLEasier to test (TDD) Flexible, extendable, easily replaced
ASP.NETMVCIS NOT……The substitute of 3-tier structureASP.NET WebForm’ssubstitute ASP.NET Web Formpromotion versionASP.NET Web Form 4.0Fit RADFit every projectFit everyone
Different Between with Web Form
Getting started with ASP.NET MVCASP.NET MVC101
ASP.NET MVCFramework StructureASP.NET Abstractions(System.Web.Abstractions.dll)ASP.NET Routing(System.Web.Routing.dll)ASP.NET MVC(System.Web.Mvc.dll)
But what is the work process?但是具体的流程是什么样?
Classic Application ArchitectureMvcDemo.Web.UIMvcDemo.ModelsPresentationMvcDemo.Web.ControllersBizServiceMvcDemo.BusinessDataAccessResponsityMvcDemo.Data
ASP.NETMVCExcute Process
Understanding ASP.NET MVCUnderstanding Models, Views, and Controllers
ASP.NET RoutingURL PatternsSetting Default Values for URL ParametersAdding Constraints to RoutesScenarios When Routing Is Not AppliedHow URLs Are Matched to RoutesAccessing URL Parameters in a Routed PageASP.NET Routing and SecurityASP.NET Routing versus URL Rewriting
Working with ModelsWhat’s ModelValidation
Controllers & ActionReceiving inputQueryString, Request.Form, FormCollection, Custome(IModelBinding)FilterAysncactionProducing outputAction Result, View Data, View ModelHow definesEnd with the word ControllerInherit from System.Web.Mvc.Controller (or implement IcontrollerContain public methods that return ActionResult
Filtering Action Methods
Working with ViewsView EngineView PageView DataView HelperForm PostUsing MasterPageOrder
Customizing and ExtendingMVC Custom and Extensions
Customizing & ExtendingExtending URL RoutingCustomer ControllerFactoryExtending Controller & ActionCustom View EngineT4 Template
Best PracticesTruth in Practice
Best PracticesSecuring MVC applications
Dependency Injection of Controllers
Using RESTfulArchitecture
Handling errors in MVC applications
Unit Test & MVC Mock Helpers
Using AJAX in ASP.NET MVC applications
Improving ASP.NET MVC application performance

Head first asp.net mvc 2.0 rtt