Answered Questions

  • What is MVC architecture

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: Mitchel K

    • Jun 27th, 2005


    A design pattern describes a proven solution to a recurring design problem, placing particular emphasis on the context and forces surrounding the problem, and the consequences and impact of the solution.  
     
    There are many good reasons to use design patterns. Here are three: 
     
    1) They are proven. You tap the experience, knowledge and insights of developers who have used these patterns successfully in their own work. 
     
    2) They are reusable. When a problem recurs, you don't have to invent a new solution; you follow the pattern and adapt it as necessary. 
     
    3) They are expressive. Design patterns provide a common vocabulary of solutions, which you can use to express larger solutions succinctly. 
     
    The goal of the MVC design pattern is to separate the application object (model) from the way it is represented to the user (view) from the way in which the user controls it (controller).  
     
    The MVC architecture has the following benefits: 
     
    1) Multiple views using the same model: The separation of model and view allows multiple views to use the same enterprise model. Consequently, an enterprise application's model components are easier to implement, test, and maintain, since all access to the model goes through these components. 
     
    2) Easier support for new types of clients: To support a new type of client, you simply write a view and controller for it and wire them into the existing enterprise model. 
     
    3) Clarity of design: By glancing at the model's public method list, it should be easy to understand how to control the model's behavior. When designing the application, this trait makes the entire program easier to implement and maintain. 
     
    4) Efficient modularity: of the design allows any of the components to be swapped in and out as the user or programmer desires - even the model! Changes to one aspect of the program aren't coupled to other aspects, eliminating many nasty debugging situations. Also, development of the various components can progress in parallel, once the interface between the components is clearly defined.  
     
    5) Ease of growth: Controllers and views can grow as the model grows; and older versions of the views and controllers can still be used as long as a common interface is maintained.  
     
    6) Distributable: With a couple of proxies one can easily distribute any MVC application by only altering the startup method of the application.

    yura

    • Dec 2nd, 2015

    Everyone explained what is MVC... This is outcome of one more design pattern called "separation of concerns", which means a "view" should only handle rendering logic of the model and should not be co...

    Anil Nivargi

    • Jun 26th, 2014

    The MVC consists of three kinds of Objects i.e Model,View and Controller. Lets start explaining one by one. 1) Model- It handles data processing and database works part. Model processes event...