Download presentation
Presentation is loading. Please wait.
1
ASP.NET MVC Web Development
Getting Started |
2
Model-View-Controller
The MVC Pattern Model-View-Controller Model: data / business rules View: application UI Controller: communication, flow, application-specific logic
3
The MVC Pattern Model-View-Controller Video: The MVC mindset
4
MVC applied to Web Frameworks
Models: encapsulated data stored in database. F.e. via Entity Framework View: template to dynamically generate HTML Controller: manages relationship between view and model. Responds to user input, talk to model, decides which view to render
5
ASP.NET MVC specific principles
Convention over configuration DRY principle (Don’t repeat yourself) Pluggability Be helpful, but stay out of developers way
6
ASP.NET MVC 5 overview One ASP.NET Bootstrap templates
ASP.NET Scaffolding
7
MVC application structure
8
MVC application structure 1/2
DIRECTORY PURPOSE /Controllers Where you put Controller classes that handle URL requests /Models Where you put classes that represent and manipulate data and business objects /Views Where you put UI template fi les that are responsible for rendering output, such as HTML /Scripts Where you put JavaScript library files and scripts (.js)
9
MVC application structure 2/2
DIRECTORY PURPOSE /fonts The Bootstrap template system includes some custom web fonts, which are placed in this directory /Content Where you put CSS, images, and other site content, other than scripts /App_Data Where you store data files you want to read/write /App_Start Where you put configuration code for features like Routing, bundling, and Web API
10
Convention over configuration
ASP.NET MVC’s conventions: Each controller’s class name ends with Controller and lives in the Controllers directory. There is a single Views directory for all the views of your application. Views that controllers use live in a subdirectory of the Views main directory and are named according to the controller name.
11
School/huiswerk Voor de volgende les: Vragen?
Doorlezen hoofdstuk 1: getting started Vragen?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.