Select Page

Mastering MVVM With Swift 3

“I don’t feel in control of my project’s architecture.”


“MVC simply doesn’t cut it. There must be a better solution.”

Yours Truly

Massive View Controller Syndrome

Firing up Xcode and starting a new project is a great feeling. The first few days or weeks don’t feel like work. Everything goes according to plan.

But as the code base of your project grows, it becomes harder and harder to manage the project. The view controllers of your project start to put on weight … a lot of weight. They become more than view controllers. They take on responsibilities they didn’t sign up for. Don’t they?

Yet you’ve done everything right. You’ve stuck to the rules of the Model-View-Controller pattern. Why have you coded yourself in a corner? And why is it frustrating or downright scary to add features or refactor existing functionality?

It’s Time to Cure MVC

If your project is suffering from Massive View Controller syndrome, then the Model-View-ViewModel pattern is the cure to your problem. The Model-View-ViewModel pattern has been around for many, many years, but it only recently gained traction in the Cocoa community.

MVVM extends MVC by resolving common issues. The result is a robust application architecture with lean view controllers, improved testability, and a better separation of concerns. How does that sound?

Take Control of Your Project With MVVM

In Mastering MVVM With Swift 3, we refactor an existing application built with MVC to use MVVM instead. The results are dramatic and the MVVM pattern is surprisingly easy to adopt in your own projects.

You learn the differences between Model-View-Controller and Model-View-ViewModel, highlighting the benefits Model-View-ViewModel has over Model-View-Controller.

After a short introduction, we take an application built with Model-View-Controller and refactor it to use Model-View-ViewModel instead. Along the way, you learn about the anatomy of view models, how to create them, and how to test them.

Last but not least, we add protocols and protocol-oriented programming to the mix to further simplify the view controllers in the project.

At the end of this course, you have the knowledge and, more importantly, the hands-on experience to apply Model-View-ViewModel in your own projects.

Ready for Xcode 8 and Swift 3

In Mastering MVVM With Swift 3, you learn everything you need to know to integrate MVVM in a new or an existing Swift project. We focus on the key aspects of the pattern and refactor an application that takes advantage of the core features of MVVM. We use the latest and greatest to build an application, which means we use Xcode 8 and Swift 3.

Battling Massive View Controller Syndrome

Are the view controllers of your projects suffering from Massive View Controller syndrome? You’ve carefully crafted the architecture of your application using the Model-View-Controller pattern and, yet, the view controllers of your project are ready to burst and they’re impossible to test.

Adding a feature forces you to wade through hundreds of lines of code. You hope you don’t break anything while you carefully add a few lines of code. Don’t get me wrong. Your code isn’t bad. But there’s just so much of it. You’ve applied the Model-View-Controller pattern like you were told to and you still end up with an architecture you aren’t quite happy with. Does this sound familiar?

It’s Not You. It’s MVC.

Because Apple’s frameworks are impregnated with the Model-View-Controller pattern we think it’s the right or only tool for the job. Don’t make the same mistake. There’s nothing wrong with the Model-View-Controller pattern, but there are better alternatives, especially if you’re using Swift.

Put Your View Controllers On a Diet

It’s time to put the view controllers of your project on a diet. I’m sure you’ve heard about the Model-View-ViewModel pattern. It’s the new cool kid in town. But the thing is that it isn’t a kid. MVVM has been around for many, many years and has earned its stripes. It’s a proven strategy for robust, scalable applications.

Where Should This Code Go?

I bet you’ve asked yourself many times “Where should I put this piece of code?” Every developer asks himself/herself this question, multiple times a day. If you’re still using MVC, then chances are that the answer is “the view controller”. Stop. Give MVVM a shot. You can thank me later.

MVVM is a perfect fit for Cocoa applications powered by Swift. The view model unburdens the view controller from the ungrateful task of data manipulation and transformation. The result is a focused, testable view model and a skinny, lightweight view controller.

Mastering MVVM With Swift 3

The Model-View-ViewModel pattern isn’t rocket science. In Mastering Model-View-ViewModel With Swift 3, you learn the ins and outs of the Model-View-ViewModel pattern by refactoring an application built with MVC.

You learn how to create, use, and test view models. You use protocol-oriented programming to further simplify the view controllers of the project. You also learn how to easily adopt the Model-View-ViewModel pattern in your own projects.

Stop wasting time trying to fit your application’s architecture in the Model-View-Controller pattern if you have an alternative with a proven track record. Did I mention that Mastering Model-View-ViewModel With Swift 3 uses the latest Swift syntax?

What Others Are Saying

A big thank you. This has been the single most effective course I've taken about iOS. I put it into practice right away and our App Store app, and its testing, has benefited greatly.

Jake Young

Chief Information Officer

You made a daunting subject a lot more manageable.

Kitson Broadhurst

This is by far the best explanation of Core Data I have read. After working on my first Core Data project for the last three days, I actually understand what you are saying here.

Gravity Zero Design

Wow, I really love these tutorials. Great job. You are very good at explaining things from the ground up in a way that is both fast (not boring) and yet comprehensive.

Jonas Nelle

This is one of the finest Swift material available on the internet. Thank you.

Rakesh Kusuma

Is This Course for you?

You Are Fed Up With MVC

You already have experience building applications using Swift and Xcode, but you’re not happy or fed up with the MVC pattern.

You Are Looking for a Better Solution

You know it’s time to step up your game. It’s time to move beyond the Model-View-Controller pattern. You’ve outgrown MVC and are ready for MVVM.

You Want to Build Scalable Applications

Your goal is to build robust, scalable applications for Apple’s platforms using Swift.

You Want to Learn From a Professional

You don’t want to plough through countless tutorials—most of which are out of date—that only show you partial implementations.

Frequently Asked Questions

When does the course start and finish?

The course starts now and never ends. You learn at your own pace. You decide when you start and when you finish. I am here to help you along the way if anything’s unclear.

How long do I have access to the course?

How does lifetime access sound? After purchasing the course, you have unlimited access to this course for as long as you like. You can access the course on any device you own.

What if I am unhappy with the course? Can I get a refund?

I would never want you to be unhappy. If you’re unsatisfied with your purchase, contact me within the first 30 days and I’ll give you a full refund.

Something’s not clear. Where can I get help?

If you need help with something related to the course, then get in touch with met at [email protected] I’m here to help you finish the course successfully.

Who Am I?

My name is Bart Jacobs and I’m the founder of Code Foundry, a mobile development company. I’ve been teaching since 2004 and I currently focus primarily on teaching Swift developers how to create robust, scalable applications for Apple’s platforms using Swift and the Cocoa frameworks.

I’m crazy about film music and I have a soft spot for tea and coffee. I’m currently weaned off coffee, but we’ll see how long that lasts.

Course Curriculum


Module 1 What Is Model-View-ViewModel

  • Is Model-View-Controller Dead (5:56)
  • How Does Model-View-ViewModel Work (3:29)

Module 2 Cloudy

  • Meet Cloudy (6:37)
  • What Is Wrong With Cloudy (2:57)

Module 3 Creating and Working With View Models

  • A Quick Recap (2:16)
  • Time to Create a View Model (5:37)
  • Put the View Model to Work (3:16)
  • Rinse and Repeat (6:38)
  • Using MVVM In the Settings View (5:05)

Module 4 Protocols Love MVVM

  • Adding Protocols to the Mix (2:24)
  • Making Table View Cells Autoconfigurable (2:52)
  • Supercharging View Models With Protocols (5:19)

Module 5 Putting It to the Test

  • Ready, Set, Test (1:50)
  • Writing Unit Tests for View Models (6:58)
  • Using Stubs for Better Tests (6:29)
  • A Few More Tests (3:58)

Module 6 MVVM and Bindings

  • Taking MVVM to the Next Level With Bindings (5:14)
  • What Are the Options (2:06)
  • DIY Bindings (10:46)
  • Why RxSwift (1:40)
  • Integrating RxSwift and RxCocoa (1:36)
  • Refactoring the View Model (5:57)
  • Refactoring the View Controller (4:27)
  • Protocol Oriented Programming and Dependency Injection (6:06)
  • Testing and Mocking (7:28)

Where to Go From Here

Share This