Mastering MVVM With Swift
Welcome to Mastering MVVM With Swift
|1||Welcome to Mastering MVVM With Swift 03:25|
|2||Is the Model-View-Controller Pattern Dead 07:20|
|3||How Does the Model-View-ViewModel Pattern Work 04:36|
|4||Meet Cloudy 07:46|
|5||What Is Wrong With Cloudy 03:43|
|6||A Quick Recap Plus 02:32|
|7||Time to Create a View Model 08:03|
|8||Put the View Model to Work Plus 05:05|
|9||Rinse and Repeat Plus 08:08|
|10||Using MVVM In the Settings View Plus 06:56|
|11||Adding Protocols to the Mix Plus 04:05|
|12||Making Table View Cells Autoconfigurable Plus 04:06|
|13||Supercharging MVVM With Protocols Plus 06:26|
|14||Ready, Set, Test 02:47|
|15||Testing Your First View Model 07:59|
|16||Using Stubs for Better Unit Tests 08:17|
|17||A Few More Unit Tests Plus 04:07|
|18||Taking MVVM to the Next Level 05:28|
|19||What Are the Options Plus 03:08|
Welcome to Mastering MVVM With Swift. In this series, you learn the ins and outs of the Model-View-ViewModel pattern. The goal is to provide you with the ingredients you need to implement the Model-View-ViewModel pattern in your own projects.
Xcode 11 and Swift 5
This series uses Xcode 11 and Swift 5. If you want to follow along, make sure you have Xcode 11 or later installed on your machine.
What You Will Learn
This series covers much more than the Model-View-ViewModel pattern. We start with an overview of the Model-View-ViewModel pattern and compare it to the Model-View-Controller pattern, a popular pattern you are probably already familiar with.
In the remainder of the series, we refactor Cloudy, a weather application powered by the Model-View-Controller pattern. We refactor Cloudy to use the Model-View-ViewModel pattern instead. This will show you how to apply the Model-View-ViewModel pattern in a production application. The refactoring operation will show you exactly what needs to change to move from MVC to MVVM, highlighting the benefits and challenges that go with this migration.
Along the way, you learn what view models are, how to create them, and how to use them in view controllers. We further simplify the view controllers of the project using protocol-oriented programming. Protocols and MVVM work very well together.
Later in the series, we write unit tests for the view models we created. One of the key benefits of the Model-View-ViewModel pattern is improved testability and that is something I want to show you first-hand. Writing unit tests for view models isn't difficult.
The Model-View-ViewModel pattern really shines with the help of bindings. I first show you how to create a custom bindings solution. This is an important step as it will show you how the Model-View-ViewModel pattern and bindings work under the hood.
Later in the series, we take it a step further by taking advantage of Combine. You don't need to be familiar with reactive programming to understand these episodes. We primarily focus on the Model-View-ViewModel pattern and how it plays together with bindings. The Model-View-ViewModel pattern works with any bindings solution.
We end with a recap of what we gained from using the Model-View-ViewModel pattern instead of the Model-View-Controller pattern. The changes we apply to Cloudy are pretty dramatic and I am sure you will appreciate the benefits the Model-View-ViewModel pattern has to offer.
This series covers a lot of ground, but I am here to guide you along the way. If you would like to follow along with me, I recommend downloading the source files of each episode. The episodes that include code each have a starter project and a finished project. This makes it easy to follow along or pick a random episode of this series. If you are new to the Model-View-ViewModel pattern, then I recommend watching every episode of this series.