[1Day-1CS] MVC Patterns and Similar Patterns
1CS in 1 day, a quick refresher on MVC patterns
MVC Pattern
Design pattern consisting of Model, View, Controller
-
Divides the components of an application into three parts, allowing you to focus on each component and develop them separately
-
Facilitates reusability and determinism
-
Has the disadvantage that as the complexity of the application increases, the relationship between Model and View becomes more complex
Model
- Data in the application, meaning DB, constants, variables, etc.
View
Refers to a user interface element and refers to the screen that a user can see based on the Model
Doesn't store any information from the model, only the screen display information
Passes changes to Controller when they occur
Controller
Acts as a bridge between Model and View
Responsible for main logic such as Events, and also manages Life Cycle
When notified of a change in the Model or View, it delivers the corresponding content to the required components.
Similar Patterns
-
MVP Pattern: Replaces Controller with Presenter, which has a stronger coupling since the relationship between View and Presenter is 1:1
-
MVVM pattern: Replaces Controller with View Model, has Command and Data Binding, enables UI reusability and easier unit testing
댓글 작성
게시글에 대한 의견을 남겨 주세요.