0% found this document useful (0 votes)
3 views

AWD-Lecture

ASPNET

Uploaded by

hayatsafi077
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

AWD-Lecture

ASPNET

Uploaded by

hayatsafi077
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

MVC Introduction

Nangarhar University Computer Science Faculty –(NUCSF) 1401/11/13


Outlines
1. What is MVC Design Pattern?
2. Model
3. MVC
4. Controller
5. Advantages
6. Disadvantages
What is MVC ?
➢ The Model View Controller (MVC) design pattern specifies
that an application consist of a data model, presentation
information, and control information.
➢ The pattern requires that each of these be separated into
different objects.
➢ MVC is more of an architectural pattern, but not for complete
application.
➢ MVC mostly relates to the UI / interaction layer of an
application.
➢ You’re still going to need business logic layer, maybe some
service layer and data access layer.
What is MVC ?
Model
• The Model contains only the pure application data, it contains
no logic describing how to present the data to a user.

• (Its just a data that is shipped across the application like for
example from back-end server view and from front-end view to
the database.
View
• The View presents the model’s data to the user.
• The view knows how to access the model’s data, but it does not
know what this data means or what the user can do to
manipulate it.
• View just represent, displays the application’s data on screen.
• View page are generally in the format of .html
Controller
➢The Controller exists between the view and the model.
➢ It is where the actual business logic is written.
➢It listens to events triggered by the view (or another external
source) and executes the appropriate reaction to these events.
➢ In most cases, the reaction is to call a method on the model.
Since the view and the model are connected through a
notification mechanism, the result of this action is then
automatically reflected in the view.
Advantages

• Multiple developers can work simultaneously on the model,


controller and views.
• MVC enables logical grouping of related actions on a controller
together. The views for a specific model are also grouped
together.
• Models can have multiple views.
• The overall components of an application are easily
manageable & are less dependent on each other for proper
functioning of application.
Disadvantages

• The framework navigation can be complex because it


introduces new layers of abstraction and requires users to
adapt to the decomposition criteria of MVC.
• Knowledge on multiple technologies becomes the norm.
Developers using MVC need to be skilled in multiple
technologies.
Its your turn to ask about today’s lecture

You might also like