[APRESS] Pro Objective-C Design Patterns for iOS (Carlo Chung) (2011).pdf

(26910 KB) Pobierz
Use Objective-C design patterns
to bring your iOS skills to the next level
Objective-C Design
Patterns
for
iOS
Carlo Chung
Pro
Download from Wow! eBook <www.wowebook.com>
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
Contents at a Glance
Contents .............................................................................................................. v
About the Author................................................................................................. x
About the Technical Reviewer ........................................................................... xi
Acknowledgments ............................................................................................ xii
Preface ............................................................................................................ xiii
Part I: Getting Your Feet Wet .............................................................................. 1
■Chapter
1: Hello, Design Patterns! .................................................................. 3
■Chapter
2: A Case Study: Designing an App .................................................. 19
Part II: Object Creation ..................................................................................... 45
■Chapter
3: Prototype ..................................................................................... 47
■Chapter
4: Factory Method ............................................................................ 63
■Chapter
5: Abstract Factory .......................................................................... 73
■Chapter
6: Builder ......................................................................................... 85
■Chapter
7: Singleton ...................................................................................... 97
Part III: Interface Adaptation .......................................................................... 107
■Chapter
8: Adapter ...................................................................................... 109
■Chapter
9: Bridge ........................................................................................ 127
■Chapter
10: Façade...................................................................................... 137
Part IV: Decoupling of Objects ........................................................................ 145
■Chapter
11: Mediator ................................................................................... 147
■Chapter
12: Observer................................................................................... 165
iii
CONTENTS AT A GLANCE
Part V: Abstract Collection ............................................................................. 183
■Chapter
13: Composite ................................................................................ 185
■Chapter
14: Iterator ..................................................................................... 201
Part VI: Behavioral Extension ......................................................................... 219
■Chapter
15: Visitor....................................................................................... 221
■Chapter
16: Decorator ................................................................................. 233
■Chapter
17: Chain of Responsibility ............................................................ 253
Part VII: Algorithm Encapsulation .................................................................. 263
■Chapter
18: Template Method ..................................................................... 265
■Chapter
19: Strategy ................................................................................... 281
■Chapter
20: Command ................................................................................. 293
Part VIII: Performance and Object Access ...................................................... 313
■Chapter
21: Flyweight ................................................................................. 315
■Chapter
22: Proxy ........................................................................................ 327
Part IX: State Of Object ................................................................................... 339
■Chapter
23: Memento .................................................................................. 341
Index ............................................................................................................... 361
iv
Part
I
Getting Your Feet Wet
Zgłoś jeśli naruszono regulamin