100% found this document useful (3 votes)
39 views

Immediate Download Design Patterns by Tutorials Third Edition Learning Design Patterns in Swift Raywenderlich Tutorial Team Ebooks 2024

Tutorial

Uploaded by

wazzanrounas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
39 views

Immediate Download Design Patterns by Tutorials Third Edition Learning Design Patterns in Swift Raywenderlich Tutorial Team Ebooks 2024

Tutorial

Uploaded by

wazzanrounas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Download the full version of the textbook now at textbookfull.

com

Design Patterns by Tutorials Third Edition


Learning Design Patterns in Swift
Raywenderlich Tutorial Team

https://textbookfull.com/product/design-patterns-
by-tutorials-third-edition-learning-design-
patterns-in-swift-raywenderlich-tutorial-team/

Explore and download more textbook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Design Patterns by Tutorials Learning design patterns in


Swift 4 2 Joshua Greene

https://textbookfull.com/product/design-patterns-by-tutorials-
learning-design-patterns-in-swift-4-2-joshua-greene/

textbookfull.com

iOS 11 by Tutorials Learning the new iOS APIs with Swift 4


1st Edition The Raywenderlich Tutorial Team

https://textbookfull.com/product/ios-11-by-tutorials-learning-the-new-
ios-apis-with-swift-4-1st-edition-the-raywenderlich-tutorial-team/

textbookfull.com

RxSwift Reactive Programming with Swift Third Edition


Raywenderlich Tutorial Team

https://textbookfull.com/product/rxswift-reactive-programming-with-
swift-third-edition-raywenderlich-tutorial-team/

textbookfull.com

Raptor Medicine Surgery and Rehabilitation Second Edition


D.E. Scott

https://textbookfull.com/product/raptor-medicine-surgery-and-
rehabilitation-second-edition-d-e-scott/

textbookfull.com
Helping Your Transgender Teen A Guide for Parents 2nd
Edition Irwin Krieger

https://textbookfull.com/product/helping-your-transgender-teen-a-
guide-for-parents-2nd-edition-irwin-krieger/

textbookfull.com

A Statin Nation Damaging Millions in a Brave New Post


health World Malcolm Kendrick

https://textbookfull.com/product/a-statin-nation-damaging-millions-in-
a-brave-new-post-health-world-malcolm-kendrick/

textbookfull.com

Deception in the Digital Age: Exploiting and Defending


Human Targets Through Computer-Mediated Communications
Cameron H. Malin
https://textbookfull.com/product/deception-in-the-digital-age-
exploiting-and-defending-human-targets-through-computer-mediated-
communications-cameron-h-malin/
textbookfull.com

Co-Immunoprecipitation Methods for Brain Tissue Yuji


Odagaki

https://textbookfull.com/product/co-immunoprecipitation-methods-for-
brain-tissue-yuji-odagaki/

textbookfull.com

Computer Algebra in Scientific Computing 20th


International Workshop CASC 2018 Lille France September 17
21 2018 Proceedings Vladimir P. Gerdt
https://textbookfull.com/product/computer-algebra-in-scientific-
computing-20th-international-workshop-casc-2018-lille-france-
september-17-21-2018-proceedings-vladimir-p-gerdt/
textbookfull.com
The Captain of A Lady s Heart 1st Edition Alice Kirks
Kirks Alice

https://textbookfull.com/product/the-captain-of-a-lady-s-heart-1st-
edition-alice-kirks-kirks-alice/

textbookfull.com
Design Patterns by Tutorials

Design Patterns by Tutorials


By Joshua Greene & Jay Strawn

Copyright ©2019 Razeware LLC.

Notice of Rights
All rights reserved. No part of this book or corresponding materials (such as text,
images, or source code) may be reproduced or distributed by any means without prior
written permission of the copyright owner.

Notice of Liability
This book and all corresponding materials (such as source code) are provided on an
“as is” basis, without warranty of any kind, express of implied, including but not
limited to the warranties of merchantability, fitness for a particular purpose, and
noninfringement. In no event shall the authors or copyright holders be liable for any
claim, damages or other liability, whether in action of contract, tort or otherwise,
arising from, out of or in connection with the software or the use of other dealing in
the software.

Trademarks
All trademarks and registered trademarks appearing in this book are the property of
their own respective owners.

raywenderlich.com 2
Design Patterns by Tutorials

Dedications
"For my girls. I love you very much."

— Joshua Greene

"To my friends and family, thank you for being extremely


supportive and loving while I undertook this huge endeavor.
To Joshua Greene, thank you for being a great mentor and
wellspring of ideas. To the raywenderlich.com editors and
staff, thank you for your fantastic help and hard work."

— Jay Strawn

raywenderlich.com 3
Design Patterns by Tutorials

About the Authors


Joshua Greene is an author of this book. He's an experienced
software developer and has created many mobile apps. When he's
not slinging code, you can find him wandering the streets of Tokyo.
You can reach him on Twitter @jrg_developer.

Jay Strawn is an author of this book. Jay is passionate about


languages both human and code-based, art, and zines.

About the Editors


Matt Galloway is the final pass editor for this book. He is
passionate about software and likes to share what he has learned
with others through things such as this book. In recent years he’s
been dabbling in the world of management in software
engineering. But don’t hold that against him! You can find him on
Twitter as @mattjgalloway.

Darren Ferguson is a tech editor for this book. He is an


experienced software developer and works for M.C. Dean, Inc, a
systems integration provider from North Virginia. When he's not
coding, you'll find him enjoying EPL Football, traveling as much as
possible and spending time with his wife and daughter.

raywenderlich.com 4
Design Patterns by Tutorials

Aaron Douglas is a tech editor for this book. He was that kid
taking apart the mechanical and electrical appliances at five years
of age to see how they worked. He never grew out of that core
interest - to know how things work. He took an early interest in
computer programming, figuring out how to get past security to be
able to play games on his dad's computer. He's still that feisty nerd,
but at least now he gets paid to do it. Aaron works for Automattic
(WordPress.com, WooCommerce, SimpleNote) as a Mobile Maker/
Lead primarily on the WooCommerce mobile apps. Find Aaron on
Twitter as @astralbodies or at his blog at aaron.blog.

About the Artist


Vicki Wenderlich is the designer and artist of the cover of this
book. She is Ray’s wife and business partner. She is a digital artist
who creates illustrations, game art and a lot of other art or design
work for the tutorials and books on raywenderlich.com. When she’s
not making art, she loves hiking, a good glass of wine and
attempting to create the perfect cheese plate.

raywenderlich.com 5
Design Patterns by Tutorials

Table of Contents: Overview


Book License ............................................................................................. 14
Book Source Code & Forums ............................................................. 15
About the Cover ...................................................................................... 17
Introduction .............................................................................................. 18
Section I: Hello, Design Patterns! ................................. 21
Chapter 1: What are Design Patterns? .............................. 22
Chapter 2: How to Read a Class Diagram ......................... 29
Section II: Fundamental Design Patterns ................... 39
Chapter 3: Model-View-Controller Pattern .................... 40
Chapter 4: Delegation Pattern .............................................. 65
Chapter 5: Strategy Pattern ................................................... 88
Chapter 6: Singleton Pattern .............................................. 101
Chapter 7: Memento Pattern .............................................. 115
Chapter 8: Observer Pattern .............................................. 135
Chapter 9: Builder Pattern ................................................... 143
Section III: Intermediate Design Patterns ............... 164
Chapter 10: Model-View-ViewModel Pattern ............. 165
Chapter 11: Factory Pattern ............................................... 180
Chapter 12: Adapter Pattern .............................................. 188
Chapter 13: Iterator Pattern ............................................... 202
Chapter 14: Prototype Pattern .......................................... 211

raywenderlich.com 6
Design Patterns by Tutorials

Chapter 15: State Pattern .................................................... 220


Chapter 16: Multicast Delegate Pattern ........................ 241
Chapter 17: Facade Pattern ................................................ 254
Section IV: Advanced Design Patterns ..................... 267
Chapter 18: Flyweight Pattern ........................................... 268
Chapter 19: Mediator Pattern ............................................ 276
Chapter 20: Composite Pattern ......................................... 299
Chapter 21: Command Pattern .......................................... 310
Chapter 22: Chain-of-Responsibility Pattern .............. 326
Chapter 23: Coordinator Pattern...................................... 344
Conclusion .............................................................................................. 372

raywenderlich.com 7
Design Patterns by Tutorials

Table of Contents: Extended


Book License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Book Source Code & Forums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
About the Cover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
About this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
How to read this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Section I: Hello, Design Patterns! . . . . . . . . . . . . . . . . . . 21


Chapter 1: What are Design Patterns? . . . . . . . . . . . . . . . . . . . . . . 22
A real-world example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Example explanation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Types of design patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Criticisms of design patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Benefits of design patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Chapter 2: How to Read a Class Diagram . . . . . . . . . . . . . . . . . . . . 29
What’s in a class diagram? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Section II: Fundamental Design Patterns . . . . . . . . . . 39


Chapter 3: Model-View-Controller Pattern . . . . . . . . . . . . . . . . . 40
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

raywenderlich.com 8
Design Patterns by Tutorials

Chapter 4: Delegation Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65


When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Chapter 5: Strategy Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Chapter 6: Singleton Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Chapter 7: Memento Pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Chapter 8: Observer Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

raywenderlich.com 9
Design Patterns by Tutorials

Chapter 9: Builder Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143


When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Where to go from here? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

Section III: Intermediate Design Patterns . . . . . . . . 164


Chapter 10: Model-View-ViewModel Pattern . . . . . . . . . . . . . 165
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Chapter 11: Factory Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Chapter 12: Adapter Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Chapter 13: Iterator Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

raywenderlich.com 10
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Design Patterns by Tutorials

What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207


Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Where to go from here? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Chapter 14: Prototype Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Chapter 15: State Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Chapter 16: Multicast Delegate Pattern . . . . . . . . . . . . . . . . . . . 241
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Chapter 17: Facade Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Where to go from here? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

raywenderlich.com 11
Design Patterns by Tutorials

Section IV: Advanced Design Patterns . . . . . . . . . . . . 267


Chapter 18: Flyweight Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Chapter 19: Mediator Pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Where to go from here? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Chapter 20: Composite Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Chapter 21: Command Pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Where to go from here? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Chapter 22: Chain-of-Responsibility Pattern . . . . . . . . . . . . . . 326
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

raywenderlich.com 12
Design Patterns by Tutorials

Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328


What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Where to go from here? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Chapter 23: Coordinator Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . 344
When should you use it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Playground example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
What should you be careful about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Key points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Where to go from here? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

raywenderlich.com 13
L Book License

By purchasing Design Patterns by Tutorials, you have the following license:

• You are allowed to use and/or modify the source code in Design Patterns by
Tutorials in as many apps as you want, with no attribution required.

• You are allowed to use and/or modify all art, images and designs that are included
in Design Patterns by Tutorials in as many apps as you want, but must include this
attribution line somewhere inside your app: “Artwork/images/designs: from Design
Patterns by Tutorials, available at www.raywenderlich.com”.

• The source code included in Design Patterns by Tutorials is for your personal use
only. You are NOT allowed to distribute or sell the source code in Design Patterns
by Tutorials without prior authorization.

• This book is for your personal use only. You are NOT allowed to sell this book
without prior authorization, or distribute it to friends, coworkers or students; they
would need to purchase their own copies.

All materials provided with this book are provided on an “as is” basis, without
warranty of any kind, express or implied, including but not limited to the warranties
of merchantability, fitness for a particular purpose and noninfringement. In no event
shall the authors or copyright holders be liable for any claim, damages or other
liability, whether in an action or contract, tort or otherwise, arising from, out of or in
connection with the software or the use or other dealings in the software.

All trademarks and registered trademarks appearing in this guide are the properties
of their respective owners.

raywenderlich.com 14
B Book Source Code &
Forums

If you bought the digital edition


The digital edition of this book comes with the source code for the starter and
completed projects for each chapter. These resources are included with the digital
edition you downloaded from https://store.raywenderlich.com/products/design-
patterns-by-tutorials.

If you bought the print version


You can get the source code for the print edition of the book here:

• https://store.raywenderlich.com/products/design-patterns-by-tutorials-source-
code

Forums
We’ve also set up an official forum for the book at forums.raywenderlich.com. This is
a great place to ask questions about the book or to submit any errors you may find.

Digital book editions


We have a digital edition of this book available in both ePUB and PDF, which can be
handy if you want a soft copy to take with you, or you want to quickly search for a
specific term within the book.

raywenderlich.com 15
Design Patterns by Tutorials Book Source Code & Forums

Buying the digital edition version of the book also has a few extra benefits: free
updates each time we update the book, access to older versions of the book, and you
can download the digital editions from anywhere, at anytime.

Visit our book store page here:

• hhttps://store.raywenderlich.com/products/design-patterns-by-tutorials.

And if you purchased the print version of this book, you’re eligible to upgrade to the
digital editions at a significant discount! Simply email support@razeware.com with
your receipt for the physical copy and we’ll get you set up with the discounted digital
edition version of the book.

raywenderlich.com 16
A About the Cover

Coral reefs contain some of the most amazing, colorful and diverse ecosystems on
Earth. Although coral reefs make up just a tiny fragment of the ocean’s underwater
area, they support over 25% of known marine life. It’s rather difficult to
underestimate the value that coral reefs add to the diversity and sustainability of our
oceans.

Although reefs are highly structured, they have many variants and perform a variety
of functions. More than just pretty “rocks”, coral reefs are truly the foundation of
their surrounding ecosystems. In that way, you could consider them the “design
patterns” of the ocean!

Unfortunately, coral reefs are in dramatic decline around the world. Potentially 90%
of known coral reefs may be in serious danger in as little as ten years. Various
organizations are actively working to find ways to mitigate the issues caused from
pollution, overfishing and physical damage done to reefs. For more information,
check out the following great resources:

• https://en.wikipedia.org/wiki/Coral_reef_protection

• https://coral.org/

raywenderlich.com 17
I Introduction

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 https://
store.raywenderlich.com/products/swift-apprentice and the iOS Apprentice https://
store.raywenderlich.com/products/ios-apprentice — or have similar development
experience, you’re ready to read this book.

raywenderlich.com 18
Design Patterns by Tutorials Introduction

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.

raywenderlich.com 19
Design Patterns by Tutorials Introduction

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!

raywenderlich.com 20
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Section 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.

Chapter 1: What are Design Patterns?


Chapter 2: How to Read a Class Diagram

raywenderlich.com 21
1 Chapter 1: What are
Design Patterns?
By Joshua Greene

“Extra, extra! Read all about it!”

“Feared by newcomers. Loved by architects. Read the inside story about design
patterns. The truth may surprise you!”

Did you know design patterns can make you a better developer? “Of course,” you say
— you are reading this book, after all!

Did you know design patterns can help you make more money? It’s true. You can save
time, work less and ultimately create more great things by using design patterns
correctly.

And did you know design patterns can help you fight vampires? OK, maybe not —
design patterns aren’t silver bullets, after all.

raywenderlich.com 22
Design Patterns by Tutorials Chapter 1: What are Design Patterns?

However, design patterns are incredibly useful, no matter what language or platform
you develop for, and every developer should absolutely know about them. They
should also know how and when to apply them. That's what you're going to learn in
this book!

A real-world example
The introduction told you that design patterns are reusable, template solutions to
common development problems. Design patterns aren’t concrete implementations,
but rather, serve as starting points for writing code. They describe generic solutions
to problems that experienced developers have encountered many times before.

What does this mean exactly...? Consider this non-development, real-world scenario:

You’re the proud owner of a gardening company, and your business is really, er,
blooming. You’ve only done a few small projects up to now - a tree planted here and
a few flowers there. However, you just landed a big client who wants several dozen
trees and flowers planted on their property.

Your standard procedure has been for your employees to carry each flower or tree
sapling into place individually. Once each has been temporarily placed, your
customer inspects and approves the arrangement before you plant everything in the
ground.

You’re worried it’s going to take forever to carry each flower and tree into place for
this large project. And you even need a few people to carry some of the bigger trees.
While you could hire lots of temporary employees, you wouldn’t make a profit on the
job. There’s got to be a better way!

You decide to ask other gardeners what they do, and you find out they use
wheelbarrows and carts. What a great idea! You tell your employees to use a cart to
move multiple flowers at the same time and a wheelbarrow to move the heavy trees.
In the meantime, you use a lounge chair chair to watch your workers go to it... isn’t
management great?

So now you know all about design patterns! Wait, you need more details? Okay, let’s
break it down...

raywenderlich.com 23
Design Patterns by Tutorials Chapter 1: What are Design Patterns?

Example explanation
The “design pattern” here is the use of wheelbarrows and carts. These are common,
best practice tools in gardening. Similarly, software design patterns form a set of best
practices in development. You could have chosen not to use wheelbarrows and carts,
but akin to avoiding software design patterns, you assume more risk by making the
project more time- and labor-intensive.

Back to the point of “asking other gardeners what they do.” Most design patterns
have been around for a long time — having started life in the 1970s and 1980s — and
they continue to work well to this day.

This longevity is partly due to the fact their use has been validated in many projects
over the decades, but it’s also because they aren’t concrete solutions.

In the gardening scenario, you decided that carts will be used to move flowers and
wheelbarrows will be used to move trees. These are implementation details: you could
have used carts to move both flowers and trees, only used wheelbarrows, or any other
combination that made the job easier.

Design patterns are generic, go-to solutions for solving common problems, like using
wheelbarrows and carts. They are starting points for concrete implementations, like
using carts for flowers and wheelbarrows for trees.

Make sense? Great! It's now time to leave the garden behind and head back to the
world of software design patterns.

Types of design patterns


There are three main types of design patterns:

1. Structural design pattern: Describes how objects are composed and combined
to form larger structures. Examples of structural design patterns include Model-
View-Controller (MVC), Model-View-ViewModel (MVVM) and Facade.

2. Behavioral design pattern: Describes how objects communicate with each


other. Examples of behavioral design patterns are Delegation, Strategy and
Observer.

3. Creational design pattern: Describes how to create or instantiate objects.


Examples of creational patterns are Builder, Singleton and Prototype.

raywenderlich.com 24
Design Patterns by Tutorials Chapter 1: What are Design Patterns?

You may be wondering if knowing a design pattern’s type really matters. Well,
yes...and no.

It’s not useful to memorize all patterns by type. Most developers don’t do this.
However, if you’re not sure whether a particular pattern will work, it’s sometimes
useful to consider other patterns of the same type. You just might find one that
works better for your particular problem.

Note: There’s an ongoing debate on whether some patterns, including MVVM


and MVC, are actually architectural patterns, which span an entire app or
subsystem architecture. Hence, they are broader in scope than design patterns,
which only span components or pieces of an app. Architectural patterns can
even use or encompass several design patterns.

For the purposes of this book, a comprehensive discussion of architectural


patterns is out of scope. We’ve chosen to label MVVM and MVC as structural
design patterns because they can be used alongside other design patterns in a
component fashion. They are also very commonly used in iOS projects, and we
wanted to ensure we covered them.

If someone says these are actually architectural patterns, we don’t necessarily


disagree, as they can also be used that way.

If you'd like to learn more about iOS architectural patterns, check out
Advanced iOS App Architecture (http://bit.ly/ios-app-arch).

Criticisms of design patterns


As indicated earlier, “there are no silver bullets in software development,” and design
patterns are no exception to this. This means that simply knowing and employing
design patterns will not guarantee you will create a well-architected piece of
software. There are dozens of design patterns, so knowing when and how to employ
each one is important.

What are some common criticisms of design patterns?

raywenderlich.com 25
Random documents with unrelated
content Scribd suggests to you:
"The trouble is with Lorraine himself, I think," Carstairs remarked. "It
isn't that he hasn't the nerve, but that he hasn't the determination,
the stability, the something essential in the man who does. I fancy
he has changed his mind on the subject of what to do in this matter
as often as he has changed his clothes. He is a queer compound—
none other like him."
"And yet he is a mighty attractive fellow at times," Smithers
observed.—"It wasn't until this Amherst affair that he revealed
anything particularly vacillating."
"He never before had occasion to reveal it," Devonshire explained.
"The trial came—and he wasn't equal to it. Some of us might not be
equal to it either, if we were in similar case. It's a mighty difficult
case, my friends. Moreover, Lorraine has done the decent thing now
—he is anxious for a reconciliation."
"It's decent, after a fashion," Smithers agreed—"it would be
decenter if he first followed your notion and beat up Amherst—beat
him until he couldn't walk; half killing would be about right, to my
mind."
"This is all very well by way of discussion but what by way of
prophecy?" said Carstairs. "I'll lay a bottle of wine that Lorraine
doesn't do a damn thing."
"So will I," Smithers agreed. "That is why Amherst has the courage
to come back. He despises the man he has wronged."
"He may be fooled," said Devonshire.
"I trust he will be," Carstairs remarked—"but I doubt mightily."
"You hear what they are saying, Pendleton?" Cameron asked, with a
jerk of his head toward the other table.
"I hear," said Pendleton. "Have you seen Lorraine today?"
"No—only talked with him over the telephone."
"He hasn't heard of Amherst's return?"
"He didn't mention it."
"The evening papers will likely have it."
"I suppose so—I didn't know of it until I came up here—where it's
the event of the day."
"You can't much blame them—knowing all the circumstances and the
parties as club-mates do."
"What do you think Lorraine will do—anything?" asked Cameron.
Pendleton carefully knocked the ashes from his cigarette and studied
the bare coal a moment.
"I think," said he slowly, "that it would be just as well for Amherst to
keep out of Lorraine's way."
"You do?" said Cameron quietly. "Why?"
"Because Lorraine seems to have become possessed of two ideas—
and like all weak men he is becoming obsessed by them. One idea is
to effect a reconciliation with Stephanie; the other is to be revenged
on Amherst. I have tried to persuade him that if he would do
Stephanie a service, he must do Amherst no physical hurt—it would
simply revive the scandal and react upon her, and probably
terminate any chance he has to have her return to him."
"What chance has he?" Cameron asked. "None, to my mind."
"Not the slightest in the world, to my mind either," Pendleton replied.
"But the question now is, I think, which idea will prevail:—the hope
of reconciliation with Stephanie, or vengeance on Amherst. I admit I
won't even attempt to predict. It will depend on the circumstances
of the moment."
"With the chances in favor of violence," said Cameron instantly. "I
fear it—I've feared it ever since Stephanie's return. Why the devil
does Lorraine do everything too late?"
"It is the nature of the animal, I suppose. Some men seem to do
everything backward."
"What do you say to both of us going to see him after dinner, and—
well, trying what we can do? He may listen to us."
"If you wish I'll go—but I've given him my views on it once to-day;
and while he seemed to agree, I know it was only half-heartedly.
However, it will do no harm for you to go.—Amherst's return may
have set him wild. Lorraine at his worst is a crazy irresponsible—and
I'm rather inclined to look for the worst."
"Very good!" said Cameron. "Now about this miserable Porshinger
affair. We——"
"The Porshinger affair is easy," Pendleton interrupted. "Mrs.
Postlewaite has cleared that up beautifully—and Stephanie also."
"What!" exclaimed Cameron, "Mrs. Postlewaite?"
Pendleton nodded.
"Mrs. Postlewaite and Mrs. Porterfield were witnesses of Porshinger's
assault on Stephanie," he replied—and he told the story.
When it was finished, Cameron's face wore a most satisfied smile.
"It is the end of Porshinger!"—he laughed, "he is busted for good.
The case will never come to trial. Stephanie is completely vindicated
by Mrs. Postlewaite's story. She need never think of him again. She
has been a bit foolish in her conduct toward him, but that is only a
passing matter, and will be lost in the general satisfaction at his
complete discomfiture. What a fool he was—to risk his social life on
a single throw!"
"He didn't imagine he was risking it," Pendleton rejoined. "He
thought that she was dazzled by his money and quite ready to be
his. The fellow is simply drunk with his financial success. He thinks
anything is within his reach; that it is simply a matter of price, and
he has the price. As between him and Amherst there is mighty little
choice. Amherst is a seducer; Porshinger is a purchaser who trades
on the other's crime to procure a victim."
"The truth is, Lorraine would be justified in killing both," Cameron
declared.
"I think that I should start with Porshinger," said Pendleton—"to me
he is the more contemptible and the more criminal. To try to drag a
woman down after she has made a mistake, and is endeavoring to
make amends for the past! Such a man is a monster."
"You're right!" said Cameron, "right as gospel! And yet Lorraine may
not—because in Amherst's case he dallied too long, and in
Porshinger's, the law would view it as absolutely unjustifiable."
"Oh, surely!" Pendleton responded, "I know that you're not
recommending violence—just stating what, to my mind as well as to
yours, the circumstances warrant."
"I wanted to discuss Lorraine's case with you, but it isn't necessary
now," Cameron remarked. "Porshinger will be only too glad if it is
dropped. Lorraine can't object, for Stephanie is cleared of Dolittle's
nasty story."
"Our trouble, it seems, isn't any longer with Porshinger, but with
Amherst and Lorraine—either to keep them apart or to persuade the
latter to be sensible," Pendleton observed. "I confess that, if it were
not for Stephanie, I wouldn't meddle in the affair. They might go
their own gait. I'm disgusted with Lorraine."
"I don't blame you," the other nodded. "But, you see, Lorraine is a
client of mine and I've always been fond of him, though naturally I
don't approve of his course with Stephanie."
"You can go to him this evening—I shall refrain," Pendleton decided.
"If you need me for anything, I'll be at the Mourrailles'. For heaven's
sake! don't tell him—he may veer around and get notions as to me.
—Let us have dinner. Shall I order, or do you want anything in
particular?"
"Only a pint of Sparkling Burgundy—anything will do for the rest,"
Cameron answered. Then he raised his hand for the captain of the
waiters. "Will you please have Mr. Lorraine telephoned at his
apartments that I'll be in to see him on an important matter at eight
o'clock this evening."
XXII
THE SILVER CANDLESTICK

Stephanie dressed with more than usual care that evening. It was
the first time in two years that she had really wanted to dress for
anyone—to look her best as a woman.
The gown she chose—after much deliberation—was black,
unrelieved by any color and made severely plain; against it the dead
white of her arms and shoulders shone like ivory. She stood a
moment looking in her mirror; then she took from her jewel-case a
sapphire necklace—smiled at it in recollection—and clasped it about
her slender throat. They were the only jewels she wore—even her
rings were laid aside. She wondered if he would notice the sapphires
—and the absence of all other ornaments. It had been his wedding
gift, and he might have forgotten—yet she would wear it on the
chance that he would remark it and remember. She might not permit
him any liberties, but she would grant him the privilege of
inferences.
She laughed softly to herself—and ran her fingers caressingly over
the jewels. His wedding gift! The only one, of all the hundreds, that
she cared for now—the only one that did not suggest to her the
memories of the past—of her mistake in choosing—of her broken
vows—her hideous experience. But his sapphires brought only the
joy of living—the hope that some day, by some means, her freedom
would be won and she would be permitted to yield herself and all
she had to him. For she realized now—as she had long known,
indeed—that he was the only man she cared for—the only man who
cared for her and had cared through all the horrible past.
She took one last look in the mirror—at the tall, slender figure in the
clinging black gown; the lovely neck and arms and shoulders; the
flawless face with its proud, cold beauty, that to-night was warm
with tenderness; the glorious hair piled high on the aristocratic head
like a gleaming crown of gold—and then went slowly down the
stairway, as joyous as though she were to be married to Pendleton
that very night.
All through dinner—which she had alone, Mrs. Mourraille being
absent—she thought of Montague. Not hopelessly as heretofore, but
with a satisfied anticipation of present property. She did not attempt
to analyze it—indeed, she was quite aware it did not admit of
analysis; it was the intuitive knowledge that comes at rare intervals
to women—never to men.
Near the end of the meal, the desk 'phone in the living-room rang.
The butler answered it. In a moment he returned.
"Mr. Pendleton wants to know, madam, if you will be at home at a
quarter to nine this evening?" he said.
"Say to Mr. Pendleton that I shall be here and very glad to see him!"
Stephanie replied.
The man went to deliver the message.
"Montague is impatient," she reflected, "though, as I never before
knew him to be impatient, he must have a very good reason for
coming a quarter of an hour earlier.... Yet why did he telephone at
all—why didn't he just come?—Tompkins, was that all Mr. Pendleton
said?"
"Yes, madam!" Tompkins answered, "but, if you please, it wasn't Mr.
Pendleton himself; leastwise, I didn't recognize his voice."
She nodded in answer and finished her ice.
"I'll have coffee on the piazza," she said, and arose.
As she did so, the ship's clock in the hallway chimed one bell.
"Half after eight!" she thought. "Fifteen minutes more until I see
him. I'm as nervously anticipatory as a débutante about to receive
her first proposal. What is the matter with me! I'm actually
becoming afraid to meet him—to meet an old friend—the best friend
a woman ever had!"
She laughed to herself, and sat down where, from the electric light
at the corner, she could see his car draw up at the curb.
Tompkins brought her coffee, served it, and was dismissed. She
drank two cups eagerly—to steady her nerves—then poured a third,
and sipped it slowly.... Presently the butler came out to deliver a
telephone message from Miss Chamberlain; when she turned again,
she was just in time to catch sight of a man coming up the walk and
almost at the steps.
She sprang up and glided quickly into the house. She wanted to
meet Pendleton in the brightness of the living-room rather than in
the subdued light of the piazza. She wanted him to have the benefit
of the first impression. She was quite aware of her exquisite
loveliness—more alluring to-night than ever before. And of the
sapphires—his sapphires alone adorning her. She flung herself in an
easy chair, crossed her silken knees with fetching abandon and
caught up a magazine.
There was no ring at the bell, however—and she waited, impatiently.
He should have rung—should be in the hall-way now—and yet
Tompkins was not even come front! It was very strange!—Possibly
he had gone around to the piazza, thinking that she might be there.
She half turned—one hand on the chair arm, the other on her knee
—and glanced toward the piazza door.
There came a step—and a smile of happiest greeting sprang to her
face—to be chilled the next instant into frigidity.
"You!" she exclaimed indignantly.—"You!"
Garrett Amherst bowed low.
He was a trifle over the medium height and slender, with black hair
just turning gray, and a face that women would call handsome, but
that men would call effeminate because too flawless. The eyes had a
peculiarly cynical expression about the corners, and the clean-
shaven lips, while firm set and classic, were full and red.
"Yes, I!" he answered, and the voice was wondrously low and
musical. "I am fortunate indeed to find you alone, Stephanie."
"I cannot say as much, Mr. Amherst!" she scorned.
He laughed lightly. "Time was when you were more than glad when
I found you alone."
She glided swiftly toward the bell—but he was before her and
blocked the way.
"Don't!" he said gently. "Consider—and don't. You may call—yes, you
may even ring for the servants—and what, think you, will be the
inference with me—me alone with you here—by appointment?"
"My servants never infer what it is impossible for them to believe!"
she spurned. "They know I left you in disgust with myself and
loathing for you—you unspeakable poltroon."
He put out his hand as though to stay her.
"You misunderstand, Stephanie dear," he said softly. "I've not come
to reproach you, nor to find fault, nor to cast up the few unpleasant
things in an exquisite past. I've come——" he took a step toward her
—"I've come, dearest, to beseech you to forgive—to come back to
me—to let me make amends." He held out his arms. "You're the only
woman in the world for me—I know it now—I knew it as soon as
you had left me. I've come clear from India to tell you—to take you
away with me. Won't you come, dearest, won't you come?"
"You would dare!" she exclaimed tensely. "You would——"
"I would dare the gates of hell for you, sweetheart!—to hold you
once again in my arms, to pillow your dear head upon my shoulder,
to bury my face in your ruddy tresses, to have you——"
"What folly—what silly folly!" she interrupted. "I am no longer your
paramour, thank God! I am trying to be an honest woman—to regain
the place I lost by reason of your seductions and false tongue. Do
you think I would forfeit it again even though I loved you to
distraction?"
"You do love me, Stephanie—you——"
"I loathe you!—your honeyed words and pretty beauty that once led
me astray are now simply reminders of your abominations, and the
proofs of your depravity.—I ask you to leave the house at once, Mr.
Amherst."
"You mean it?" he whispered. "You actually mean it?"
"I do mean it," she replied. "It may be difficult for such as you to
comprehend—but I mean it. Now go."
He looked her in the eyes a moment, then he humbly bowed his
head.
"I will go," he said contritely. "I will go——"
Suddenly he leaped forward—and his arms closed around her,
pinioning her hands to her sides.
"But I will kiss you another time before I go—and maybe I shall——"
She fought him silently—unwilling even for the servants to see her in
this man's embrace. She evaded his every attempt at her lips—she
struggled—she buried her hair in his face—she felt his breath on her
neck—she was carried slowly across the room—her hair burst free
and fell in waves around her, enveloping her face and shielding it
somewhat from his attempts.
"You siren!" he panted. "You siren!"
"You devil!" she gasped. "You worse than devil!—Loose me! I tell
you—loose me!"
"I'll loose you," he breathed,—"I'll loose you—when I've had—my
——"
He raised her in his arms and bore her toward a couch—crushing her
to him in a mad ecstasy that left her well-nigh senseless.
She felt herself strike the couch—felt herself flung upon it—tried to
cry out and could not! With a final desperate effort that exhausted
her last atom of strength, she strove to thrust him from her.
But he only laughed—and shifted his hold.
"Not yet, sweetheart!" he panted.—"Not yet——"
She closed her eyes in helplessness and sickening fear. It was
useless—she could not——
Then she felt Amherst's grip on her torn loose. She opened her eyes
—to see him and Harry Lorraine grappled in furious fight.
She struggled up—and watched—fascinated and silent; forgetting
either to summon help or to flee.
Round the room the men reeled, locked in each other's arms—
staggering against chairs and tables—hurling them aside—
overturning them—crushing the bric-a-brac under foot. They were
down and up, and down and up—they rolled over and over, fighting
without method—Lorraine striking wildly in the fury of insane rage,
which gave him strength but deprived him of the power of thought.
Amherst—taken unaware and weakened by his unhallowed passion,
but with a trifle more deliberation in his manner, prevented the other
from doing him serious harm.... Both had been cut by the broken
ornaments or by corners of the furniture. Neither man spoke.
Lorraine's face was set in the fury of hate—Amherst's in the fury of
desperation. Lorraine was venting the pent up wrongs of months of
brooding—Amherst was fighting for his life! he had no doubt of the
other's intent to kill. He was trying to get away—to break his
assailant's hold.... But through it all Lorraine managed some way,
somehow, to keep his hold—and slowly to work his hands toward
Amherst's throat—one of them was already there. Amherst made a
frantic effort to unloose it. They staggered down the room—swept a
cabinet bare of antiques—swayed a moment back and forth—then
went down, Amherst underneath.
As they writhed on the floor amid the fallen débris, Lorraine's hand
touched a heavy, silver candlestick.—He seized it by the stem—there
was a flash—and with all the strength of his insane fury, he brought
it down on his enemy's head.
Amherst's arms relaxed—his eyes closed and the blood gushed forth.
Again the candlestick rose, and fell; this time squarely on the temple
—and with crunch of metal on bone, the fresh spurt of blood,
Amherst's body crumpled into an inert mass.
Once more Lorraine's arm went up——
"Don't hit him again!" said Pendleton quietly—yet sharp as the crack
of a whip. "You are striking a dead man, Lorraine."
The candlestick slipped from Lorraine's fingers and he staggered up
—the frenzied look on his face slowly faded into one of unrelenting
comprehension.
"Yes!" said he, glancing down unmoved at Amherst's body. "He is
dead—damn him! I'm glad I killed him! The beast!—— Thank God! I
came in time, dear," he exclaimed, turning to Stephanie.
But Stephanie had fainted.
Lorraine sprang toward her—to be brought up by Pendleton's quick
command:
"Let her alone for a moment—she has only fainted—and tell me how
this happened."
Lorraine, suddenly weak, collapsed on a chair.
"Never mind—I'll get some brandy——"
"No—I'm all right," Lorraine said huskily.—"It is well for you to hear
before she wakes.—I was restless after dinner. I didn't wait for
Cameron; I went for a walk, leaving word for him to remain until I
returned. I don't know how long I walked, but presently I was aware
that I was before Stephanie's home.—The lights were burning—the
shades were drawn. I went in on the piazza, with no purpose,
nothing but a desire to see her—you understand? As I passed this
window, I noticed the door to the enclosed piazza was ajar.—I
pushed it open and entered. I heard a queer sound in this room, like
persons in a struggle. I dashed across—and saw—saw Stephanie
flung upon that couch, and Amherst bending over her. For an instant
I was paralyzed! I saw Stephanie try to force him back; heard him
laugh in triumph and say something. Then action came to me and I
hurled myself upon him. We fought all over the room—you can see
how we fought—he to get loose, I to get a grip on his throat and
choke the life out of him. I must have had the strength of a demon,
for Amherst, I think, is the stronger man. How often we fell, I do not
know—sometimes he was under, sometimes I was. And all the while,
'Kill him! Kill him!' was ringing in my ears.... We went down again, I
on top.—My hand touched the candlestick—I grasped it and struck.—
I would be striking him yet if you had not stopped me." He got up
slowly, his face unnaturally flushed.—"I'll go to the police station and
give myself up. Let the carrion lie where he is until the officers
come. You look to Stephanie—it's better——"
He staggered, put his hands to his head, swayed a moment, then
pitched forward to the floor, and lay quiet.
"Good God!" cried Pendleton.
Springing to Lorraine's side, he tore open his waistcoat and placed a
hand over his heart—no beat responded. He listened!—It was silent.
Lorraine was dead.
He looked at Stephanie—she was still insensible. What should he do?
Two dead men, an unconscious woman, and himself! What was best
for her?
An instant he thought.—Then he strode across, and was gathering
her in his arms to bear her from the room when she opened her
eyes.
She gave a gasp—saw who held her—the startled look vanished—
and she smiled.
"Montague!" she said weakly. "Montague! How did you get here—
how——"
She caught sight of the two forms on the floor—stared—then
shuddered in sudden remembrance.
"Dead!—Both dead!" she whispered. "Let me down, dear—I'm not
——"
"You must come away," he said, putting her down but keeping his
arm around her. "This is no place for you, sweetheart."
She suffered his arm to remain, and stood looking at Lorraine—
Amherst she had recoiled from in horror!
"They killed each other?" she questioned faintly.
"No—Lorraine killed Amherst—and then was stricken either by
apoplexy or a heart attack—the victim of his own frenzied emotions."
"I see!" she whispered.—"I see!"
"Come outside, dear—you need air, and I must summon a physician
and the police."
"Can't we do—anything for Harry?" she asked.
"Nothing."
"At least, we can put him on the couch."
"It is wiser not."
"Must we let him lie on the floor?"
"Since he is dead, it is best not to disturb anything until the police
come," he replied—and slowly led her from the room.
As he did so, steps crossed the piazza and the entrance bell rang.
"They must not enter, Montague!" Stephanie exclaimed—"they must
not enter!"—She sank on a chair.—"Go—tell Tompkins I am not at
home to anyone!"
He met the butler at the rear of the hall.
"Mrs. Lorraine is not at home—whoever it is must be sent away," he
directed.
"Yes, Mr. Pendleton!" the man bowed.
Passing the doorway to the living-room, Tompkins glanced in—and
straightway his immobility of countenance vanished. He stopped,
staring—terror and amazement blended on his face.
"The door, sir, the door!" said Pendleton sharply.
"Yes, sir—yes, sir!" the butler answered—and sprang to obey.
"Is Mr. Pendleton here?" came Cameron's voice.
"No, sir; Mr.——" Tompkins began—when Pendleton cut him short.
"Come in, Cameron," said he, "you're just the man I want."
"Lorraine didn't keep his appointment with me," explained Cameron,
as he entered. "And——"
"Lorraine is here!" Pendleton answered, drawing the other over to
the living-room door.
"Good God!" was Cameron's amazed cry.—"Lorraine! and who is the
other?—Amherst! Amherst! Dead!—what does it mean?"
"They both are dead," said Pendleton. "Lorraine killed Amherst with
yonder candlestick—and then, a moment after, was stricken by
apoplexy or a heart attack."
"You were here?" Cameron marvelled.
"I came in just as Amherst received the fatal blow.—Lorraine was
explaining how it all happened when he himself was seized and died
instantly."
"And Stephanie?"
Pendleton turned sharply to the butler, who was standing open-
mouthed behind them, and said:—
"Tompkins, call up Dr. Hubbard at once and ask him to come over
immediately."
He waited until the man had gone and the door was closed behind
him—then he lowered his voice.
"Stephanie was here through it all—she had fainted on the couch."
"Where is she now?"
"In the piazza-room!"
"How much does she know?"
"Everything."
"Who else knows it?"
"No one."
"Not even Tompkins?"
"Not even Tompkins. He and the other servants were at dinner—
their dining-room is in the rear downstairs."
"You are positive? They," with an expressive gesture toward the
floor, "must have made considerable noise."
"If you had seen Tompkins' face when he came to answer your ring,
you would not doubt," Pendleton replied.
"Then why bring Stephanie into the affair? Let her know nothing—let
her be upstairs—anywhere—so long as she isn't on this floor.—How
did you enter?" he asked suddenly.
"Through the piazza-room."
"Are you prepared to take the risk of being—implicated—to relieve
Stephanie?" Cameron asked.
"I understand," Pendleton answered. "I am willing to take the risk."
"And Stephanie can—if the extremity arise," Cameron went on, "tell
the facts and relieve you. We may have to confide in the front office,
but I think even that will not be necessary. Fix up the story with her
while I notify the police. I'll use the upstairs telephone."
"What do you want me to tell?" asked Stephanie, entering the hall
from the dining-room door.
She had regained her composure—and save for a slight flush on her
cheeks she appeared as calm and self-contained as ever.
"We want to save you the painful experience of having to relate
what happened—there," Pendleton replied, with a slight motion
toward the living-room. "You can say that you were upstairs asleep—
lying down after dinner—that you heard nothing of the fight until
something aroused you and you descended to find Cameron and me
here, and the——"
"How will you account for your presence?" she interrupted.
"By the truth—that I came to call, entered the house by the piazza
and the living-room just as Lorraine delivered the fatal blow,
Lorraine's explanation of the deed, and his own sudden death."
Slowly she shook her head.
"Do you think the police will believe it?" she asked.
"Certainly—why should they doubt it?" he answered.
"Do you think the public will believe it?"
"Of course!—And what have the public to do with it anyway?"
"They might ask, both the police and the public—and the police will
have to ask if the public demands to know—what you had to do with
the killing? Your friendship to me in the past; your—devotion in the
present; my—love, they will say, for you; the coincidence of
Lorraine's and Amherst's visits, coupled with your own, and that you
survive while they died—all, all will make most startling inferences,
don't you think, Montague?"
"Not in the least, dear!" he smiled, though he knew she spoke the
truth—at least so far as the public was concerned. To it there would
always be something unexplained about the tragedy; something that
either he or Stephanie could have made plain—and would not. "My
reputation and standing in the community, and the reputation of my
family before me, is sufficient answer to such inferences," he added.
Again she shook her head.
"No man's reputation should be taxed—where murder has been
done and self-interest can be imputed—when the truth can be told
by an eye-witness," she decided. "I shall have to speak eventually,
so it is much the wiser to speak at once—to delay will only breed
doubt of my tale. I shall tell the story, dear."
"No—you shall——"
"Yes, dear; I shall tell the story."
It was final. Even Pendleton realized it.
"Am I worth it, little woman?" he asked.
"It is I who am not worthy," she replied—"I never have been worthy
of your—love."
He held out his arms.
"Sweetheart!" he cried.
She went to him, with an adorable smile and a sigh of supreme
content.
"If you wish it, dearest," she whispered, "if you wish it—after a little
time."

Finis
Transcriber's Note:

Obvious typographic errors have been


corrected.
*** END OF THE PROJECT GUTENBERG EBOOK THE UNFORGIVING
OFFENDER ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying
copyright royalties. Special rules, set forth in the General Terms of
Use part of this license, apply to copying and distributing Project
Gutenberg™ electronic works to protect the PROJECT GUTENBERG™
concept and trademark. Project Gutenberg is a registered trademark,
and may not be used if you charge for an eBook, except by following
the terms of the trademark license, including paying royalties for use
of the Project Gutenberg trademark. If you do not charge anything
for copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund
from the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the Project
Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or

You might also like