Designing with Objects
Object-Oriented Design Patterns Explained with Stories from Harry Potter
Häftad, Engelska, 2015
932 kr
Beställningsvara. Skickas inom 7-10 vardagar. Fri frakt över 249 kr.
Beskrivning
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
Produktinformation
- Utgivningsdatum:2015-02-06
- Mått:179 x 254 x 28 mm
- Vikt:844 g
- Format:Häftad
- Språk:Engelska
- Antal sidor:512
- Förlag:John Wiley & Sons Inc
- ISBN:9781118581209
Utforska kategorier
Mer om författaren
Avinash C. Kak is Professor of Electrical and Computer Engineering at Purdue University. His areas of interest include software engineering, computer and network security, sensor networks, and computer vision (especially with camera networks). Professor Kak has been awarded numerous Best Teacher of the Year awards at Purdue University. He is the author of Scripting with Objects and Programming with Objects, both published by Wiley.
Innehållsförteckning
- PREFACE xivACKNOWLEDGMENTS xix1 Why Learn Design Patterns and Why Do So with Help from Harry Potter? 11.1 The OO Design Patterns “Bible” by GoF 21.2 But What Has Harry Potter Got to Do with OO Design Patterns? 41.3 Is Familiarity with Harry Potter a Requirement for Understanding This Book? 61.4 How the Pattern Explanations are Organized 71.5 The Terminology of Object-Oriented Programming 71.6 The UML Notation Used in the Class Diagrams 121.6.1 Association as a Relationship Between Classes 141.6.2 Aggregation and Composition as Relationships Between Classes 151.6.3 Representing Attributes 161.6.4 Representing Operations 17I CREATIONAL PATTERNS 192 Abstract Factory 212.1 The Concept of a Factory in Software 212.2 Intent and Applicability 222.3 Introduction to the Abstract Factory Pattern 222.4 The Abstract Factory Pattern in Real-World Applications 232.5 Harry Potter Story Used to Illustrate the Abstract Factory Pattern 232.6 A Top Level View of the Pattern Demonstration 252.7 The Abstract Class Factory 272.8 The Helper Class FactoryStore 272.9 The Abstract Class Enchanted 302.10 The Concrete Classes for Magical Objects 312.11 The Concrete Factory Classes 322.12 The Client Class Diagon AlleyRetailer 342.13 Playing with the Code 363 Builder 383.1 Building Complex Objects 383.2 Intent and Applicability 393.3 Introduction to the Builder Pattern 393.4 The Builder Pattern in Real-World Applications 413.5 Harry Potter Story Used to Illustrate the Builder Pattern 423.6 A Top-Level View of the Pattern Demonstration 433.7 The Abstract Class PotionMaker 453.8 The Concrete Extensions of PotionMaker 463.9 The Director Class 523.10 The Potion Class 543.11 The Ingredient Class 553.12 The PotionMakingFeasibilityViolation Class 553.13 The Client Class 553.14 Playing with the Code 564 Factory Method 594.1 Revisiting the Concept of a Factory in Software 594.2 Intent and Applicability 604.3 Introduction to the Factory Method Pattern 604.4 The Factory Method Pattern in Real-World Applications 614.5 Harry Potter Story Used to Illustrate the Factory Method Pattern 624.6 A Top Level View of the Pattern Demonstration 634.7 The Enchanted Class Hierarchy 654.8 The ArtifactFactory Class Hierarchy and the Factory Methods Contained Therein 684.9 The Client Class 704.10 Playing with the Code 715 Prototype 735.1 Why Not Make New Objects by Copying Old Objects? 735.2 Intent and Applicability 745.3 Introduction to the Prototype Pattern 745.4 The Prototype Pattern in Real-World Applications 775.5 Harry Potter Story Used to Illustrate The Prototype Pattern 785.6 A Top Level View of the Pattern Demonstration 795.7 The Dragon Class 815.8 The PrototypeManagerAndDuplicator Class 845.9 The DragonAficionado Class 875.10 The UnknownDragonException Class 885.11 Playing with the Code 886 Singleton 906.1 Singular Objects 906.2 Intent and Applicability 906.3 Introduction to the Singleton Pattern 916.4 The Singleton Pattern in Real-World Applications 916.5 Harry Potter Story Used to Illustrate the Singleton Pattern 926.6 A Top Level View of the Pattern Demonstration 926.7 The MinisterForMagic Class 936.8 The TestSingleton Class 946.9 Variations on the Singleton Pattern 956.10 Playing with the Code 97II STRUCTURAL PATTERNS 997 Adapter 1017.1 Getting Things to Work Together 1017.2 Intent and Applicability 1027.3 Introduction to the Adapter Pattern 1027.4 The Adapter Pattern in Real-World Applications 1037.5 Harry Potter Story Used to Illustrate the Adapter Pattern 1047.6 A Top Level View of the Pattern Demonstration 1047.7 The Target Interface: TeachingDADA 1067.8 The TeacherForDADA Class 1077.9 The AdapterForSafeTeaching Class 1087.10 The Client Class SchoolOfMagic 1107.11 Object Adapter 1117.12 Pluggable Adapter 1137.13 Playing with the Code 1198 Bridge 1228.1 Concepts and Their Implementation 1228.2 Intent and Applicability 1238.3 Introduction to the Bridge Pattern 1238.4 The Bridge Pattern in Real-World Applications 1268.5 Harry Potter Story Used to Illustrate the Bridge Pattern 1278.6 A Top Level View of the Pattern Demonstration 1308.7 The Humanoid Class 1308.8 The Dementor, Goblin, and HouseElf Classes 1328.9 The Humanoid Imp Class 1348.10 Implementation Classes for the Dementor, Goblin, and HouseElf Classes 1378.11 The Client Class MinistryOfMagic 1398.12 Playing with the Code 1409 Composite 1429.1 Relationships That Loop Back 1429.2 Intent and Applicability 1439.3 Introduction to the Composite Pattern 1449.4 The Composite Pattern in Real-World Applications 1459.5 Harry Potter Story Used to Illustrate the Composite Pattern 1469.6 A Top Level View of the Pattern Demonstration 1479.7 The WizardTraits Interface 1489.8 The Wizard Class 1499.9 The Auror Class 1529.10 The Obliviator Class 1539.11 The DepartmentHead Class 1559.12 The Minister for Magic Class 1569.13 The Client Class Test 1589.14 Playing with the Code 15910 Decorator 16110.1 Onion as a Metaphor 16110.2 Intent and Applicability 16210.3 Introduction to the Decorator Pattern 16210.4 The Decorator Pattern in Real-World Applications 16410.5 Harry Potter Story Used to Illustrate the Decorator Pattern 16510.6 A Top Level View of the Pattern Demonstration 16810.7 The CoreMessageDeliveryClass Class 17010.8 The Decorator Classes 17010.9 The Client Class Test 17210.10 Playing with the Code 17311 Facade 17511.1 Hiding Complexity 17511.2 Intent and Applicability 17511.3 Introduction to the Facade Pattern 17611.4 The Facade Pattern in Real-World Applications 17711.5 Harry Potter Story Used to Illustrate the Facade Pattern 17711.6 A Top Level View of the Pattern Demonstration 17911.7 The Abstract Root Class Facade 18111.8 The Network Class 18311.9 The Node, Link, and Path Classes 19311.10 The Three Concrete Facade Classes 19811.11 Testing the Demonstration Code 20311.12 Playing with the Code 20712 Flyweight 21212.1 The Idea of Customized Duplications 21212.2 Intent and Applicability 21312.3 Introduction to the Flyweight Pattern 21312.4 The Flyweight Pattern in Real-World Applications 21412.5 Harry Potter Story Used to Illustrate the Flyweight Pattern 21412.6 A Top Level View of the Pattern Demonstration 21512.7 The HeadMasterPortrait Class 21812.8 The FlyweightImageStore Class 21812.9 The ImageManager Class 21912.10 The PortraitBorderChoices Class 22512.11 The ImageNotAvailableException Class 22612.12 The PortraitMakerAssignment Class 22612.13 Playing with the Code 22812.14 Acknowledgment 22913 Proxy 23013.1 Is It Always Necessary to Have the Real Thing? 23013.2 Intent and Applicability 23013.3 Introduction to the Proxy Pattern 23113.4 The Proxy Pattern in Real-World Applications 23213.5 Harry Potter Story Used to Illustrate the Proxy Pattern 23313.6 A Top Level View of the Pattern Demonstration 23513.7 The Abstract Class Wizard 23513.8 The DarkWizardTraits Interface 23713.9 The DarkWizard Class 23813.10 The DarkLord Class 24213.11 The ClientClass Class 24513.12 Playing with the Code 246III BEHAVIORAL PATTERNS 24914 Chain of Responsibility 25314.1 Passing the Buck 25314.2 Intent and Applicability 25414.3 Introduction to the Chain of Responsibility Pattern 25414.4 The Chain of Responsibility Pattern in Real-World Applications 25514.5 Harry Potter Story Used to Illustrate the Chain of Responsibility Pattern 25614.6 A Top Level View of the Pattern Demonstration 25814.7 The Interface Class Violations 26014.8 The Abstract Class Adjudicator 26114.9 The Player Class 26314.10 The Classes with the Authority to Resolve Violations 26514.11 Testing the Code 26814.12 Playing with the Code 26915 Command 27215.1 Actions Versus the Actors 27215.2 Intent and Applicability 27315.3 Introduction to the Command Pattern 27415.4 The Command Pattern in Real-World Applications 27415.5 Harry Potter Story Used to Illustrate the Command Pattern 27615.6 A Top Level View of the Pattern Demonstration 27715.7 The Command Interface 27915.8 The MyPlaces Interface 27915.9 The ProtectHarryPotter Class 27915.10 The Wizard Class 28215.11 The Squib Class 28415.12 The Invoker Class 28515.13 The UnableToProtectHarryPotterException Class 28615.14 The Client Class 28615.15 Playing with the Code 28816 Interpreter 29016.1 Parsing versus Interpretation 29016.2 Intent and Applicability 29216.3 Introduction to the Interpreter Pattern 29216.4 The Interpreter Pattern in Real-World Applications 29316.5 Harry Potter Story Used to Illustrate the Interpreter Pattern 29416.6 A Parser Front-End for the Interpreter Pattern 29616.7 A Top Level View of the Pattern Demonstration 30416.8 The Driver Class 30716.9 The Interpreter Sentence Class 31016.10 The Worker Classes for Interpretation 31216.11 The Utility Class ShowSyntaxTree 31516.12 Playing with the Code 31617 Iterator 32117.1 Storing Object Collections and Interacting with Them 32117.2 Intent and Applicability 32317.3 Introduction to the Iterator Pattern 32317.4 The Iterator Pattern in Real-World Applications 32417.5 Harry Potter Story Used to Illustrate the Iterator Pattern 32517.6 A Top Level View of the Pattern Demonstration 32617.7 A Utility Interface for Demonstrating the Iterator Pattern 32817.8 The Iterator Interface 33017.9 The Fresher Class 33017.10 The SortingHat Class 33417.11 The MagicCollection Interface 34417.12 The MagicList and MagicSet Classes 34417.13 The Class Range 34917.14 Playing with the Code 34917.15 Credits 35218 Mediator 35318.1 The Role of Mediation in Collaborative Problem Solving 35318.2 Intent and Applicability 35418.3 Introduction to the Mediator Pattern 35418.4 The Mediator Pattern in Real-World Applications 35518.5 Harry Potter Story Used to Illustrate the Mediator Pattern 35718.6 A Top Level View of the Pattern Demonstration 35718.7 The Abstract Class Mediator 35918.8 The Interface TrialElements 36018.9 The MinistryOfMagicTrialMediator Class 36118.10 The Witness Class 36618.11 The Trial Interface 36718.12 The HarryPotterTrial Class 36718.13 Playing with the Code 36919 Memento 37119.1 Recalling the Past 37119.2 Intent and Applicability 37219.3 Introduction to the Memento Pattern 37219.4 The Memento Pattern in Real-World Applications 37419.5 Harry Potter Story Used to Illustrate the Memento Pattern 37419.6 A Top Level View of the Pattern Demonstration 37719.7 The HogwartsHappening Class and The Inner Memento Class 37819.8 The Client Class 38019.9 Playing with the Code 38420 Observer 38620.1 Subscription-Based Broadcasting 38620.2 Intent and Applicability 38720.3 Introduction to the Observer Pattern 38720.4 The Observer Pattern in Real-World Applications 38820.5 Harry Potter Story Used to Illustrate the Observer Pattern 38920.6 A Top Level View of the Pattern Demonstration 39120.7 The Observer Interface 39120.8 The Observable Interface 39320.9 The DarkLord Class 39320.10 The DeathEater Class 39620.11 The GodProcess Class 39920.12 Playing with the Code 40121 State 40521.1 Contextual Dependence of Behaviors 40521.2 Intent and Applicability 40621.3 Introduction to the State Pattern 40621.4 The State Pattern in Real-World Applications 40621.5 Harry Potter Story Used to Illustrate the State Pattern 40721.6 A Top Level View of the Pattern Demonstration 40821.7 The DADA State Interface 41021.8 The Year-by-Year Implementation Classes for the State 41121.9 The TeachingDADA Class 41721.10 The Hogwarts Class 41821.11 Playing with the Code 41922 Strategy 42122.1 Strategies in the Pursuit of Goals 42122.2 Intent and Applicability 42222.3 Introduction to the Strategy Pattern 42222.4 The Strategy Pattern in Real-World Applications 42322.5 Harry Potter Story Used to Illustrate the Strategy Pattern 42422.6 A Top Level View of the Pattern Demonstration 42522.7 The Abstract Root Class for Strategies: StrategyAbstractRoot 42822.8 The Concrete Strategy Classes 42922.9 The Champion Class 43222.10 The SecondTaskManager Class 43422.11 Playing with the Code 43623 Template Method 43723.1 Customizable Recipes 43723.2 Intent and Applicability 43823.3 Introduction to the Template Method Pattern 43823.4 The Template Method Pattern in Real-World Applications 44023.5 Harry Potter Story Used to Illustrate the Template Method Pattern 44123.6 A Top Level View of the Pattern Demonstration 44223.7 The Abstract Root of Narrative Generation Classes 44423.8 Concrete Classes for Narrative Generation 44523.9 The Executable Class 44923.10 Playing with the Code 45024 Visitor 45324.1 Hooks, Good and Evil 45324.2 Intent and Applicability 45424.3 Introduction to the Visitor Pattern 45424.4 The Visitor Pattern in Real-World Applications 45724.5 Harry Potter Story Used to Illustrate the Visitor Pattern 45724.6 A Top Level View of the Pattern Demonstration 45924.7 The Visitor Interface 46024.8 Two Concrete Implementations of the Visitor Interface 46224.9 A Re-Implementation of the Wizard Hierarchy of the Composite Pattern 46324.10 The Executable Class Client 46924.11 Playing with the Code 470REFERENCES 473INDEX 474
Hoppa över listan









Du kanske också är intresserad av
- Nyhet
- Nyhet
Alla kan hålla tal -- 200 talrecept för livets speciella tillfällen.
Cecilia Burlin Åhnberg, Helene Pellvik
Häftad
259 kr
- Signerad!
- Nyhet
- Signerad!
- Nyhet
- Nyhet
- Nyhet