You are on page 1of 4

MODEL VIEW CONTROLLER

★ Model View Controller


In MVC pattern an interactive application is divided into three parts:
● the model contains the core functionality and data,
● the view displays the information to the user (more than one view may be defined),
● the controller handles the input from the user.

Components:-
1) Model: All the data-related functionality that the user engages with is represented
by the Model component. This can be the data being transmitted between the View
and the Controller components or any other data related to business logic. A
customer object, for example, will take customer information from a database,
change it, and then either update it back to the database or utilise it to render data.

The Model component will be the database of the system with all information
regarding the USER and SOFTWARE.

2) VIEW: All the applications UI functionality is handled by the view component. The
customer view, for example, will comprise the UI components that the final user
interacts with, such as text boxes, drop-downs, menus, etc.

The UI of the system can be defined by the View Component of the


Architectural Style. It holds the text boxes, forms, buttons which the user can
interact with the system.

3) Controller: Serves as the link between Model and View Components, processing
all the business logic and incoming requests, manipulating data using Model, and
interacting with the views to produce the final output. The customer controller, for
example, will handle all interactions and inputs from the customer view and use the
customer model to update the database.

Taking the user details from the database and allowing the user to upload the
data will be handled by the controller component of MVC. It handles all the
business logic.
Connectors:

Connectors in MVC are represented by arrows where each arrow is an


interaction/request/event performed between various components connected with
the connector. The arrows represent a direct association.

TOPOLOGY:-

Semantics:
For a client to access a database, instead of directly interacting he/she sends
requests to the server. The server consists of 3 main components namely
Model, View and Controller, hence named as MVC.
1. The client sends a request to the server which is handled by the controller
component. It mediates between the view and the model.
2. View is the UI which the user sees and interacts with.
3. Controller sends the request to the model which the Model executes.
Description:
Model-View-Controller is a software design pattern that splits related program
logic into 3 interrelated pieces and is often used for building user interfaces.
This is done to distinguish internal information representations from how
information is presented to and accepted by users. MVC, like other software
patterns, expresses the core of a problem solution by allowing it to be
customised for each system.

Diagrammatic Representation:
Advantages:
1. The application’s development grows more rapid
2. Multiple developers can easily collaborate and work together.
3. It’s a lot easier to update the app.
4. Easier to debug because the application has numerous levels that are
appropriately written.
5. Promotes better code organization, extensibility, scalability and code reuse.

Disadvantages:
1. MVC design is difficult to understand.
2. Methods must be governed by strict rules.
3. MVC is suitable only for larger applications as it may lead to performance issues.
4. Developers must know how the connection of components work and are difficult
to implement.

You might also like