Why Patterns? Why Design Patterns? Why C#? UML. Challenges. The Organization of this Book. Welcome to Oozinoz! Summary.
I. INTERFACE PATTERNS.
2. Introducing Interfaces.
Interfaces and Abstract Classes. Interfaces and Delegates. Interfaces and Properties. Interface Details. Summary. Beyond Ordinary Interfaces.
Adapting to an Interface. Class and Object Adapters. Adapting Data in .NET. Summary.
An Ordinary Facade. Refactoring to Facade. Facades, Utilities, and Demos. Summary.
An Ordinary Composite. Recursive Behavior in Composites. Composites, Trees, and Cycles. Composites with Cycles. Consequences of Cycles. Summary.
An Ordinary Abstraction. From Abstraction to Bridge. Drivers as Bridges. Database Drivers. Summary.
II. RESPONSIBILITY PATTERNS.
7. Introducing Responsibility.
Ordinary Responsibility. Controlling Responsibility with Accessibility. Summary. Beyond Ordinary Responsibility.
Singleton Mechanics. Singletons and Threads. Recognizing Singleton. Summary.
C# Support for Observer. Delegate Mechanics. A Classic Example-Observer in GUIs. Model/View/Controller. Layering. Summary.
A Classic Example-GUI Mediators. Relational Integrity Mediators. Summary.
A Simple Proxy. A Data Proxy. Remote Proxies. Summary.
12. Chain of Responsibility.
An Ordinary Chain of Responsibility. Refactoring to Chain of Responsibility. Anchoring a Chain. Chain of Responsibility without Composite. Summary.
Immutability. Extracting the Immutable Part of a Flyweight. Sharing Flyweights. Summary.
III. CONSTRUCTION PATTERNS.
14. Introducing Construction.
A Few Construction Challenges. Summary. Beyond Ordinary Construction.
An Ordinary Builder. Building under Constraints. A Forgiving Builder. Summary.
16. Factory Method.
A Classic Example-Enumerators. Recognizing Factory Method. Taking Control of Which Class to Instantiate. Factory Method in Parallel Hierarchies. Summary.
17. Abstract Factory.
A Classic Example-GUI Kits. Abstract Factories and Factory Method. Namespaces and Abstract Factories. Summary.
Prototypes as Factories. Prototyping with Clones. Summary.
A Classic Example-Using Memento for Undo. Memento Durability. Persisting Mementos across Sessions. Summary.
IV. OPERATION PATTERNS.
20. Introducing Operations.
Operations and Methods. Signatures. Delegates. Exceptions. Algorithms and Polymorphism. Summary. Beyond Ordinary Operations.
21. Template Method.
A Classic Example-Sorting. Completing an Algorithm. Template Method Hooks. Refactoring to Template Method. Summary.
Modeling States. Refactoring to State. Making States Constant. Summary.
Modeling Strategies. Refactoring to Strategy. Comparing Strategy and State. Comparing Strategy and Template Method. Summary.
A Classic Example-Menu Commands. Using Command to Supply a Service. Command Hooks. Command in Relation to Other Patterns. Summary.
An Interpreter Example. Interpreters, Languages, and Parsers. Summary.
V. EXTENSION PATTERNS.
26. Introducing Extensions.
Principles of OO Design. The Liskov Substitution Principle. The Law of Demeter. Removing Code Smells. Beyond Ordinary Extensions. Summary.
A Classic Example-Streams. Function Wrappers. Decorator in GUIs. Decorator in Relation to Other Patterns. Summary.
Ordinary Iteration. Thread-Safe Iteration. Iterating over a Composite. Summary.
Visitor Mechanics. An Ordinary Visitor. Visitor Cycles. Visitor Controversy. Summary.
Appendix A: Directions.
Get the Most Out of This Book. Understand the Classics. Weave Patterns into Your Code. Keep Learning.
Appendix B: Solutions.
Appendix C: Oozinoz Source.
Acquiring and Using the Source. Building the Oozinoz Code. Helping the Oozinoz Code Find Files. Testing the Code with NUnit. Finding Files Yourself. Summary.
Appendix D: UML at a Glance.
Classes. Class Relationships. Interfaces. Delegates and Events. Objects. States.