Mvvm Design Pattern In Swiftui

Tags: SwiftUI

Covers consuming JSON, Client-Server MVVM architecture, Screen-View Pattern

Last updated 2022-01-10 | 4.5

- Understanding the MVVM design pattern
- Consuming a JSON API in SwiftUI application
- Building SwiftUI applications using MVVM design pattern

What you'll learn

Understanding the MVVM design pattern
Consuming a JSON API in SwiftUI application
Building SwiftUI applications using MVVM design pattern
Building server using NodeJS
ExpressJS using JavaScript

* Requirements

* Swift Language Knowledge is recommended
* SwiftUI knowledge is recommended
* NodeJS
* ExpressJS and JavaScript is recommended but not required
* Xcode 11.5 or above

Description

SwiftUI is Apple’s new declarative framework for building applications for any Apple device. Although you can use any design pattern to build your SwiftUI apps, MVVM pattern is preferred due to the declarative nature of the SwiftUI framework.

In this course, you will learn how to build practical real world SwiftUI apps using MVVM Design Pattern. You will also learn how MVVM patterns behave in client/server applications.


What is MVVM Design Pattern?

In this section you will learn the basics of MVVM Design Pattern. You will learn the purpose and need for MVVM and what problems it solves when developing SwiftUI applications.


Getting Started with MVVM in SwiftUI Apps

In this section you will get started with building SwiftUI applications using MVVM framework. We will start slowly by building a simple counter application with some business rules. This section will set the foundation for the rest of the course.


Movies App

The Movies App spans over multiple sections of the course. You will learn how to build a Movie app, which allows you to search movies using OMDB API. The app will showcase how to write a service layer, which fetches JSON from an API. The app will also demonstrate how to show the detail screen of the movie when selected.


Bank App

The Bank App consists of multiple sections of the course. In this section you will be responsible for building the complete backend using NodeJS, ExpressJS and JavaScript hosted on Glitch platform. This app will showcase how MVVM pattern is implemented for SwiftUI app in a distributed environment.


I am super excited for this course and I am 100% confident that you will enjoy the course.


Thanks and happy coding!

Who this course is for:

  • Developers curious about how to build SwiftUI apps using MVVM Design Pattern
  • Developers who wants to create more maintainable SwiftUI applications
  • Developers who wants to create client/server applications in iOS

Course content

14 sections • 73 lectures

What are Design Patterns? Preview 01:12

What is MVVM? Preview 02:41

Why MVVM? Preview 02:32

MVVM Architecture and Web APIs Preview 01:42

Difference Between View Model and Model Preview 00:11

Understanding the App Preview 00:48

Creating the User Interface Preview 03:39

Creating the Model Preview 04:16

Creating the View Model Preview 07:39

Incrementing the Counter and Displaying on Screen Preview 05:11

Adding Business Rules to the Model Preview 06:06

What are we building? Preview 01:16

Registering OMDB Account Preview 02:27

Understanding the OMDB API Preview 04:26

Understanding the App Architecture Preview 03:41

Understanding the Starter Project Preview 05:15

Resources: URLImage and Rating View in SwiftUI Preview 00:09

Implementing Model Preview 06:51

Implementing HTTP Client Preview 08:02

Testing HTTP Client Preview 04:30

Refactoring HTTP Client Preview 03:13

Implementing MovieListViewModel Preview 09:03

Populating Movies in List Preview 10:28

Searching Movies by Name Preview 04:51

Adding LoadingState to Conditionally Render Views Preview 13:43

Implementing MovieDetail Model Preview 03:46

Implementing getMovieDetail HTTPClient End Point Preview 03:55

Implementing MovieDetailViewModel Preview 05:50

Populating MovieDetailScreen Preview 08:09

Prerequisites Preview 00:59

What we will be building? Preview 01:21

Exercise Files Preview 01:43

IMPORTANT: Architecture Overview Preview 04:55

Glitch Server (NodeJS and Express) Preview 05:18

IMPORTANT: Waking Up Glitch Server Preview 00:20

Returning All Accounts from the Server Preview 06:37

Implementing Account Service to Get All Accounts Preview 09:17

Creating AccountSummaryViewModel and AccountViewModel Preview 11:27

Displaying Accounts Preview 12:32

Refactoring AccountListView and Toggle Total Preview 07:49

Understanding the Business Rules for Account Creation Preview 01:20

Implementing Create Account NodeJS and Express End Point Preview 07:26

Creating Domain Account Objects Preview 15:23

Implementing Account Service Create Account Function Preview 08:24

Implementing AddAccountViewModel and UI Validation Preview 09:01

Implementing AddAccountScreen Preview 15:08

Refreshing Account List and Displaying Error Messages Preview 05:32

Understanding the Business Rules for Transferring Funds Preview 00:52

Implementing Business Domain Objects on Server Using NodeJS and Express Preview 10:02

Implementing Transfer on AccountService Preview 11:27

Implementing TransferFundViewModel Preview 04:54

Presenting TransferFundsScreen Preview 06:14

Implementing TransferFundsScreen Preview 19:09

Filtering Accounts and Visibility Preview 06:01

Implementing Transferring Funds Action Preview 09:40

Performing Funds Transfer Preview 09:37

Minor UI Fixes and Refactoring Preview 04:23

What we will be building? Preview 02:13

Understanding the Starter Project Preview 03:35

Register OpenWeatherMap Account Preview 03:43

Implementing Models Preview 15:01

Implementing AddWeatherViewModel Preview 05:30

Presenting Sheets for WeatherListScreen and AddCityScreen Preview 05:30

Adding Weather to EnvironmentObject Global Store Preview 07:27

Displaying Weather on Screen Preview 09:13

Saving Temperature Unit in UserDefaults Preview 07:12

Converting Between Temperature Units Preview 03:39

Displaying Converted Temperature on the Screen Preview 06:44