Home > General, Programming > What is MVC Architecture? (Model – View – Controller)

What is MVC Architecture? (Model – View – Controller)

MVC Architecture has implemented by Trygve Reenskaug at 1979 for the first time. It was implemented on Smalltalk at Xerox labs. Then benefits and advantages of this architecture has been accepted by most of the coders and software engineers.

It was an information about MVC’s history above. Now lets talk about what really MVC is. What do you understand from MVC. The word M stands for Model, V stands for View and C stands for Controller. I am going to mention about each item.

The figure above may help you while thinking what structure it might have. Let’s start with Model.

Model:
It handles data processing and database works part. Model processes events sent by controller. After processing these events then it sends processed data to controller (thus, controller may reprocess it) or directly to view side.

View:
View prepares an interface to show to the user. Controller or model tells view what to show to the user. Also view handles requests from user and informs controller.

Controller:
Let’s say controller is like brain of the system. That is right. Because it processes every request, prepares other parts of the system like model and view. Then the system determines what to do by controller’s commands.

Even if you are junior developer you probably faced with a problem called “Complexity of Project”. There MVC comes. MVC helps you to decrease complexity of project. For instance, there is a team with 5 people. If they are working on same project after sometime project reaches a point which no one cannot understand what is project going to be. What i mean is MVC splits project to (by default) three different parts. Like Model, View, Controller.You can say;

As you see above if you split your project three part like Application Development, Database and Data processing and Interface development then of course you project will be more understandable and developers can work more efficiently.

What are the advantages of MVC?
MVC is perfect for team work. As i mention before this architecture splits your project into some parts so, team members can work and their parts without any dependency. Then you will realize that MVC makes your project more systematic.
It is really easy to edit or change some part of your project that makes less development cost and maintenance cost.
MVC doesn’t repeats itself. If you wrote some script for your project. Because of non-dependancy property of MVC then you may use this script for another project of yours. And of course it helps you to finish your project by spending less time then others.
And developers doesn’t fight after 5pm :)

Why MVC is non-standard?
Still waits for developers to discover itself. :) I know some developers who think that they have to write even every semicolon, letter. you don’t have to do that. However, MVC tries to help you to don’t repeat yourself.

Why MVC is too important for Companies?

Well it is not!. Yes that is true. A company only looks for if a project is done on time or not. Most of the companies doesn’t interested what structure you are using while developing.
Probably you know this formula : P=W/T  (P:Power – W:Work – T:Time) As you see here if you descrease the time so you may done with more Work. That means money! So, you see how MVC helps you.

Example:
As an example you can think like eyes of a human stands for view, brain stands for controller and neutral system of a body stands for model. You can imagine like when a person sees his friend eyes (view) tells this to the brain (controller). Brain wants to show smile to his friend. To make it possible brain tells your face’s neutral network that make the face smile. Then his face smiles :) Hope it helped.

VN:F [1.9.22_1171]
Rating: 8.4/10 (500 votes cast)
VN:F [1.9.22_1171]
Rating: +172 (from 204 votes)
What is MVC Architecture? (Model - View - Controller), 8.4 out of 10 based on 500 ratings
Categories: General, Programming Tags: , , ,
  1. Zia Abbas
    May 17th, 2013 at 02:12 | #1

    Really gr8 article
    as in little words you have defined MVC architecture with very good example. also its advantage and disadvantage.
    Thanks

    VA:F [1.9.22_1171]
    Rating: 3.0/5 (8 votes cast)
    VA:F [1.9.22_1171]
    Rating: +3 (from 11 votes)
  2. Dharmendra singh
    May 22nd, 2013 at 10:05 | #2

    Awasome article………..really helpfull…………!pls give something more about mvc.

    VA:F [1.9.22_1171]
    Rating: 4.2/5 (5 votes cast)
    VA:F [1.9.22_1171]
    Rating: +5 (from 9 votes)
  3. Rakesh shinde
    May 23rd, 2013 at 14:18 | #3

    Really nice understanding of base….

    VA:F [1.9.22_1171]
    Rating: 4.0/5 (4 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 7 votes)
  4. abhilash
    June 11th, 2013 at 08:42 | #4

    With an example only everyone can understand anything u r a true explainer

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: -3 (from 3 votes)
  5. June 13th, 2013 at 15:13 | #5

    Really great article

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 2 votes)
  6. Neeraj
    June 17th, 2013 at 16:10 | #6

    Good one bro..

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 2 votes)
  7. sam
    July 2nd, 2013 at 21:41 | #7

    thanks dude……………..it refine my concept………….

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: -1 (from 1 vote)
  8. senthil
    July 10th, 2013 at 16:25 | #8

    it’s great thng..it’s really useful article for what is what about mvc understand…and kindly giv some more example

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: -1 (from 1 vote)
  9. Lohith
    August 24th, 2013 at 21:11 | #9

    thanks for the good explanations..!

    VA:F [1.9.22_1171]
    Rating: 4.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  10. Bashi
    August 31st, 2013 at 18:13 | #10

    Very Nice……… Thank uuuuuuu……

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  11. shilpriya
    September 1st, 2013 at 12:22 | #11

    pla expalin me MVC role in modern application… :-)

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  12. suresh
    September 10th, 2013 at 14:42 | #12

    good article about MVC Architecture.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  13. mahadev
    September 12th, 2013 at 10:36 | #13

    good artical

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  14. Sally
    September 22nd, 2013 at 19:21 | #14

    Great article.. I found another one herE:
    http://webchattr.blogspot.in/2013/09/model-view-controller-introduction.html
    i still don’t understand how model view and controller communicate with each other.. Can you please explain that?

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  15. Pooja
    September 29th, 2013 at 23:09 | #15

    “MVC model is responsible for business domain stake holder.” Justify

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  16. kanimozhi
    October 15th, 2013 at 13:07 | #16

    Very nice example.

    VA:F [1.9.22_1171]
    Rating: 1.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  17. November 12th, 2013 at 23:54 | #17

    @Zia Abbas
    im glad it helped

    VN:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.22_1171]
    Rating: +2 (from 2 votes)
  18. shaik LK
    December 4th, 2013 at 09:34 | #18

    nice thanks
    any one can explain again in depth architecture of MVC means how it works in all senarios like if any inserting record or updating or deleting or getting data from DB how it get flows in (M—V—C) i want complete architecture any explain please

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  19. shaik LK
    December 4th, 2013 at 09:35 | #19

    @Samet Kilictas
    Assalaamu alaikum bhai can you explain MVC in depth means only architecture flow

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  20. sathiyaseelankt
    December 21st, 2013 at 11:39 | #20

    Thank u ur answer

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  21. Sachin Mane
    January 23rd, 2014 at 06:57 | #21

    this description is very simple and easy to understand for every person who don’t have knowalege about MVC
    Thanks

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
Comment pages
1 2 283
  1. No trackbacks yet.