MVC

MVC, or the Model-View-Controller paradigm, is a software design practice that separates code for a website into three parts: the model code, the view code, and the controller code. The model code deals with the data of the website, often performing operations that interact with a database. The controller code is the logic of the website: it contains code like loops and conditions. The view code is the aesthetic part of the website: it takes information provided by the controller and displays the page that the user ultimately sees when they visit the website.

  • Lecture

  • Short

  • Notes

  • Supplementary Resources

  • Thought Questions

    • Why is MVC useful tool for developing websites?
    • What languages might be necessary in order to use MVC effectively?
    • Why might you want to break down components of a web application in this way?
    • How would you update a web application using MVC? Do all components have to be updated together?
    • Are there other architectures for web applications? How do they compare with MVC and what tradeoffs do they have?