Upload
shravan-kumar-kasagoni
View
3.787
Download
4
Embed Size (px)
DESCRIPTION
Citation preview
ASP.NET MVCfor Beginners
Shravan Kumar
Thomson Reuters
Walk Away Knowing
Introduction to ASP.NET MVC
Problems with ASP.NET
What is ASP.NET?
Caching Modules
HandlersIntrinsics
Pages Controls
Globalization
Profile
Master Pages
MembershipRoles
Etc...
ASP.NET
One web applicationframework to rule them all…
ASP.NET CORE Runtime
ASP.NET WebForms Presentation
Are you happy with
ASP.NET?
WebForms is great, But it does have some weaknesses
No real role responsibility…
Who does what?How and when?
Master Page
Control
Control
UIPresentation LogicBusiness LogicData Access
Control
ControlPage
Control
Control
Control
Control
Control abstractions can be negative…
Logic UI
It isn’t easy enough to test
How does ASP.NET MVC Differ?
A new Web Application Project type
Not a replacement for WebForms -Builds on top of ASP.NET
Simply an another option
Presentation
ASP.NET CORE Runtime
Now ASP.NET
ASP.NET WebFor
ms
ASP.NETMVC
What is MVC?
A design pattern
Separation of concerns
Acronym for Model ● View ● Controller
Separation of Concerns
SRP – Single Responsibility PrincipleDRY – Don’t Repeat Yourself
More easily testable (TDD)
Helps with concurrent development
MVC
Model
ControllerView
Framework Goals
Frictionless Testability Tight control over <markup/>
User/SEO friendly URLs
Leverage the benefits of ASP.NET
Conventions and Guidance
Clean URLs
REST-like
/products/update
/blog/posts/2008/08/12/mvc-is-cool
Friendlier to humans
/product.aspx?categoryid=123 to become
Becomes /products/kittens/
Friendlier to web crawlers
Search engine optimization (SEO)
Extensible
Replace any component of the system Interface-based architectureVery few sealed methods / classes
Plays well with others
What is MVC?
Step 1Incoming request routed to Controller
Request
Controller
What is MVC?
Step 2Controller processes request and creates presentation
Model
Controller
Model
What is MVC?
Step 3Model is passed to View
Controller
View
What is MVC?
Step 4View transforms Model into appropriate output format
Controller
View
What is MVC?
Step 5Response is rendered
Response
Controller
View
DEMO – ASP.NET MVC
It’s Question Time!