Saved searches

Use saved searches to filter your results more quickly

Cancel Create saved search Sign up Reseting focus

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Practical Design Patterns for Java Developers, published by Packt

License

Notifications You must be signed in to change notification settings

PacktPublishing/Practical-Design-Patterns-for-Java-Developers

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Go to file

Folders and files

Last commit message Last commit date

Latest commit

History

View all files

Repository files navigation

Practical Design Patterns for Java Developers

This is the code repository for Practical Design Patterns for Java Developers , published by Packt. Hone your software design skills by implementing popular design patterns in Java

What is this book about?

The book describes 42 popular design patterns formed into an imaginary abstraction of vehicle manufacturing to boost the learning curve (Table 1.).

Creational Structural Behavioral Concurrent
Chapter 3 Chapter 4 Chapter 5 Chapter 6
Factory Method Adapter Caching Active Object
Abstract Factory Bridge Chain of Responsibility Asynchronous Method
Builder Composite Command Balking
Prototype Decorator Interpreter Double Checked Locking
Singleton Facade Iterator Read Write Lock
Object Pool Filter Mediator Producer Consumer
Lazy Initialization Flyweight Null Object Scheduler
Dependency Injection Front Controller Observer Thread Pool
Marker Pipeline
Module State
Proxy Strategy
Twin Template
Visitor

Table 1. : 42 Practical Design Patterns explored in the book

If you feel this book is for you, get your copy today!
What led the author to write this book: Miroslav Wengner: The Interview

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

public class Vehicle

Following is what you need for this book: If you are an intermediate-level Java developer or software architect looking to learn the practical implementation of software design patterns in Java, then this book is for you. No prior knowledge of design patterns is required, but an understanding of Java programming is necessary.

With the following software and hardware list you can run all code files present in the book (Chapter 1-7).

Software and Hardware List

Chapter Software required OS required
1 Java Development Kit 17+ Windows, Mac OS X, and Linux (Any)
1 Recommended IDE VSCode 1.73.1+ Windows, Mac OS X, and Linux (Any)
1 A text editor or IDE Windows, Mac OS X, and Linux (Any)

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Errata

Related products

How to install Java

Java Development Kit 17+ is required to run the book's examples. To check if it is available on your system, execute the following commands:

$ java -version # Expected output: openjdk version "17" 2021-09-14 OpenJDK Runtime Environment (build 17+35-2724) OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)

In case the JDK is not installed, feel free to visit the following links for help:

  1. Foojay.io : Java Quick Start
  2. dev.java : Getting Started with Java
  3. Homebrew Formulae: OpenJDK

How to create and open Java Flight Recorder recordings

The project contains several *.jfr recordings. The file-name refers to the image that was created from this recording. Java Mission Control version 8.2 was used for image creation purposes. *.jfr files can be opened in the Java Mission Control application, which can be downloaded from the links below.

# Starting the JavaFlightRecorder for the patterns # Recordings are done on Java 17 $ java -XX:StartFlightRecording=filename=PATTERN_NAME_MAIN>.jfr,dumponexit=true,settings=profile MAIN_CLASS>

Get to Know the Author

Miroslav Wengner is an engineer with a passion for resilient distributed systems and product quality. He is a co-author and contributor to the Robo4J project (a reactive soft real-time framework for robotics/IoT). Miro contributes to OpenJDK and participates in other open source technologies. He uses his passion for helping build resilient and scalable solutions. Miro was selected for the Java Champions Program, recognized as a JavaOne Rockstar, and elected to the Java Community Process (JCP) as an executive committee member.He shares his knowledge at conferences (JavaOne, Devoxx, and so on) and in blogs. Miro believes in the Java ecosystem and helps move it forward!

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.