Download - Introduction to asp.net mvc
Session Objectives
• What is ASP.NET MVC?
• What is MVC?
• Is it deprecating WebForms?
• What are its value propositions?
• Is ASP.NET MVC right for you?
• Can it ease some web development pain you’re currently having?
Takeaways
ASP.NET Then…
Caching Modules
HandlersIntrinsics
Pages Controls
Globalization
Profile
Master Pages
MembershipRoles
Etc.
ASP.NET
One web applicationframework to rule them all…
ASP.NET Now…
ASP.NETDynamic Data
ASP.NETWebForms
ASP.NETMVC
Presentation
RuntimeASP.NET
Core
WebForms is great, but options
are good…
Master Page
Control
Control
No real role responsibility…
UIPresentation LogicBusiness LogicData Access
Who does what?How and when?
Control
ControlPage
Control
Control
Control
Control
Control abstractions can be negative…
It isn't easy enough to test…
Logic UI
So how does ASP.NET MVC
differ?
MVC = Model-View-Controller
Controller(Input)
Model(Logic)
View(Presentation)
Separation of concerns!
How does MVC look?
Request
View
Controller
Response
ControllerHandles input(HTTP requests)
ViewVisually representsthe model
File | New
What are the tenets of ASP.NET
MVC?
Framework Goals
Frictionless Testability
Tight control over <markup>
Leverage the benefits of ASP.NET
Conventions and guidance
…
Clean URLs
Don’t settle for…
/Products.aspx?CategoryID=123
When you can easily have…
/Product/Puppies
Or whatever else makes sense…
Extensibility
ControllerBuilder
ControllerFactory
Controller
ViewEngine
View
ControllerActionInvoker
ActionResult
ActionFilters
Model Binders
Any of this can be replaced!
MVC Development
Summary
• ASP.NET MVC is a new application option built on top of ASP.NET
• WebForms isn’t being deprecated
• ASP.NET MVC strives to provide strong, frictionless testability
• It places a lot of the control in your hands