Java design patterns a hands-on experience with real-world examples

Use the step-by-step approach of this book to learn and implement design patterns in real-world applications. It focuses on classical design patterns with Java 17 and Eclipse (2021-09). In addition to Gang of Four (GoF) design patterns, the book covers popular and alternative design patterns and inc...

Full description

Bibliographic Details
Other Authors: Sarcar, Vaskaran, author (author)
Format: eBook
Language:Inglés
Published: Berkeley, California : Apress [2022]
Edition:Third edition
Subjects:
See on Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009664720206719
Table of Contents:
  • Intro
  • Table of Contents
  • About the Author
  • About the Technical Reviewers
  • Acknowledgments
  • Introduction
  • Part I: Foundation
  • Chapter 1: Understanding SOLID Principles
  • Single Responsibility Principle
  • Initial Program
  • Demonstration 1
  • Output
  • Analysis
  • Better Program
  • Demonstration 2
  • Output
  • Open/Closed Principle
  • Initial Program
  • Demonstration 3
  • Output
  • Analysis
  • Better Program
  • Demonstration 4
  • Output
  • Analysis
  • Liskov Substitution Principle
  • Initial Program
  • Demonstration 5
  • Output
  • Better Program
  • Demonstration 6
  • Output
  • Analysis
  • Interface Segregation Principle
  • Initial Program
  • Demonstration 7
  • Output
  • Analysis
  • Better Program
  • Demonstration 8
  • Output
  • Analysis
  • Dependency Inversion Principle
  • Initial Program
  • Demonstration 9
  • Output
  • Analysis
  • Better Program
  • Demonstration 10
  • Output
  • Analysis
  • Summary
  • Chapter 2: Simple Factory Pattern
  • Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Final Comment
  • Part II: The Gang of Four (GoF) Design Patterns
  • Chapter 3: Factory Method Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Modified Implementation
  • Demonstration 2
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Chapter 4: Abstract Factory Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Analysis
  • The Client Code Variations
  • Demonstration 2
  • Demonstration 3
  • Q&amp
  • A Session
  • Chapter 5: Prototype Pattern
  • GoF Definition.
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Modified Implementation
  • Class Diagram
  • Demonstration 2
  • Output
  • Analysis
  • Further Improvements
  • Q&amp
  • A Session
  • Shallow Copy vs. Deep Copy
  • Demonstration 3
  • Output From Shallow Copy Implementation
  • Analysis
  • Output From Deep Copy Implementation
  • Analysis
  • Q&amp
  • A Session Continued
  • Demonstration 4
  • Output
  • Analysis
  • Chapter 6: Builder Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Q&amp
  • A Session
  • Alternative Implementation
  • Demonstration 2
  • Output
  • Analysis
  • Q&amp
  • A Session Continued
  • Chapter 7: Singleton Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Alternative Implementations
  • Demonstration 2: Eager Initialization
  • Analysis
  • Demonstration 3: Bill Pugh's Solution
  • Analysis
  • Demonstration 4: Enum Singleton
  • Analysis
  • Q&amp
  • A Session Continued
  • Chapter 8: Proxy Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Q&amp
  • A Session
  • Demonstration 2
  • Output
  • Chapter 9: Decorator Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Using Subclassing
  • Using Object Composition
  • Class Diagram
  • Package Explorer View
  • Demonstration
  • Output
  • Q&amp
  • A Session
  • Chapter 10: Adapter Pattern
  • GoF Definition
  • Concept
  • Real-Life Example.
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Analysis
  • Types of Adapters
  • Object Adapters
  • Class Adapters
  • Q&amp
  • A Session
  • Demonstration 2
  • Output
  • Analysis
  • Chapter 11: Facade Pattern
  • GoF Definition
  • Concept
  • Real-World Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Chapter 12: Flyweight Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Chapter 13: Composite Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Chapter 14: Bridge Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Additional Implementation
  • Class Diagram
  • Demonstration 2
  • Output
  • Q&amp
  • A Session
  • Chapter 15: Template Method Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Q&amp
  • A Session
  • Demonstration 2
  • Output
  • Chapter 16: Observer Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration
  • Output
  • Q&amp
  • A Session
  • Chapter 17: Chain of Responsibility Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View.
  • Demonstration
  • Output
  • Q&amp
  • A Session
  • Chapter 18: Iterator Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Additional Comments
  • Demonstration 2
  • Output
  • Q&amp
  • A Session
  • Demonstration 3
  • Output
  • Chapter 19: Command Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Q&amp
  • A Session
  • Modified Implementation
  • Class Diagram
  • Demonstration 2
  • Output
  • Chapter 20: Memento Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Additional Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 2
  • Output
  • Analysis
  • Chapter 21: Strategy Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration
  • Output
  • Q&amp
  • A Session
  • Chapter 22: State Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Chapter 23: Mediator Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Analysis
  • Additional Implementation
  • Demonstration 2
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Chapter 24: Visitor Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram.
  • Package Explorer View
  • Demonstration 1
  • Output
  • Analysis
  • Using Visitor Pattern and Composite Pattern Together
  • Step 1
  • Step 2
  • Step 3
  • Step 4
  • Step 5
  • Demonstration 2
  • Output
  • Analysis
  • Demonstration 3
  • Output
  • Q&amp
  • A Session
  • Chapter 25: Interpreter Pattern
  • GoF Definition
  • Concept
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration 1
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Alternative Implementation
  • Demonstration 2
  • Output
  • Part III: Additional Design Patterns
  • Chapter 26: Null Object Pattern
  • Definition
  • Concept
  • A Faulty Program
  • Output
  • An Unwanted Input
  • The Potential Fix
  • Analysis
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration
  • Output
  • Analysis
  • Q&amp
  • A Session
  • Chapter 27: MVC Pattern
  • Definition
  • Concept
  • Key Points to Remember
  • Variation 1
  • Variation 2
  • Variation 3
  • Real-Life Example
  • Computer World Example
  • Implementation
  • Class Diagram
  • Package Explorer View
  • Demonstration
  • Contents in Model Folder
  • // Employee.java
  • // Model.java
  • // EmployeeModel.java
  • Contents in View Folder
  • // View.java
  • // ConsoleView.java
  • Contents in Controller Folder
  • // Controller.java
  • // EmployeeController.java
  • Client Code
  • // Client.java
  • Output
  • Q&amp
  • A Session
  • Modified Output
  • Analysis
  • Part IV: The Final Talks on Design Patterns
  • Chapter 28: Criticisms of Design Patterns
  • Q&amp
  • A Session
  • Chapter 29: Anti-Patterns
  • Overview
  • Brief History of Anti-Patterns
  • Examples of Anti-Patterns
  • Types of Anti-Patterns
  • Q&amp
  • A Session
  • Chapter 30: FAQ
  • Appendix A: A Brief Overview of GoF Design Patterns
  • Q&amp
  • A Session
  • Appendix B: The Road Ahead.
  • A Personal Appeal to You.