SOLID in Real-World iOS Apps

Get an overview of the SOLID code craft guidelines, how they apply to Swift code, and how you can refactor your current code towards them. By Alex Curran.

2.3 (42) · 2 Reviews

Save for later
Comments
Share

Who is this for?

iOS developers looking to understand how code craft can be applied to everyday work. This course expects you to be familiar with mid-to-advanced level Swift development.

Covered concepts

  • SOLID aspects
  • How to write adhering to those aspects
  • How to refactor code current code to better fit SOLID guidelines

Part 1: Understanding SOLID

01
Toggle description

After an introduction to SOLID and the Single Responsibility Principle, learn how to refactor common iOS methods to move towards singly-responsible code.

Toggle description

Understand and use the Open/Closed Principle and learn how structs can make code that is more extensible and open.

Toggle description

Find out what Liskov's Substitution is and how to build protocols which conform to it. Then understand the Circle-as-an-Ellipse problem, basic violations of the principle and how to avoid them.

Toggle description

Learn why Interface Segregation is a useful way to avoid code creep, what a role interface is and how to find them in your code and identifying role interfaces in iOS APIs.

Toggle description

Understand the difference between Dependency Inversion and Injection. Learn to build a data loader with inverted dependencies and use interfaces to abstract API-specific behavior.

Part 2: Refactoring towards SOLID

Toggle description

Refactor multiple responsibilities out of a large class and how to slowly move responsibilities without breaking large chunks of code.

Toggle description

Learn how to refactor a closed system and what disadvantages it brings, then understand the benefits of opening up a closed system.

Toggle description

Identify roles and splitting out smaller protocols from a large one and how to keep minimize breaking changes using interface extensions.

Toggle description

Learn how to test code with inverted dependencies, build mocks by hand and compare the testability of SOLID-ly built code with other code.