Introduction

This course explores advanced SwiftUI concepts and techniques while building a solid foundation for creating clean and maintainable code using the MVVM (Model-View-ViewModel) architectural pattern. You’ll learn how to implement MVVM in your SwiftUI projects and learn advanced SwiftUI techniques to build complex applications.

What is MVVM?

The MVVM pattern consists of three layers:

  • Model: App data that the app operates on.
  • View: The user interface’s visual elements.
  • ViewModel: Updates the model from view inputs and updates views from model outputs.

Why Use MVVM?

MVVM offers these advantages over Model-View-Controller (MVC):

  • Reduced complexity: MVVM makes the view simpler by moving a lot of business logic out of it.
  • Expressive: The view model better expresses the business logic for the view.
  • Easier to test: A view model enables you to test business logic without worrying about view implementations.

Learning Objectives

In this lesson, you’ll:

  • Learn what MVVM is and how it applies to iOS development in SwiftUI.
  • Learn the purpose and responsibilities of ViewModels in SwiftUI apps.
  • Design and structure a ViewModel for a specific SwiftUI view.

Prerequisites

This course assumes you’re an intermediate-level iOS developer who wants to take your SwiftUI skills to the next level by leveraging the power of Model-View-ViewModel (MVVM) architecture. You should be comfortable using Swift and SwiftUI to develop iOS apps.

See forum comments
Download course materials from Github
Next: Instruction