O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Java Design Patterns

Book Description

Learn how to implement design patterns in Java: each pattern in Java Design Patterns is a complete implementation and the output is generated using Eclipse, making the code accessible to all. The examples are chosen so you will be able to absorb the core concepts easily and quickly.

This book presents the topic of design patterns in Java in such a way that anyone can grasp the idea. By giving easy to follow examples, you will understand the concepts with increasing depth. The examples presented are straightforward and the topic is presented in a concise manner.

Key features of the book:

  • Each of the 23 patterns is described with straightforward Java code. There is no need to know advanced concepts of Java to use this book.

  • Each of the concepts is connected with a real world example and a computer world example.

  • The book uses Eclipse IDE to generate the output because it is the most popular IDE in this field.

This is a practitioner's book on design patterns in Java. Design patterns are a popular topic in software development. A design pattern is a common, well-described solution to a common software problem. There is a lot of written material available on design patterns, but scattered and not in one single reference source. Also, many of these examples are unnecessarily big and complex.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. Acknowledgments
  9. Preface
  10. Key Points
  11. Chapter 1: Introduction
  12. Chapter 2: Observer Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
    10. UML Class Diagram
    11. Package Explorer view
    12. Implementation
    13. Output
    14. Assignment
    15. UML Class Diagram
    16. Implementation
    17. Output
  13. Chapter 3: Singleton Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  14. Chapter 4: Proxy Patterns
    1. Concept
    2. Real–Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  15. Chapter 5: Decorator Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  16. Chapter 6: Template Method Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  17. Chapter 7: Strategy Patterns (Or, Policy Patterns)
    1. Concept
    2. Real–Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  18. Chapter 8: Adapter Patterns
    1. Concept
    2. Real–Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
    10. Illustration
    11. Output
  19. Chapter 9: Command Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  20. Chapter 10: Iterator Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  21. Chapter 11: Facade Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  22. Chapter 12: Factory Method Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  23. Chapter 13: Memento Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  24. Chapter 14: State Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  25. Chapter 15: Builder Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  26. Chapter 16: Flyweight Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Improvement to the program
    10. UML Class Diagram
    11. Package Explorer view
    12. Implementation
    13. Output
    14. Note
  27. Chapter 17: Abstract Factory Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  28. Chapter 18: Mediator Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  29. Chapter 19: Prototype Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  30. Chapter 20: Chain of Responsibility Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  31. Chapter 21: Composite Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  32. Chapter 22: Bridge Patterns (Or Handle/Body Patterns)
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  33. Chapter 23: Visitor Patterns
    1. Concept
    2. Real-Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  34. Chapter 24: Interpreter Patterns
    1. Concept
    2. Real–Life Example
    3. Computer World Example
    4. Illustration
    5. UML Class Diagram
    6. Package Explorer view
    7. Implementation
    8. Output
    9. Note
  35. Appendix A: FAQ
    1. References
  36. Index