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. Kate
    July 27th, 2009 at 11:50 | #1

    Good article ;) thanx

    VA:F [1.9.22_1171]
    Rating: 3.9/5 (12 votes cast)
    VA:F [1.9.22_1171]
    Rating: +8 (from 16 votes)
  2. August 14th, 2009 at 00:24 | #2

    these was really helpfull

    thanx.

    VA:F [1.9.22_1171]
    Rating: 3.7/5 (7 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 10 votes)
  3. Avijit
    November 1st, 2009 at 19:04 | #3

    Really a nice article…
    Thanks friend.

    VA:F [1.9.22_1171]
    Rating: 3.0/5 (7 votes cast)
    VA:F [1.9.22_1171]
    Rating: +2 (from 6 votes)
  4. Mubarish
    November 3rd, 2009 at 14:13 | #4

    Very helpful article,

    Thanks a lot for the clear explanation.

    VA:F [1.9.22_1171]
    Rating: 2.9/5 (7 votes cast)
    VA:F [1.9.22_1171]
    Rating: -2 (from 4 votes)
  5. May 31st, 2010 at 16:35 | #5

    Thanks for this article its very helpful for all programmer’s.

    VA:F [1.9.22_1171]
    Rating: 4.1/5 (10 votes cast)
    VA:F [1.9.22_1171]
    Rating: +4 (from 8 votes)
  6. Shivam
    January 5th, 2011 at 11:44 | #6

    i like an example most

    VA:F [1.9.22_1171]
    Rating: 3.5/5 (8 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 3 votes)
  7. meenakshi
    August 2nd, 2011 at 06:15 | #7

    very nice and helpful article

    Thanks

    VA:F [1.9.22_1171]
    Rating: 3.6/5 (8 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 5 votes)
  8. suchi
    March 27th, 2012 at 14:12 | #8

    very nice and helpful article
    Thanks

    VA:F [1.9.22_1171]
    Rating: 3.7/5 (6 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 2 votes)
  9. April 5th, 2012 at 12:21 | #9

    It would be nice if you would have given an example of struts framework explaining the terms M,V, and C in MVC pattern. I would also clear out what is model in (jsp / action classes / action forms).

    VA:F [1.9.22_1171]
    Rating: 4.0/5 (4 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 4 votes)
  10. swetha
    May 19th, 2012 at 13:40 | #10

    this was nice explain about MVC structure but its better to explain with an example code means in core languages what exactly called model,view,controller

    VA:F [1.9.22_1171]
    Rating: 4.8/5 (4 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 6 votes)
  11. shiva
    June 3rd, 2012 at 22:57 | #11

    very nice explanation…

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (2 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 5 votes)
  12. Amol
    June 22nd, 2012 at 12:22 | #12

    Thanks Nice Article.. Example is pretty good.

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 2 votes)
  13. bijesh
    August 1st, 2012 at 13:22 | #13

    Very nice and helpful article…………..
    Thanks

    VA:F [1.9.22_1171]
    Rating: 4.0/5 (4 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 3 votes)
  14. akbar
    August 3rd, 2012 at 23:29 | #14

    Hi to every members of this site;
    i am a developer php from IRAN thanks for your works

    VA:F [1.9.22_1171]
    Rating: 3.0/5 (2 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 2 votes)
  15. kumar
    August 16th, 2012 at 09:40 | #15

    Really a nice work .
    Thanks.

    VA:F [1.9.22_1171]
    Rating: 3.3/5 (4 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 2 votes)
  16. sadakar
    August 16th, 2012 at 15:47 | #16

    Nice one.. helpful.

    VA:F [1.9.22_1171]
    Rating: 3.0/5 (3 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 3 votes)
  17. maran
    August 28th, 2012 at 19:40 | #17

    the success of this article is its simplicity am not a devloper but understood the concept…

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (3 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 3 votes)
  18. deepak
    September 5th, 2012 at 10:22 | #18

    Very helpful

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: -2 (from 4 votes)
  19. September 19th, 2012 at 14:38 | #19

    it is really nice explanation , i really impressed but there should be examples also.

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  20. Arunachalam
    September 21st, 2012 at 08:58 | #20

    i have read this article about mvc, it is very useful things… thks lots

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  21. Bhavesh
    September 22nd, 2012 at 20:24 | #21

    very nice and helpful article

    Thanks

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 2 votes)
  22. lakshmi
    September 23rd, 2012 at 07:56 | #22

    Thank you for giving clear idea about MVC …

    It is very helpful

    VA:F [1.9.22_1171]
    Rating: 3.0/5 (2 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 3 votes)
  23. rahul
    September 26th, 2012 at 10:13 | #23

    great ….thanks

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: -2 (from 2 votes)
  24. rudra
    September 27th, 2012 at 07:09 | #24

    it really help dude for me to understand the core idea behind MVC, owesome dude…

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (2 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  25. aabi.k
    October 3rd, 2012 at 09:49 | #25

    Good explanation with Nice example. Thank you very much…….

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  26. Lalit
    October 11th, 2012 at 12:36 | #26

    nice peace of article Thankx.

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 4 votes)
  27. Gaurav
    October 26th, 2012 at 09:59 | #27

    Hey! Samet. Nice article on MVC. It really helped to understand what actully is 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)
  28. abhijeet
    November 1st, 2012 at 23:24 | #28

    really it help full
    thanks for being so simple in your words.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  29. mukesh sheoran
    November 5th, 2012 at 12:21 | #29

    Very nice and helpful article…………..
    Thanks

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  30. lakshmi
    November 5th, 2012 at 14:41 | #30

    good

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  31. mangai
    November 15th, 2012 at 09:11 | #31

    real time examples is good to under stand MVC concept clearly.. Thank you..

    VA:F [1.9.22_1171]
    Rating: 4.0/5 (2 votes cast)
    VA:F [1.9.22_1171]
    Rating: +2 (from 2 votes)
  32. November 29th, 2012 at 08:52 | #32

    good aritical

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  33. Pullareddy Bujala
    December 22nd, 2012 at 08:49 | #33

    your article is very good. i feel very hapy.
    this is very helpful.
    keep it up thanks…..

    VA:F [1.9.22_1171]
    Rating: 4.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  34. January 2nd, 2013 at 23:15 | #34

    Great….

    VA:F [1.9.22_1171]
    Rating: 4.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  35. azhgupandiyan
    January 16th, 2013 at 13:45 | #35

    hi,

    This website very helpful to me then this explanation with sample very useful to me ,
    easily understand everyone and i want more important concepts in MVC architecture.

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  36. syed
    January 24th, 2013 at 12:48 | #36

    very easy to understand ….keep rocking

    VA:F [1.9.22_1171]
    Rating: 4.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  37. January 29th, 2013 at 18:00 | #37

    Nice article.. Thanks for sharing.. : )

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  38. swaroop
    February 8th, 2013 at 08:04 | #38

    Very informative and simple. Thanks a lot

    VA:F [1.9.22_1171]
    Rating: 3.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  39. Jeremy Becker
    February 10th, 2013 at 05:59 | #39

    Perfect. Brand new to rails and this helps a lot to understand. :)

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  40. nirav
    February 13th, 2013 at 10:30 | #40

    Really good article.
    its clear the concept of mvc.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  41. rocker
    February 15th, 2013 at 09:01 | #41

    nice One :)

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  42. Jhonn Dracula
    February 17th, 2013 at 21:07 | #42

    wallahi thanks, nice article

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  43. March 1st, 2013 at 11:26 | #43

    Really gr8 explanation..
    It would have been even good, if one practical example would have been implemented…:):)

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  44. Abhaya Kumar Jena
    March 15th, 2013 at 10:59 | #44

    It’s Really very nice technology used in Architecture. And the article is really helpful to learn the basic things about the MVC. It’s some where equivalent to 3-Tier Architecture but not fully. Now a days all most all the companies are looking for latest architecture. So MVC is the best for both Development as well as Unit Testing Purpose.

    Leave your comments on MVC Architecture to know more by other.

    Thanking You.

    Regards,
    Abhaya Kumar Jena
    Bangalore, India

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  45. p.n.rao
    March 19th, 2013 at 13:47 | #45

    Very informative, even the novices can understand it better.
    However, it should have more elaborate with some easy project.
    Thanks a lot and keep it up!

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  46. Shani
    April 2nd, 2013 at 15:43 | #46

    Really very nice article…

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  47. Saranyan Yethirajam
    April 14th, 2013 at 20:37 | #47

    Great Article :-) TQ

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  48. sdd
    April 23rd, 2013 at 20:22 | #48

    ya it is uselful to learnerns.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  49. abc
    May 2nd, 2013 at 12:04 | #49

    it is not logical yet full of decoration with words…

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  50. sugandh
    May 16th, 2013 at 14:20 | #50

    can u explain it with some coding example?

    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.