MVC 5 Intro PDF
MVC 5 Intro PDF
ASP.NET MVC 5
- Day 1
By
I. Sekhar Srinivasan ( MCT )
Email Id :
sekharonline4u@gmail.com
Facebook :
http://facebook.com/sekharonline
YouTube :
http://youtube.com/sekharonline4u
Website:
www.sekhartheguru.net
Agenda
Introduction to ASP.NET MVC
Getting Started
Creating an Application in ASP.NET MVC
Working with Controllers in ASP.NET MVC
Understanding Razor View Engine
Understanding Bootstrap 3 usage in MVC
Build on ASP.NET
Scalable
Extensible
Testable
History of MVC
Introduced by TrygveReenskaug in 1979.
First used in SmallTalk 80.
MVC is also used by:
1.0
( 2009 )
Model Level
Validations using
Validation
Attributes
Lambda
Expressions in
HTML Helpers
2.0
( 2010 )
Razor Engine
View
Remote
Validations
Global Action
Filters
Dependency
Resolvers
Project Templates
3.0
( 2011 )
Attribute Based
Web API
Bundles and
Minification
Jquery Mobile
Integration
Open
Authentications
Routing
Async. Model
Web API 2
Bootstrap
Signal R
SPA
4.0
( 2012 )
5.0
( 2013 )
To use MVC4:
Install "ASP.NETMVC4forVisualStudio2010SP1"
ONE ASP.NET
Sites
Web Forms
Web Pages
Services
Single
Page
Apps
ASP.NET
MVC
Web API
Signal R
Model
View
Controller
Step 1
Incoming request directed to Controller
Controller
Model
Step 2
Controller processes request and forms a data Model
View
Step 3
Model is passed to View
View
Step 4
View transforms Model into appropriate output format
View
Step 5
Response is rendered
Response
Requests
Slow
Slow
Slow
Slow
Thread Pool
Busy
Busy
Busy
Busy
Requests
Slow
Thread Pool
Web Forms
Understanding Controllers
It is a class which is used to accept the request from the user and
provide the response to the user.
Action
Results
Routing
Controllers
Action
Action
Filters
Action
Parameters
Controllers Actions
Actions are the ultimate request destination Public controller
methods
Non-static
No return value restrictions
Action Parameters
Actions can take a variety of parameters Primitive parameters (int,
bool, string)
Complex parameters
Model Binder looks for parameter values In route data
In form data
In query string
Results
Actions typically return an ActionResult
Action Selectors
ActionName
AcceptVerbs HttpPost, HttpGet
Action Filters
HTTP
Routing
Http
Handler
Route
Route
Handler
Controller
Response
View
Engine
View
Demos
Different Sizes !
Different Resolutions !
Extremely Small
Devices
Phones(<768px)
col-xs-X
Small Devices
Tablets(768px)
Medium Devices
Desktops
(992px)
Large Devices
Desktops
(1200px)
col-sm-X
col-md-X
col-lg-X
10
11
Col-md-12
Col-md-6
Col-md-8
col-md-3
col-md-offset-3
Col-md-12col-md-offset-1
Col-md-6
col-md-3
col-md-offset-3
Col-md-8
Col-md-4
Col-md-6
Col-md-4
col-md-3
col-md-offset-1
12
Col-xs-X
Col-md-X
Col-sm-X
10
11
12
Col-md-4 col-xs-6
Demos
Questions?
By
Sekhar Srinivasan ( MCT )
Email Id :
sekharonline4u@gmail.com
Facebook :
http://facebook.com/sekharonline
YouTube :
http://youtube.com/sekharonline4u
Website:
www.sekhartheguru.net