Insight of MVC (Model-View-Controller)

MVC is the new buzz word in the software development world especially, in web development. Everyone is talking about and developing in MVC. So, lets get some insight of it.

What is it?
MVC (Model-View-Controller) is a architecture used for developing GUI software design.It divides a given software application into three interconnected components to isolate representation of information from the way it flows to or accepted from the user.
Components of MVC are
Model: A model informs views and controllers when there has been a change in its state. This notification allows the views to produce updated output, and the controllers to manipulate the available set of commands.
View: View is the user interface that renders the model into a form of interaction.
Controller: The controller is responsible for responding to user input and perform interactions on the data model objects. The controller receives an input, it validates the input and then performs the business operation that modifies the state of the data model.


Who/when developed it?
In 1970s, Trygve Reenskaug, a Norwegian computer scientist and professor emeritus of the University of Oslo formulated the MVC pattern into Smalltalk(programming language) id=1984

Where is it used?
MVC was originally developed for desktop applications and has been widely adopted as an architecture for web applications in their respective frameworks.Of course, these frameworks may vary with the way MVC responsibilities are divided. For example, in web design an HTML file serves as model containing data to be shown on webpage, a CSS contains description/styling, that is the view of the page and the browser serves as the controller.

Why is it important?
It splits UI interaction into three distinct roles which helps in addressing on each aspect of the layer separately. This organized separation of user code and data access code makes modifying and re-usability of code very easy, renders a cleaner code and also time saving.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s