MVC Architecture
MVC architecture is a software design pattern for developing web-based applications such as Angular, Angular JS, Java, Laravel, Express, and more-based applications. MVC pattern made up of three main concepts.
01. Model: This is the lowest level of the pattern responsible for maintaining the data. This layer handles the business logic of the application.
02. View: This layer is responsible for displaying data to the user. This is the intermediating layer between user & application.
03. Controller: This layer is the layer between the Model & View Layer. This layer handles the application logic of the application.
Following are the steps for the main operations of the MVC architecture-based applications.
=>> Client / Browser sends a request to the controller on their server side.
=>> Then controller calls the model & gathers the requested data.
=>> Then the controller transfers the data retrieved to the view layer.
==> Now the results are sent back to the browser by the view.
Following are the advantages of MVC architecture.
01. Higher scalability to the application.
02. Software components are easy to maintain because of less dependency.
03. A model can be used for multiple views in terms of reusable code.
04. Each layer of MVC is maintained separately. So we no longer need to handle massive code.
05. Testing of the application is easier.