2. MVC Architecture
M, V and C
Separation of Concerns
.NET MVC Framework
Demo
4/9/2014Infobest Romania
Create a project.How is it configured by default?
Model, View Controller
Razor
Routing
Friendly URLs
Test driven dev
Bundling
Minification
Validation
Forms
Send data to controller from view
Form security
4. Players
Controller: - Handles a request from a View and updates the Model
that results in a change of the Model's state.
- Sends Data to View
Model: The business entity on which the overall application
operates. Many applications use a persistent storage mechanism
(such as a database) to store data. MVC does not specifically
mention the data access layer because it is understood to be
encapsulated by the Model.
View: The user interface that renders the Model into a form of
interaction.
4/9/2014Infobest Romania
5. To implement MVC in .NET we need mainly
three classes (View, Controller and the Model).
4/9/2014Infobest Romania
6. The process of breaking a computer program into
distinct features that overlap in functionality as
little as possible
MVC design pattern aims to separate content from
presentation and data-processing from content.
Theoretically sound, but where do we see this in
MVC? One place is reasonably clear - between the
data-processing (Model) and the rest of the
application.
4/9/2014Infobest Romania
11. Create a project.How is it configured by default?
Model, View Controller
Razor
Routing
Friendly URLs
Test driven dev
Bundling
Minification
Validation
Forms
Send data to controller from view
Form security
4/9/2014Infobest Romania
19. ”In addition, the facility exists to optimise
(minify) the CSS and Script files for release
builds, whilst at the same time providing
normal scripts for debugging the web
application.”
http://johnnewcombe.net/blog/post/4
4/9/2014Infobest Romania