Interview Questions for Business Analysts and Systems Analysts

Recent Interview Questions | Search | Subscribe (RSS)


What is Model-View-Controller?

Posted by Chris Adams

Article Rating // 11231 Views // 1 Additional Answers & Comments

Categories: Systems Analysis, Domain Modeling, Business Rules


Model-View-Controller, or MVC, is a design and architectural pattern used to ensure that the modeling of the domain, the presentation information, and the actions taken based on user input are loosely coupled and maintained as separate classes.

  • The View manages the display of information.
  • The Controller handles input events from the user interface using handlers and tells the Model or View how to update itself accordingly.
  • The Model manages the behavior and the data of the application domain.  The Model responds to requests for information about its state (usually made by the View so that the View can redisplay itself).  It also responds to instructions to change its state (usually coming from the Controller).

The key to the MVC pattern is in the relationships that exist between each of the three objects.  As shown in the diagram below, the View is dependent upon the Model, the Controller is dependent upon the View and the Model, but the Model is dependent upon neither.


What is Model-View-Controller?

The existence of a dependency means that if the definition of one element changes then the other element which is dependent upon it may also change.  In turn, this would mean:

  • If my View changes then my Controller may need to change
  • If my Controller changes then neither my View nor my Model should need to change
  • If my Model changes then both my View and my Model may need to change

This is where the MVC pattern proves its worth.  Controllers are just the glue that allows for the loose coupling between the Model and View.  Since the data and behavior of the application domain which are maintained by the Model typically change far less often than its presentation (the View), it is the impact of changing the presentation or the View that we want to minimize.  And this pattern does just that.  A change to the View which may happened quite often only requires updates to the Controller.  However, a change to the Model which is less frequent would potentially require changes to both the View and the Controller.



Kathy posted on Saturday, June 20, 2009 12:39 PM
Please clarify third bullet point. Shouldn't it read " . . . both my view and my controller may ..."
Only registered users may post comments.

Do your homework prior to the business analysis interview!

Having an idea of the type of questions you might be asked during a business analyst interview will not only give you confidence but it will also help you to formulate your thoughts and to be better prepared to answer the interview questions you might get during the interview for a business analyst position.  Of course, just memorizing a list of business analyst interview questions will not make you a great business analyst but it might just help you get that next job.


Upcoming Live Webinars


Select ModernAnalyst Content

Register | Login

Copyright 2006-2024 by Modern Analyst Media LLC