售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Swift 2 Design Patterns
Table of Contents
Swift 2 Design Patterns
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
eBooks, discount offers, and more
Questions
1. Creational Patterns
The prototype pattern
Roles
Design
Participants
Collaborations
Illustration
Implementation
Usage
The factory method pattern
Roles
Design
Participants
Illustration
Implementation
Usage
The singleton pattern
Roles
Design
Participants
Collaborations
Illustration
Implementation
Usage
The abstract factory pattern
Roles
Design
Participants
Collaborations
Illustration
Implementation
Usage
The builder pattern
Roles
Design
Participants
Collaborations
Illustration
Implementation
Usage
Implementation using closures
Summary
2. Structural Patterns – Decorator, Proxy, and Bridge
Static and dynamic composition
The decorator pattern
Roles
Design
Participants
Collaboration
Sample
Implementation
Usage
The proxy pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
Usage
The bridge pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
Usage
Summary
3. Structural Patterns – Composite and Flyweight
The composite pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
Implementation of the VODComponent
Implementation of the VODItem leaf
Implementation of the VODCategory composite
Usage
The flyweight pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
Usage
Performance results
Summary
4. Structural Patterns – Adapter and Facade
The adapter pattern
Roles
Design
Participants
Collaboration
Illustration
Implementing our first prototype
Implementation
Implementation of our adaptees
Implementation of the SamSingAdapter class
Implementation of the PearAdapter class
The facade pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation of the facade
Summary
5. Behavioral Patterns – Strategy, State, and Template Method
The strategy pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
The state pattern
Role
Design
Participants
Collaboration
Illustration
Implementation
The template method
Role
Design
Participants
Collaboration
Illustration
Implementation
Summary
6. Behavioral Patterns – Chain of Responsibility and Command
The chain of responsibility pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
The command pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
Comparison between the chain of responsibility and command patterns
Summary
7. Behavioral Patterns – Iterator, Mediator, and Observer
The iterator pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
The mediator pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
The observer pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
Summary
8. Behavioral Patterns – Visitor, Interpreter, and Memento
The visitor pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
The interpreter pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
The memento pattern
Roles
Design
Participants
Collaboration
Illustration
Implementation
Comparing the three patterns
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜