
Explore the mvvm design pattern in iOS with SwiftUI, from a basic counter to a movies app and a banking app with Node.js Express backend.
Prerequisites for this MVVM in iOS with SwiftUI course: intermediate Swift and SwiftUI experience, familiarity with state management and bindings, and optional NodeJS Express with JavaScript for backend.
Download exercise files and Xcode starter projects attached to each lecture to understand the project structure and code, including the movies app starter in section four.
Explore the mvvm design pattern by showing how the model, view, and view model interact as a middleman to display data on the view for maintainable iOS apps using SwiftUI.
Master the mvvm approach for web APIs, routing data from the view to the view model and onward to a web service or client, avoiding direct view calls.
Explore a basic counter app built with the mvvm design pattern in ios using swiftui, displaying a premium message when the count is a multiple of three.
Demonstrate mvvm with SwiftUI by placing business logic in the model, computing a premium flag for multiples of three, and exposing it via the view model.
Build a movie search app with mvvm in iOS using SwiftUI, fetch IMDb JSON data, display images with an url image control, and show detail with a rating control.
Register for an IMDb API account to obtain an API key for movie search and details. Use the free option for your educational SwiftUI movie app.
Explore the starter project for mvvm in ios using swiftui, with constants, image loader, url image control, rating control, placeholder asset, and http client, models, and views for movies.
Create a movie model and a movie response to decode a root JSON object. Map camelcase keys to Swift properties with coding keys and prepare for an http client.
Build an http client to fetch IMDb data by search term, decode json into movie models via a movie response, and return results with a result-based completion handler.
Test the http client by calling the get movies by function, handle success and failure, map results to movie models, and verify the output display.
Refactor the HTTP client by moving URL construction into a single URL extension. Build the search URL with URL.forMovies(forName:) using the movie name and API key, preserving functionality.
Learn how to add a loading state to an iOS SwiftUI MVVM app, conditionally rendering loading, content, or failed views, and implement string trimming and escaping for search.
Implement a movie detail model in Swift as a decodable structure, with properties like title, year, rated, plot, director, actors, imdbID, imdbRating, and poster, mapped from capitalized keys using CodingKeys.
Implement the get movie detail by IMDb id endpoint by building a URL with the IMDb id and API key, then fetch and decode to MovieDetail, returning a result.
Explore building a bank app with the MVVM design pattern in iOS using SwiftUI, including creating accounts and transferring funds via a Node.js Express backend hosted on Glitch.
Learn to set up a node.js express server on glitch, exposing a dreams endpoint that returns a json array, and understand when to use glitch for demos rather than production.
Create an observable account summary view model and account view model to fetch accounts, map models to view-friendly data, and present name, id, type, balance, and a total balance.
Refactor the account list with mvvm in ios using swiftui by extracting an account cell, embedding the view in a navigation view, and using geometry reader to size total view.
Implement a post endpoint for accounts using NodeJS and Express, parsing JSON bodies for name, account type, and balance, returning a success response and testing with Postman.
Add a create account function to the account service with a create account request model, and post json to the server, decoding a create account response.
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!