Blog
Model-View-Controller (MVC)

Model-View-Controller (MVC)

Model-View-Controller (MVC) is an "architectural pattern" in software. It is based on the abstraction of data and representation in applications that are difficult to understand, where a lot of data is presented to the user. Thus, the data and the user interface are resolved without affecting each other.

MVC (Model-View-Controller), which consists of the initials of the words Model, View and Controller, was created by Tygve Reeskaug in 1979 and has been used in many projects in software development. Recently, its popularity has increased with the combination of Microsoft's MVC pattern with Asp.Net technology.

The MVC pattern consists of 3 layers and the layers work independently of each other. For this reason, it is mostly preferred in large-scale projects to ensure the management and control of projects more easily.

What is a Model?

The model is the part where the business logic of the project is created in MVC. Along with the business logic, verification and data access operations are also carried out in this section.

The model may consist of a single layer or may consist of more than one layer within itself. Internal configuration is up to the size of the project and the planning of the software developer. If the project is large-scale, it will be beneficial for the management of the project to separate the model into multiple layers.

What is View?

View is the section where the interfaces of the project are created in MVC. In this section, there are HTML files of the project that will be presented to the users. File extensions can also change according to the software languages ​​in which the project is developed. Another point to be considered according to the size of the projects is the folder.

If you are developing a web project, the hierarchy of the folders of the project's Views should be carefully done so that it does not cause complexity in the future. Some software developers host HTML files and Javascript, CSS and image files in the same folder in their web projects. Although it may seem like a small detail, it creates serious problems in the later stages of the project.

Related Blogs