Hide chapters

Design Patterns by Tutorials

Third Edition · iOS 13 · Swift 5 · Xcode 11

Design Patterns: Elements of Reusable, Object-Oriented Software, the first book to ever describe design patterns, inspired the revolutionary idea of reusable, template solutions to common software development problems. Design patterns aren’t specific to a particular situation, but rather, they are solutions you can adapt and use in countless projects.

The classic text starts off with the following statement:

“Designing object-oriented software is hard.”

Why should software design be hard? We’ve done everything we can to make it easy and understandable, so anyone can learn it.

About this book

We wrote this book with two seemingly opposite goals:

  1. Make as few assumptions as possible about readers’ skill levels.
  2. Make this book useful for both beginning and advanced developers.

We think we’ve done it! The only requirements for reading this book are a basic understanding of Swift and iOS development.

If you’ve worked through our classic beginner books — the Swift Apprentice and the iOS Apprentice — or have similar development experience, you’re ready to read this book.

And if you’re an advanced developer, we also have a lot of great advanced design patterns for you as well!

As you work through this book, you’ll progress from beginning topics to more advanced concepts.

This book has four sections:

I. Hello, Design Patterns!

This is a high-level introduction to what design patterns are, why they’re important, and how they will help you.

You’ll also learn how to read and use class diagrams in this section. This will make it much easier for you to learn design patterns, so it’s important to go over this first to get the most out of the book.

II. Fundamental Design Patterns

This section covers essential iOS design patterns. These patterns are frequently used throughout iOS development, and every iOS developer should understand these well.

These patterns work well in combinations, so all of the chapters in this section walk you through building a single tutorial project from the ground up.

III. Intermediate Design Patterns

This section covers design patterns that are also common, but they’re used less frequently than the fundamental design patterns in Section II.

Many of these patterns work well together, but not all. You’ll create two projects in this section as you explore these intermediate patterns.

IV. Advanced Design Patterns

This section covers design patterns that are very useful in more rare scenarios. These patterns may be exactly the right solution for a particular problem, but they might not have a place in your day-to-day development. But they’re still amazing patterns that you should keep in the back of your development toolbox!

You’ll build several tutorial projects throughout this section.

Chapter structure

Each design pattern chapter in Sections II through IV follow a similar structure:

  • What is it?

    This section gives a class diagram and explains the design pattern.

  • When should you use it?

    This section describes the design pattern’s strengths and provides examples where the design pattern works well.

  • Playground example

    This section shows you how to use the design pattern within a playground example. This isn’t meant to be a complete project, but rather, it’s a standalone example to teach you the basics of the design pattern.

  • What should you be careful about?

    This section describes the shortcomings, weaknesses and caveats of a particular pattern. Every pattern can be misused, so it’s best to know upfront when not to use a pattern.

  • Tutorial project

    This section guides you through using the design pattern in a tutorial app.

  • Key points

    This section provides a summary of what you learned and key points to remember for the chapter.

How to read this book

If you’re a beginner to iOS development or design patterns, you should read this book from cover to cover.

If you’re an advanced developer, or already have experience with some design patterns, you can skip from chapter to chapter or use this book as a reference. While some tutorial projects are shared between chapters, you’ll always be provided with a starter project in each chapter to get you up and running quickly. What’s the absolute best way to read this book? Just start reading, wherever makes sense to you!

Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum here.
© 2024 Kodeco Inc.