Cover image for Designing with Objects : Object-Oriented Design Patterns Explained with Stories from Harry Potter.
Designing with Objects : Object-Oriented Design Patterns Explained with Stories from Harry Potter.
Title:
Designing with Objects : Object-Oriented Design Patterns Explained with Stories from Harry Potter.
Author:
Kak, Avinash C.
ISBN:
9781118903421
Personal Author:
Edition:
1st ed.
Physical Description:
1 online resource (507 pages)
Contents:
Title Page -- Copyright Page -- Contents -- Preface -- Acknowledgments -- Chapter 1 Why Learn Design Patterns and Why Do So with Help from Harry Potter? -- 1.1 The OO Design Patterns "Bible" by GoF -- 1.2 But What Has Harry Potter Got to Do with OO Design Patterns? -- 1.3 Is Familiarity with Harry Potter a Requirement for Understanding This Book? -- 1.4 How the Pattern Explanations are Organized -- 1.5 The Terminology of Object-Oriented Programming -- 1.6 The UML Notation Used in the Class Diagrams -- 1.6.1 Association as a Relationship Between Classes -- 1.6.2 Aggregation and Composition as Relationships Between Classes -- 1.6.3 Representing Attributes -- 1.6.4 Representing Operations -- Part I Creational Patterns -- Chapter 2 Abstract Factory -- 2.1 The Concept of a Factory in Software -- 2.2 Intent and Applicability -- 2.3 Introduction to the Abstract Factory Pattern -- 2.4 The Abstract Factory Pattern in Real-World Applications -- 2.5 Harry Potter Story Used to Illustrate the Abstract Factory Pattern -- 2.6 A Top Level View of the Pattern Demonstration -- 2.7 The Abstract Class Factory -- 2.8 The Helper Class FactoryStore -- 2.9 The Abstract Class Enchanted -- 2.10 The Concrete Classes for Magical Objects -- 2.11 The Concrete Factory Classes -- 2.12 The Client Class Diagon AlleyRetailer -- 2.13 Playing with the Code -- Chapter 3 Builder -- 3.1 Building Complex Objects -- 3.2 Intent and Applicability -- 3.3 Introduction to the Builder Pattern -- 3.4 The Builder Pattern in Real-World Applications -- 3.5 Harry Potter Story Used to Illustrate the Builder Pattern -- 3.6 A Top-Level View of the Pattern Demonstration -- 3.7 The Abstract Class PotionMaker -- 3.8 The Concrete Extensions of PotionMaker -- 3.9 The Director Class -- 3.10 The Potion Class -- 3.11 The Ingredient Class -- 3.12 The PotionMakingFeasibilityViolation Class.

3.13 The Client Class -- 3.14 Playing with the Code -- Chapter 4 Factory Method -- 4.1 Revisiting the Concept of a Factory in Software -- 4.2 Intent and Applicability -- 4.3 Introduction to the Factory Method Pattern -- 4.4 The Factory Method Pattern in Real-World Applications -- 4.5 Harry Potter Story Used to Illustrate the Factory Method Pattern -- 4.6 A Top Level View of the Pattern Demonstration -- 4.7 The Enchanted Class Hierarchy -- 4.8 The ArtifactFactory Class Hierarchy and the Factory Methods Contained Therein -- 4.9 The Client Class -- 4.10 Playing with the Code -- Chapter 5 Prototype -- 5.1 Why Not Make New Objects by Copying Old Objects? -- 5.2 Intent and Applicability -- 5.3 Introduction to the Prototype Pattern -- 5.4 The Prototype Pattern in Real-World Applications -- 5.5 Harry Potter Story Used to Illustrate The Prototype Pattern -- 5.6 A Top Level View of the Pattern Demonstration -- 5.7 The Dragon Class -- 5.8 The PrototypeManagerAndDuplicator Class -- 5.9 The DragonAficionado Class -- 5.10 The UnknownDragonException Class -- 5.11 Playing with the Code -- Chapter 6 Singleton -- 6.1 Singular Objects -- 6.2 Intent and Applicability -- 6.3 Introduction to the Singleton Pattern -- 6.4 The Singleton Pattern in Real-World Applications -- 6.5 Harry Potter Story Used to Illustrate the Singleton Pattern -- 6.6 A Top Level View of the Pattern Demonstration -- 6.7 The MinisterForMagic Class -- 6.8 The TestSingleton Class -- 6.9 Variations on the Singleton Pattern -- 6.10 Playing with the Code -- Part II Structural Patterns -- Chapter 7 Adapter -- 7.1 Getting Things to Work Together -- 7.2 Intent and Applicability -- 7.3 Introduction to the Adapter Pattern -- 7.4 The Adapter Pattern in Real-World Applications -- 7.5 Harry Potter Story Used to Illustrate the Adapter Pattern -- 7.6 A Top Level View of the Pattern Demonstration.

7.7 The Target Interface: TeachingDADA -- 7.8 The TeacherForDADA Class -- 7.9 The AdapterForSafeTeaching Class -- 7.10 The Client Class SchoolOfMagic -- 7.11 Object Adapter -- 7.12 Pluggable Adapter -- 7.13 Playing with the Code -- Chapter 8 Bridge -- 8.1 Concepts and Their Implementation -- 8.2 Intent and Applicability -- 8.3 Introduction to the Bridge Pattern -- 8.4 The Bridge Pattern in Real-World Applications -- 8.5 Harry Potter Story Used to Illustrate the Bridge Pattern -- 8.6 A Top Level View of the Pattern Demonstration -- 8.7 The Humanoid Class -- 8.8 The Dementor, Goblin, and HouseElf Classes -- 8.9 The Humanoid_ Imp Class -- 8.10 Implementation Classes for the Dementor, Goblin, and HouseElf Classes -- 8.11 The Client Class MinistryOfMagic -- 8.12 Playing with the Code -- Chapter 9 Composite -- 9.1 Relationships That Loop Back -- 9.2 Intent and Applicability -- 9.3 Introduction to the Composite Pattern -- 9.4 The Composite Pattern in Real-World Applications -- 9.5 Harry Potter Story Used to Illustrate the Composite Pattern -- 9.6 A Top Level View of the Pattern Demonstration -- 9.7 The WizardTraits Interface -- 9.8 The Wizard Class -- 9.9 The Auror Class -- 9.10 The Obliviator Class -- 9.11 The DepartmentHead Class -- 9.12 The Minister for Magic Class -- 9.13 The Client Class Test -- 9.14 Playing with the Code -- Chapter 10 Decorator -- 10.1 Onion as a Metaphor -- 10.2 Intent and Applicability -- 10.3 Introduction to the Decorator Pattern -- 10.4 The Decorator Pattern in Real-World Applications -- 10.5 Harry Potter Story Used to Illustrate the Decorator Pattern -- 10.6 A Top Level View of the Pattern Demonstration -- 10.7 The CoreMessageDeliveryClass Class -- 10.8 The Decorator Classes -- 10.9 The Client Class Test -- 10.10 Playing with the Code -- Chapter 11 Facade -- 11.1 Hiding Complexity -- 11.2 Intent and Applicability.

11.3 Introduction to the Facade Pattern -- 11.4 The Facade Pattern in Real-World Applications -- 11.5 Harry Potter Story Used to Illustrate the Facade Pattern -- 11.6 A Top Level View of the Pattern Demonstration -- 11.7 The Abstract Root Class Facade -- 11.8 The Network Class -- 11.9 The Node, Link, and Path Classes -- 11.10 The Three Concrete Facade Classes -- 11.11 Testing the Demonstration Code -- 11.12 Playing with the Code -- Chapter 12 Flyweight -- 12.1 The Idea of Customized Duplications -- 12.2 Intent and Applicability -- 12.3 Introduction to the Flyweight Pattern -- 12.4 The Flyweight Pattern in Real-World Applications -- 12.5 Harry Potter Story Used to Illustrate the Flyweight Pattern -- 12.6 A Top Level View of the Pattern Demonstration -- 12.7 The HeadMasterPortrait Class -- 12.8 The FlyweightImageStore Class -- 12.9 The ImageManager Class -- 12.10 The PortraitBorderChoices Class -- 12.11 The ImageNotAvailableException Class -- 12.12 The PortraitMakerAssignment Class -- 12.13 Playing with the Code -- 12.14 Acknowledgment -- Chapter 13 Proxy -- 13.1 Is It Always Necessary to Have the Real Thing? -- 13.2 Intent and Applicability -- 13.3 Introduction to the Proxy Pattern -- 13.4 The Proxy Pattern in Real-World Applications -- 13.5 Harry Potter Story Used to Illustrate the Proxy Pattern -- 13.6 A Top Level View of the Pattern Demonstration -- 13.7 The Abstract Class Wizard -- 13.8 The DarkWizardTraits Interface -- 13.9 The DarkWizard Class -- 13.10 The DarkLord Class -- 13.11 The ClientClass Class -- 13.12 Playing with the Code -- Part III Behavioral Patterns -- Chapter 14 Chain of Responsibility -- 14.1 Passing the Buck -- 14.2 Intent and Applicability -- 14.3 Introduction to the Chain of Responsibility Pattern -- 14.4 The Chain of Responsibility Pattern in Real-World Applications.

14.5 Harry Potter Story Used to Illustrate the Chain of Responsibility Pattern -- 14.6 A Top Level View of the Pattern Demonstration -- 14.7 The Interface Class Violations -- 14.8 The Abstract Class Adjudicator -- 14.9 The Player Class -- 14.10 The Classes with the Authority to Resolve Violations -- 14.11 Testing the Code -- 14.12 Playing with the Code -- Chapter 15 Command -- 15.1 Actions Versus the Actors -- 15.2 Intent and Applicability -- 15.3 Introduction to the Command Pattern -- 15.4 The Command Pattern in Real-World Applications -- 15.5 Harry Potter Story Used to Illustrate the Command Pattern -- 15.6 A Top Level View of the Pattern Demonstration -- 15.7 The Command Interface -- 15.8 The MyPlaces Interface -- 15.9 The ProtectHarryPotter Class -- 15.10 The Wizard Class -- 15.11 The Squib Class -- 15.12 The Invoker Class -- 15.13 The UnableToProtectHarryPotterException Class -- 15.14 The Client Class -- 15.15 Playing with the Code -- Chapter 16 Interpreter -- 16.1 Parsing versus Interpretation -- 16.2 Intent and Applicability -- 16.3 Introduction to the Interpreter Pattern -- 16.4 The Interpreter Pattern in Real-World Applications -- 16.5 Harry Potter Story Used to Illustrate the Interpreter Pattern -- 16.6 A Parser Front-End for the Interpreter Pattern -- 16.7 A Top Level View of the Pattern Demonstration -- 16.8 The Driver Class -- 16.9 The Interpreter_ Sentence Class -- 16.10 The Worker Classes for Interpretation -- 16.11 The Utility Class ShowSyntaxTree -- 16.12 Playing with the Code -- Chapter 17 Iterator -- 17.1 Storing Object Collections and Interacting with Them -- 17.2 Intent and Applicability -- 17.3 Introduction to the Iterator Pattern -- 17.4 The Iterator Pattern in Real-World Applications -- 17.5 Harry Potter Story Used to Illustrate the Iterator Pattern -- 17.6 A Top Level View of the Pattern Demonstration.

17.7 A Utility Interface for Demonstrating the Iterator Pattern.
Abstract:
Here is a book that takes the sting out of learning object-oriented design patterns! Using vignettes from the fictional world of Harry Potter, author Avinash C. Kak provides a refreshing alternative to the typically abstract and dry object-oriented design literature. Designing with Objects is unique. It explains design patterns using the short-story medium instead of sterile examples. It is the third volume in a trilogy by Avinash C. Kak, following Programming with Objects (Wiley, 2003) and Scripting with Objects (Wiley, 2008). Designing with Objects confronts how difficult it is for students to learn complex patterns based on conventional scenarios that they may not be able to relate to. In contrast, it shows that stories from the fictional world of Harry Potter provide highly relatable and engaging models. After explaining core notions in a pattern and its typical use in real-world applications, each chapter shows how a pattern can be mapped to a Harry Potter story. The next step is an explanation of the pattern through its Java implementation. The following patterns appear in three sections: Abstract Factory, Builder, Factory Method, Prototype, and Singleton; Adapter, Bridge, Composite, Decorator, Facade, Flyweight, and Proxy; and the Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, and Visitor. For readers' use, Java code for each pattern is included in the book's companion website. All code examples in the book are available for download on a companion website with resources for readers and instructors. A refreshing alternative to the abstract and dry explanations of the object-oriented design patterns in much of the existing literature on the subject. In 24 chapters, Designing with Objects explains well-known design patterns by relating them to stories from the fictional

Harry Potter series.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Electronic Access:
Click to View
Holds: Copies: