Вы находитесь на странице: 1из 3

What is MVC?

The Model-View-Controller (MVC) is an architectural pattern that separates


an application into three main logical components: the model, the view, and
the controller. Each of these components are built to handle specific
development aspects of an application. MVC is one of the most frequently used
industry-standard web development framework to create scalable and
extensible projects.

MVC Components
Following are the components of MVC −

Model
The Model component corresponds to all the data-related logic that the user
works with.

For example, a Customer object will retrieve the customer information from the
database, manipulate it and update it data back to the database or use it to
render data.
View
The View component is used for all the UI logic of the application. For
example, the Customer view will include all the UI components such as text
boxes, dropdowns, etc. that the final user interacts with.

Controller
Controllers act as an interface between Model and View components to
process all the business logic and incoming requests, manipulate data using
the Model component and interact with the Views to render the final output.
For example, the Customer controller will handle all the interactions and
inputs from the Customer View and update the database using the
Customer Model. The same controller will be used to view the Customer
data.

Advantages of MVC

a. The separation the three components, allows the re-use of the business logic across
applications.

a. The developers of UI can focus exclusively on the UI screens without bogged down
with business logic.

a. Business logic developers can build the classes, while the UI developers can involve
in designing UI screens simultaneously, resulting the interdependency issues and time
conservation.
1) Faster development process: MVC supports rapid and parallel development. With MVC, one
programmer can work on the view while other can work on the controller to create business logic of
the web application. The application developed using MVC can be three times faster than application
developed using other development patterns.
3) Support for asynchronous technique: MVC also supports asynchronous technique, which
helps developers to develop an application that loads very fast.

4) Modification does not affect the entire model: Modification does not affect the entire model
because model part does not depend on the views part. Therefore, any changes in the Model will not
affect the entire architecture.
Explain the disadvantages of MVC pattern.
1. The complexity is high to develop the applications using this pattern.
2. Not right suitable for small applications which has adverse effect in the application’s
performance and design.

Вам также может понравиться