From the course: Software Architecture: Patterns for Developers
Unlock the full course today
Join today to access over 23,400 courses taught by industry experts.
Model-view-viewmodel (MVVM)
From the course: Software Architecture: Patterns for Developers
Model-view-viewmodel (MVVM)
- [Narrator] The Model-View-ViewModel pattern or MVVM is a pattern that works well when you have advanced data binding support. In MVVM, we have three separated components, the Model, the View, and a ViewModel in between. The Model contains our business logic and data, and the ViewModel interacts with it. The special part is that we connect the View to the ViewModel by using advanced data binding techniques. This allows us to write a lot less code as you'll see in the exercise files. The last step is that the user interacts with the View thanks to two way data binding, the user's interactions are passed on to the ViewModel, and any updates in the ViewModel are seamlessly passed back to the View. The MVVM pattern is a great pattern for desktop applications and mobile applications if your platform supports the necessary data binding techniques. With MVVM just like Model-View-presenter, you can achieve a clean separation…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.