Saturday, January 20, 2018

What is this MVC?


MVC is not just a 3 letter word and the hidden meaning is really technical. MVC stands for Model, View and Controller. And it is a way of framing and organizing your code.
In another way, the every section of your code has a purpose in a different way. So the users can love MVC as it gives you the opportunity to arrange your code in a structured manner in organized boxes.
How these three parts of MVC act?


Model : This depicts the shape of data and the business logic of your program. Mainly the model is helpful in maintaining the data in the application.

As an epitome, when building To-do app, model part would illustrate the “task” and the “list” in the application.

View : Within the word, the elaboration is simply defined. It is totally about the user interface. View shows the data which are used in the model and allow user to modify them with the coding of application.

With the above instance, View will define what the tasks and the lists look like. The visual representation will be displayed.

Controller :User requests are handled here and it is a gate between the Model and the View of the application. This code is the main part of the application which provides the relevant view which are tally with the user inputs.

Controller will connect with the View’s buttons and commands to add tasks in the application.


So, the MVC makes easy for the programmers to organize their code in a way of organized and understandable structure. And also, it acts a place to translate the inputs, processes and outputs of an application into a code. This supports for asynchronous technique. So the interactive web application can be easily developed with the use of MVC.

You can try this today for your own web application.



Written by : Malsha Prabuddhi

No comments:

Post a Comment