Model-View-ViewModel (MVVM) is a structural design pattern that separates objects into three distinct groups:
- Models hold application data. They’re usually structs or simple classes.
- Views display visual elements and controls on the screen. They’re typically subclasses of UIView.
- View models transform model information into values that can be displayed on a view. They’re usually classes, so they can be passed around as references.
Does this pattern sound familiar? Yep, it’s very similar to Model-View-Controller (MVC). Note that the class diagram at the top of this page includes a view controller; view controllers do exist in MVVM, but their role is minimized.
결국엔 기술 부채를 줄이기 위함이다.
Design Patterns by Tutorials: MVVM
Learn how and when to use the architecture-slash-design pattern of MVVM in this free chapter from our new book, Design Patterns by Tutorials!
www.raywenderlich.com
'Programming > Swift' 카테고리의 다른 글
Class: AVAudioPlayer (0) | 2021.01.07 |
---|---|
Class: UIViewController (0) | 2020.12.21 |
[yagom] Swift - 클로저 고급 (0) | 2020.12.15 |
yagom's Swift Basic 야곰의 스위프트 기본 문법 강좌 (0) | 2020.12.14 |
Swift - 조건문 (0) | 2020.12.14 |