https://www.youtube.com/watch?v=eKtWY0962Hg 🎯 Difficulty: Intermediate to Advanced In this speed coding session, we write unit tests for a Swift ViewModel built with the MVVM architecture and powered by Combine and @MainActor concurrency. You’ll see how to: ✅ Write precise and meaningful unit tests using XCTest 🔍 Test async @MainActor functions with Combine’s @Published properties 🧪 Mock … Continue reading Speed coding – Unit Testing the MVVM in Swift
IOS Modularization and Unit Testing Feedback Speed
When an app is actively being developed, it tends to grow larger day by day. Over time, as engineers, we need to manage and maintain this growing codebase efficiently. If we don’t modularize it properly, we will eventually face significant challenges. Some of these include: Difficulty in maintenance Difficulty in adapting to new changes Slower … Continue reading IOS Modularization and Unit Testing Feedback Speed
Dependency Inversion Principle (DIP) in iOS Swift
The Dependency Inversion Principle (DIP) is a fundamental concept in software development that helps create flexible and maintainable code. In this article, I'll explore its history, the problem of tight coupling, and different approaches to applying DIP in Swift. History of the Dependency Inversion Principle The Dependency Inversion Principle (DIP) was introduced by Robert C. Martin, also known … Continue reading Dependency Inversion Principle (DIP) in iOS Swift
Understanding the Liskov Substitution Principle (LSP) in Swift
The Liskov Substitution Principle (LSP) is one of the five SOLID principles of object-oriented design. It states that: "Objects of a superclass should be replaceable with objects of a subclass without affecting the correctness of the program.” (Paraphrased from Barbara Liskov’s) Barbara Liskov, a pioneering computer scientist, introduced this principle in 1987 as part of her research … Continue reading Understanding the Liskov Substitution Principle (LSP) in Swift
Open/Closed Principle (OCP) in Swift using Decorator Pattern
SOLID: Open Close Principle Overview The Open/Closed Principle (OCP) is one of the fundamental principles of object-oriented design, forming part of the SOLID principles. The concept is simple: “Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.” This principle encourages building systems where new functionality can be added without altering existing code. This leads to … Continue reading Open/Closed Principle (OCP) in Swift using Decorator Pattern
Understanding the Decorator Pattern in Swift: A Practical Example
Overview Design patterns are a cornerstone of software development, providing reusable solutions to common problems. The Decorator Pattern is a structural design pattern that allows you to dynamically add new behavior to objects without altering their structure. It follows the Open/Closed Principle, which states that a class should be open for extension but closed for modification. In this … Continue reading Understanding the Decorator Pattern in Swift: A Practical Example
WordPress Scheduled Post: “#4 Part 4.1- iOS – TDD – Random Character App – Swift – Enable the Power of TDD to Refactor MVVM to State based MVVM”
In this video, we will learn how to safely refactor our ViewModel using TDD using State based ViewModel variation. Let's dive in into the second part of 4th video, State base MVVM with TDD!
4 Part 4 – iOS – TDD – Random Character App – MVVM ViewModel
In this new series, we will be learning how we can use Test Driven Development on a networking based iOS project app, and in this case, we will fetch random character from `rickandmortyapi` and display it to the screen! In this video, we will learn how we can build our ViewModel component using Test Driven … Continue reading 4 Part 4 – iOS – TDD – Random Character App – MVVM ViewModel
#3 Part 3 – iOS – TDD – Random Character App – The Power of Tests on During Refactoring
In this new series, we will be learning how we can use Test Driven Development on a networking based iOS project app, and in this case, we will fetch random character from `rickandmortyapi` and display it to the screen! Refactoring is actually changing the implementation without changing the behavior. In this video, we can achieve … Continue reading #3 Part 3 – iOS – TDD – Random Character App – The Power of Tests on During Refactoring
#2 Part 2 – iOS – TDD – Random Character App – TDD Networking with Moya (Continue)
In this new series, we will be learning how we can use Test Driven Development on a networking based iOS project app, and in this case, we will fetch random character from `rickandmortyapi` and display it to the screen! Let's dive in into the second part, the Test Drive Networking layer. We will learn on … Continue reading #2 Part 2 – iOS – TDD – Random Character App – TDD Networking with Moya (Continue)