This course is available as part of the raywenderlich.com Professional subscription. To learn more click here
Pro

SOLID in Real-World iOS Apps

Aug 11 2020 · Video Course (42 mins) · Advanced

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.

2.8/5 20 Ratings

Version

  • Swift 5, iOS 13, Xcode 11

Understanding SOLID

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

1

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

2

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.

3

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.

4

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.

5

Refactoring towards SOLID

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

6

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

7

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

8

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

9

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

Contributors

Comments