Jump to ratings and reviews
Rate this book

Practical Design Patterns for Java Developers: Hone your software design skills by implementing popular design patterns in Java

Rate this book
Unravel the power of Java design patterns by learning where to apply them effectively to solve specific software design and development problems

Key FeaturesDecouple logic across objects with dependency injection by creating various vehicles with featuresFinalize vehicle construction by chaining handlers using the Chain of Responsibility PatternPlan and execute an advanced vehicle sensor initiation with the Scheduler PatternBook DescriptionDesign patterns are proven solutions to standard problems in software design and development, allowing you to create reusable, flexible, and maintainable code. This book enables you to upskill by understanding popular patterns to evolve into a proficient software developer.

You’ll start by exploring the Java platform to understand and implement design patterns. Then, using various examples, you’ll create different types of vehicles or their parts to enable clarity in design pattern thinking, along with developing new vehicle instances using dedicated design patterns to make the process consistent. As you progress, you’ll find out how to extend vehicle functionalities and keep the code base structure and behavior clean and shiny. Concurrency plays an important role in application design, and you'll learn how to employ a such design patterns with the visualization of thread interaction. The concluding chapters will help you identify and understand anti-pattern utilization in the early stages of development to address refactoring smoothly. The book covers the use of Java 17+ features such as pattern matching, switch cases, and instances of enhancements to enable productivity.

By the end of this book, you’ll have gained practical knowledge of design patterns in Java and be able to apply them to address common design problems.

What you will learnUnderstand the most common problems that can be solved using Java design patternsUncover Java building elements, their usages, and concurrency possibilitiesOptimize a vehicle memory footprint with the Flyweight PatternExplore one-to-many relations between instances with the observer patternDiscover how to route vehicle messages by using the visitor patternUtilize and control vehicle resources with the thread-pool patternUnderstand the penalties caused by anti-patterns in software designWho this book is forIf 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.

Table of ContentsGetting Into Software Design PatternsDiscovering the Java Platform for Design PatternsWorking with Creational Design PatternsApplying Structural Design PatternsBehavioral Design PatternsConcurrency Design PatternsUnderstanding Common Anti-Patterns

266 pages, Kindle Edition

Published February 3, 2023

2 people are currently reading
15 people want to read

About the author

Miroslav Wengner

2 books1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
3 (50%)
4 stars
1 (16%)
3 stars
1 (16%)
2 stars
1 (16%)
1 star
0 (0%)
Displaying 1 - 3 of 3 reviews
Profile Image for Jeanne Boyarsky.
Author 28 books76 followers
March 18, 2023
Early in my career, I read “Design Patterns: Elements of Reusable Object-Oriented Software.” This book is often known as GoF (Gang of Four) after the four authors: Gamma, Helm, Johnson, and Vlissides). This was an excellent book and I referenced it heavily. The patterns are still useful to this day. This book was published in 1994. (Soon we can wish it a happy 30th birthday!). In a fun coincidence, GoF is about the same age as Java.

“Practical Design patterns for Java Developers” breaks up the design patterns into the same groups – creational, structural, and behavioral. It adds examples of the features from the JDK itself which is great for linking it to things many Java developers have experienced.It also adds examples of implementing the pattern using modern Java. (Java 17 which was the most recent long term release at the time of the book's presenting.) These new features are used heavily making the book good examples of how to use the language.

Given that almost 30 years have past, there are more key patterns now. This book covers all the GoF creational patterns and adds object pool, lazy initialization, and dependency injection. For structural, the book adds the filter, front-controller, marker, module, and twin patterns. For behavioral, the book adds the caching, null object and pipeline patterns.

The book also covers concurrency patterns and anti-patterns which weren't in GoF. And all that is parts 2 and 3 of the book. Part 1 of the book, gets everyone on the same page. It covers the OOP (object oriented programming), APIE (abstraction, polymorphism, inheritance, and encapsulation) and SOLID (Single responsibility, open-closed, liskov substitution, interface segregation and dependency inversion) terminology in addition to how the JDK is structured.

All chapters except anti patterns end with review questions (and an appendix with answers) to solidify the information. In addition to the patterns material, I particularly liked the memory graphs in the anti pattern chapter. If you bought a printed book, you get a PDF and color diagrams free. (I didn't try this as a got a review copy). The code is also available on GitHub including the commands to run each example.

You do need to be comfortable reading Java to make sense of this book. If you aren't there yet, grab another book first and come back to this one. If you are comfortable reading Java, this book is for you!

I received a complementary copy from the publisher in exchange for writing this review.
Profile Image for Andres Sacco.
28 reviews6 followers
June 1, 2023
This book is an incredible way to learn more about design patterns because the author tackles each chapter to explain the different practices showing the motivation and how to implement them on Java.



One of the book's highlights is the author; the chapter explains some patterns and concepts about concurrency, which is rare to read in a book. Another highlight is that at the end of each chapter, the author includes many resources to go more in-depth into certain topics.
1 review
June 7, 2023
It is remarkable book with clear explanations of design patterns and many useful examples including references to JDK.
One of the standout features is chapter about concurrency design patterns, which helps to understand Java concurrency functionality better.
I also appreciated the author's attention to best practices and common anti-patterns.
Overall it is easy to read, cohesive guide to design patterns from the latest Java version prospective.
Displaying 1 - 3 of 3 reviews

Can't find what you're looking for?

Get help and learn more about the design.