What is Model-view-controller

W

Model-view-controller (MVC) is an architectural model used in software engineering. MVC is a widespread concept in Web programming. The purpose of MVC is to keep business logic and user interface separate, so those who maintain the application can easily change one’s part without affecting other parts. The Model-View-Controller design concept has emerged as a necessity to translates traditional data management methods into “virtual” environments, more precisely, to ease the way users work, respecting the same basic principles and differentiating themselves through the tools used. The underlying principle of the Model-View-Controller is sharing responsibilities

1. ModelĀ 

This part of the controller manipulates the logical operations and information usage (sent in advance of its higher rank) to produce an easy-to-understand form.

2. Visualization
This family member corresponds to the graphic representation, or rather, the expression of the last form of the data. The graphical interface interacts with the end user. Its role is to highlight the information obtained until it reaches the controller.

3. Controller
With this element, we can control access to our application. They can be files, scripts or programs, generally any kind of permissible interface information. In this way, we can diversify our content in a dynamic and static form at the same time.

The workflow in MVC is as follows:

The user interacts with the user interface in some way (for example, press a button); A controller takes over the data added by the user. The controller creates the model, eventually updates it in a way that is appropriate for the user’s action and is sent back to the view. The view uses the model to generate a user-friendly interface for the requirements. The view receives the model data. The model does not have direct knowledge of the view.

A software system that implements the MVC architectural model can be seen as a collection of triplets (model, view, controller). Each triplet is responsible for a particular element of the graphical interface. This architectural model is encountered in both desktop and web application software. The Graphical Interface Swing System is a Java technology that models almost all components of the graphical interface as individual MVC systems. As an example of web technology that uses the MVC architectural model, ASP.NET MVC can be considered.

In the MVC ASP.NET model, the model can be implemented using .net classes that model data structures. The controller must be derived from a special class. And views are implemented as files containing a mixture of C # and HTML.

Disadvantages of using MVC:
1. It has increased complexity with application development.
2. This model is not recommended for extra-small applications.
3. The isolation process of logic and controllers interfaces can lead to a delay in the development of the application.

Advantages of using MVC:

1. Organization
2. Faster development
3. Create the code
4. Parallel development
5. Flexibility
6. Allows different interface standards

MVC is one of those concepts that only make sense when dealing with larger applications or when multiple developers work on the same requirements. If there are three requirements to be done until a certain date, there is no need to have a task organization. But when a team of people must work on the same project and need to prioritize the requirements, the benefits of using MVC become much more apparent.

Recent Posts

Archives

Categories