Book description
The Swift programming language has transformed the world of iOS development and started a new age of modern Cocoa development. Pro Design Patterns in Swift shows you how to harness the power and flexibility of Swift to apply the most important and enduring design patterns to your applications, taking your development projects to master level.
This book will teach you those design patterns that have always been present at some level in your code, but may not have been recognized, acknowledged, or fully utilized. Implementation of specific pattern approaches will prove their value to any Swift developer.
Best-selling author Adam Freeman explains how to get the most from design patterns. He starts with the nuts-and-bolts and shows you everything through to advanced features, going in-depth to give you the knowledge you need.
Pro Design Patterns in Swift brings design patterns to life and shows you how to bring structure and scale to your Swift code with a practical, no-nonsense approach.
In this book, you’ll learn:
Table of contents
- Cover
- Title
- Copyright
- Dedication
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewer
-
Part I: Getting Ready
- Chapter 1: Understanding Design Patterns
- Chapter 2: Getting Used to Xcode
- Chapter 3: Creating the SportsStore App
-
Part II: The Creation Patterns
-
Chapter 4: The Object Template Pattern
- Preparing the Example Project
- Understanding the Problem Addressed by the Pattern
- Understanding the Object Template Pattern
- Implementing the Object Template Pattern
- Understanding the Benefits of the Pattern
- Understanding the Pitfalls of the Pattern
- Examples of the Object Template Pattern in Cocoa
- Applying the Pattern to the SportsStore App
- Summary
-
Chapter 5: The Prototype Pattern
- Understanding the Problem Addressed by the Pattern
- Understanding the Prototype Pattern
- Implementing the Prototype Pattern
- Understanding the Benefits of the Prototype Pattern
- Understanding the Pitfalls of the Prototype Pattern
- Examples of the Prototype Pattern in Cocoa
- Applying the Pattern to the SportsStore App
- Summary
-
Chapter 6: The Singleton Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Singleton Pattern
- Implementing the Singleton Pattern
- Understanding the Pitfalls of the Singleton Pattern
- Examples of the Singleton Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 7: The Object Pool Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Object Pool Pattern
- Implementing the Object Pool Pattern
- Understanding the Pitfalls of the Object Pool Pattern
- Examples of the Object Pool Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
- Chapter 8: Object Pool Variations
-
Chapter 9: The Factory Method Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Factory Method Pattern
- Implementing the Factory Method Pattern
- Variations on the Factory Method Pattern
- Understanding the Pitfalls of the Pattern
- Examples of the Factory Method Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 10: Abstract Factory Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Abstract Factory Pattern
- Implementing the Abstract Factory Pattern
- Variations on the Abstract Factory Pattern
- Understanding the Pitfalls of the Pattern
- Examples of the Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
- Chapter 11: The Builder Pattern
-
Chapter 4: The Object Template Pattern
-
Part III: The Structural Patterns
-
Chapter 12: The Adapter Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Adapter Pattern
- Implementing the Adapter Pattern
- Variations on the Adapter Pattern
- Understanding the Pitfalls of the Adapter Pattern
- Examples of the Adapter Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 13: The Bridge Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Bridge Pattern
- Implementing the Bridge Pattern
- Variations on the Bridge Pattern
- Understanding the Pitfalls of the Bridge Pattern
- Examples of the Bridge Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 14: The Decorator Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Decorator Pattern
- Implementing the Decorator Pattern
- Variations on the Decorator Pattern
- Understanding the Pitfalls of the Decorator Pattern
- Examples of the Decorator Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 15: The Composite Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Composite Pattern
- Implementing the Composite Pattern
- Understanding the Pitfalls of the Composite Pattern
- Examples of the Composite Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 16: The Façade Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Façade Pattern
- Implementing the Façade Pattern
- Variations on the Façade Pattern
- Understanding the Pitfalls of the Façade Pattern
- Examples of the Façade Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 17: The Flyweight Pattern
- Preparing the Example Project
- Understanding the Problems That the Pattern Solves
- Understanding the Flyweight Pattern
- Implementing the Flyweight Pattern
- Variations on the Flyweight Pattern
- Understanding the Pitfalls of the Flyweight Pattern
- Examples of the Flyweight Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 18: The Proxy Pattern
- Preparing the Example Project
- Understanding the Problems That the Pattern Solves
- Understanding the Proxy Pattern
- Implementing the Proxy Pattern
- Variations on the Proxy Pattern
- Understanding the Pitfalls of the Proxy Pattern
- Examples of the Proxy Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 12: The Adapter Pattern
-
Part IV: The Behavioral Patterns
-
Chapter 19: The Chain of Responsibility Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Chain of Responsibility Pattern
- Implementing the Chain of Responsibility Pattern
- Variations on the Chain of Responsibility Pattern
- Understanding the Pitfalls of the Pattern
- Examples of the Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 20: The Command Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Command Pattern
- Implementing the Command Pattern
- Variations on the Command Pattern
- Understanding the Pitfalls of the Command Pattern
- Examples of the Command Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 21: The Mediator Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Mediator Pattern
- Implementing the Mediator Pattern
- Variations on the Mediator Pattern
- Understanding the Pitfalls of the Mediator Pattern
- Examples of the Mediator Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 22: The Observer Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Observer Pattern
- Implementing the Observer Pattern
- Variations on the Observer Pattern
- Understanding the Pitfalls of the Observer Pattern
- Examples of the Observer Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 23: The Memento Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Memento Pattern
- Implementing the Memento Pattern
- Variations on the Memento Pattern
- Understanding the Pitfalls of the Memento Pattern
- Examples of the Memento Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 24: The Strategy Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Strategy Pattern
- Implementing the Strategy Pattern
- Variations on the Strategy Pattern
- Understanding the Pitfalls of the Strategy Pattern
- Examples of the Strategy Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 25: The Visitor Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Visitor Pattern
- Implementing the Visitor Pattern
- Variations on the Visitor Pattern
- Understanding the Pitfalls of the Visitor Pattern
- Examples of the Visitor Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 26: The Template Method Pattern
- Preparing the Example Project
- Understanding the Problem That the Pattern Solves
- Understanding the Template Method Pattern
- Implementing the Template Method Pattern
- Variations on the Template Method Pattern
- Understanding the Pitfalls of the Pattern
- Examples of the Template Method Pattern in Cocoa
- Applying the Pattern to the SportsStore Application
- Summary
-
Chapter 19: The Chain of Responsibility Pattern
-
Part V: The MVC Pattern
- Chapter 27: The Model/View/Controller Pattern
- Index
Product information
- Title: Pro Design Patterns in Swift
- Author(s):
- Release date: January 2015
- Publisher(s): Apress
- ISBN: 9781484203941
You might also like
book
iOS Development with Swift
iOS Development with Swift is a hands-on guide to creating apps for iPhone and iPad using …
book
Simulations in Swift 5: Design and Implement with Swift Playgrounds
Design and implement simulations using Apples Swift Playgrounds. Computer simulations are used to replicate the physical …
video
iOS 13 Programming with Swift 5 - Second Edition
The iOS 13 SDK arrives as a major milestone in the evolution of the Swift language …
video
iOS Development with Swift in Motion
One billion iPhone and iPad users are waiting for the next amazing app. It's time for …