MVC and Goal Flashcards

1
Q

What does MVC stand for in software design?

A

MVC stands for Model-View-Controller. It is a design pattern used to develop user interfaces by separating program logic into three interconnected components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the three main components of MVC?

A
  1. Model: Manages application data, logic, and rules. It is independent of the user interface.
  2. View: Represents information in various formats (e.g., tables, charts). It displays data to the user.
  3. Controller: Handles user input, processes it, and interacts with the model to update the view.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

MVC Diagram

A

Model (Defines data structure) e.g. Update app to reflect item
View( Defines Display UI) e.g user click ‘add to cart’
Controller (contains control logic) e.g. receives update from view then notifies model to add item

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the role of the Model in MVC?

A

The Model is responsible for handling application data. It receives input from the Controller and manages the data structure and business logic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the role of the View in MVC?

A

View represents information in various formats (e.g., tables, charts). It displays data to the user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the role of the Controller in MVC?

A

The Controller reacts to input, processes it, and interacts with the model to update the view.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the main goals of using MVC?

A

Simultaneous Development: Developers can work on different components (front-end and back-end) in parallel without blocking each other.
Code Reuse: Views can be reused across different applications, allowing for efficient handling of data display.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the benefits of using the MVC pattern?

A

MVC provides a separation of concerns, making it easier to manage and maintain code. It allows for better collaboration among developers and enhances code reusability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly