Software engineeringLesson 2 of 2 in the course Design patterns

Model–View–Controller: Components, History, and Web Adaptations

5 flashcards · 5 quiz questions · 5 match pairs · 5 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

Model–view–controller (MVC) is an architectural pattern that organizes an application into three connected parts. Separating data and application rules from presentation and input can make software easier to understand, maintain, and adapt.

MVC divides related program logic into three elements: the model, the view, and the controller. The pattern is commonly used to develop user interfaces, including desktop graphical interfaces and web applications.

All flashcards

What does MVC stand for?
Model–view–controller, an architectural pattern that separates data and rules, presentation, and input coordination.
What is the model in MVC?
The application’s data and the rules that govern it, managed independently of its presentation.
What is the view in MVC?
The component that presents information to the user, such as through a table, chart, or web page.
What is the controller in MVC?
The component that coordinates input and actions involving the model or view.
Why can an MVC application use multiple views?
Different views can present the same underlying model information in forms suited to different users or tasks.

Quiz questions

  1. What does it mean that MVC is a flexible architectural pattern?Answer: Frameworks may distribute responsibilities differently while retaining the separation of data, presentation, and input.
  2. In a typical server-oriented MVC web application, what commonly happens after a router maps a request?Answer: A controller action handles the request and coordinates work with relevant models.
  3. In Django’s model-template-view terminology, what does a Django view typically do?Answer: It receives a web request and returns a web response, possibly using a template.
  4. Which four parts appeared in an early proposal for MVC before the familiar three-part arrangement?Answer: Model, view, thing, and editor.
  5. Which MVC-related benefit allows interface elements to be combined, with one used inside another?Answer: Composable presentation.

Based on the Wikipedia article Model–view–controller, licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Software engineering lessons