
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 design patterns as best practices that solve problems by defining relationships between classes and objects, and see how the MVVM design pattern fits into the big picture.
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.
Explore why MVVM improves iOS apps by using a password reset view model to validate username, new password, and confirm password data before sending JSON to a service.
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.
Explore how mvvm design pattern integrates with swiftui to build a simple counter app with a view, a button, and a premium value indicator (multiple of three).
Create a counter model in a models group with a value set to zero, a mutating increment function, and premium logic for multiples of three.
discover how to use a view model in SwiftUI with observable object and published properties, keeping the view out of the model and exposing only the updated counter value.
Learn to implement a counter in the MVVM pattern for iOS using SwiftUI, binding the view to a counter view model, and display premium logic for multiples 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.
Use the OMDB API to search movies by keyword, returning titles, year, IMDb ID, type, and poster, then fetch details by IMDb ID with API key.
Explore an mvvm architecture in iOS using SwiftUI by building a screen with a movie list view, powered by a view model that feeds image and rating subviews.
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.
Implement the movie list view model and movie view model to expose IMDb ID and title, fetch movies by name via HTTP client, and publish updates on the main queue.
Create a movie list screen as the root view, bind it to a movie list view model, fetch Batman movies, and display results in a navigable, image-rich list.
Add a search text field bound to a movie name state, trigger a search by name in the view model, and style the field with padding and rounded borders.
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.
Implement a movie detail view model conforming to observable object, exposing title, poster, plot, rating, and director, and fetch details by IMDb ID via an http client with main-thread updates.
Explore prerequisites for this section by using MVVM design pattern with iOS and SwiftUI, and learn to set up, host, and test a NodeJS backend on glitch server.
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.
Access exercise files for the surf UI app and a Node Express server, download the Bank Account Final code, and use the GitHub repository to import and run the project.
Demonstrate a mvvm iOS SwiftUI client with a server-side bank app that uses json, domain objects, and an account service to move logic off the client.
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.
Set up a Node and Express server on Glitch to return a JSON array of dummy accounts via /api/accounts, and show how a SwiftUI iOS app fetches it with URLSession.
Implement a singleton account service in MVVM iOS with SwiftUI to fetch all accounts over the network, decode JSON, and supply results to the view model.
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.
Define the single account type per user rule (checking or savings) and implement it on the server side with node and Express JS within an mvvm iOS SwiftUI project.
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.
Develop domain account objects in JavaScript by creating an Account class with a save method, UUID IDs, and export for server use, enforcing unique account types per user.
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.
Implement the add account view model in mvvm pattern for iOS using SwiftUI; validate name and balance, publish error messages, and handle account creation via a completion-based asynchronous flow.
Implement an add account screen using a bound form in a SwiftUI MVVM app, presenting it as a sheet and handling success or error in the view model.
Learn to validate input and display errors on add account, ensure main-thread UI updates for published properties, and refresh the account list automatically when the add-account sheet is dismissed.
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!