Amazon Prime Free Trial
FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with FREE Delivery" below the Add to Cart button and confirm your Prime free trial.
Amazon Prime members enjoy:- Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
- Unlimited FREE Prime delivery
- Streaming of thousands of movies and TV shows with limited ads on Prime Video.
- A Kindle book to borrow for free each month - with no due dates
- Listen to over 2 million songs and hundreds of playlists
Important: Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Practical Design Patterns for Java Developers: Hone your software design skills by implementing popular design patterns in Java
Purchase options and add-ons
Unravel the power of Java design patterns by learning where to apply them effectively to solve specific software design and development problems
Key Features:
- Decouple logic across objects with dependency injection by creating various vehicles with features
- Finalize vehicle construction by chaining handlers using the Chain of Responsibility Pattern
- Plan and execute an advanced vehicle sensor initiation with the Scheduler Pattern
Book Description:
Design 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 Learn:
- Understand the most common problems that can be solved using Java design patterns
- Uncover Java building elements, their usages, and concurrency possibilities
- Optimize a vehicle memory footprint with the Flyweight Pattern
- Explore one-to-many relations between instances with the observer pattern
- Discover how to route vehicle messages by using the visitor pattern
- Utilize and control vehicle resources with the thread-pool pattern
- Understand the penalties caused by anti-patterns in software design
Who this book is for:
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.
- ISBN-10180461467X
- ISBN-13978-1804614679
- PublisherPackt Publishing
- Publication dateFebruary 3, 2023
- LanguageEnglish
- Dimensions9.25 x 7.52 x 0.56 inches
- Print length266 pages
Frequently bought together
Customers who bought this item also bought
From the brand
-
See more at our store
-
Packt is a leading publisher of technical learning content with the ability to publish books on emerging tech faster than any other.
Our mission is to increase the shared value of deep tech knowledge by helping tech pros put software to work.
We help the most interesting minds and ground-breaking creators on the planet distill and share the working knowledge of their peers.
Editorial Reviews
Review
"What sets this book apart is the personal touch Miroslav brings to the material. His clear and concise writing style, combined with his expertise and passion for Java and patterns, makes the book enjoyable to read. Practical Design Patterns for Java Developers is a must-read for experienced Java developers who want to sharpen their software design skills and stay up to date with the latest trends in the field. Miroslav's expertise, combined with his unique perspective, makes this book an invaluable resource for creating more efficient, maintainable, and scalable Java applications."
--Brian Benz, Senior Cloud Advocate, Microsoft & Java Champion.
“What makes Miro's book stick out when it comes to this is that I can tell that he has chosen to elaborate on design patterns that are best-practice on the high-level side but also tend to translate well into efficient code running on the JVM. The author is not necessarily explicit about this, in fact, I believe he has deliberately chosen not to be. But I can still infer much from his various pedagogic explanations. This is great, IMHO.”
--Marcus Lagergren, Vice President / Executive Director, Goldman Sachs
About the Author
Miroslav is an engineer and architect with a passion for resilient distributed systems and product quality. He is a co-author and contributor to the Robo4J project (reactive soft real-time framework for robotics/IoT). He contributes to OpenJDK, and Java Mission Control Project, and is involved in other open-source technologies. Miroslav helps developers to create resilient and extendable solutions. He has been selected to Java Champions Program, recognized as JavaOne Rockstar and he has been Elected to Java Community Process (JCP) - Executive Committee to help guide the evolution of Java technologies.
Product details
- Publisher : Packt Publishing (February 3, 2023)
- Language : English
- Paperback : 266 pages
- ISBN-10 : 180461467X
- ISBN-13 : 978-1804614679
- Item Weight : 1.03 pounds
- Dimensions : 9.25 x 7.52 x 0.56 inches
- Best Sellers Rank: #1,482,097 in Books (See Top 100 in Books)
- #365 in Java Programming
- #619 in Computer Systems Analysis & Design (Books)
- #1,154 in Enterprise Applications
- Customer Reviews:
About the author
Miro 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 has contributed to other open source technologies (OpenTracing, Pi4J, etc.). He uses his passion to help 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, etc.) and on blogs. Miro believes in the Java ecosystem and helps move it forward!
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
There was a problem filtering reviews right now. Please try again later.
- Reviewed in the United States on June 20, 2024I took a design patterns class in college years ago and I was looking for an updated book to refresh myself, this was exactly what I was looking for.
- Reviewed in the United States on October 3, 2023As a software developer running a YouTube channel dedicated to algorithmic problem-solving on platforms like LeetCode, I'm excited to share my perspective on 'Mastering Java Design Patterns.' This book offers a unique approach to design patterns, catering to developers of all levels.
The book's organization into three sections stands out: 'Exploring Design Patterns and Java's Functionalities,' 'Implementing Standard Patterns Effectively,' and 'Advanced Patterns and Identifying Anti-Patterns.'
In the first section, the author introduces design patterns alongside Java's functional capabilities, creating a powerful blend that aids understanding and application.
The middle section dives into various design patterns, using practical, real-world examples from the Java Development Kit (JDK). This approach bridges theory and application effectively.
As a developer, I appreciated the book's thorough coverage of anti-patterns, essential in today's multi-core, multi-threaded environments.
Throughout, the author's concise, engaging style and thoughtful organization shine. Miroslav's expertise makes this book invaluable for crafting efficient, maintainable software.
Whether you're a problem-solving enthusiast or a developer looking to elevate design skills, 'Mastering Java Design Patterns' offers an enlightening journey, packed with practical wisdom."
- Reviewed in the United States on April 9, 2023I’ve been a software developer for most of my adult life. Early in my career, I was in an interview, being asked about design pattern questions. I thought, how hard could that be? Boy, was I in for a surprise; while I’ve coded common design patterns without realizing it, I didn’t know each design pattern had a name.
At the time, a mentor showed me the (Gang of Four) Design Patterns book, which helped me re-think the best practices in software architecture and design. However, the book was not written from a Java developer’s perspective. This is precisely why the Practical Design Patterns for Java Developers book resonated with me.
Miroslav Wengner (Java Champion) explains how to code design patterns in the Java language properly. For example, the Singleton pattern may sound basic; however, the author explains the importance of the double-checked locking pattern in Java. As many seasoned developers will encounter these pitfalls, this book will help you avoid them.
Chapter 1 begins by providing the reader with a great foundation covering object-oriented programming and design principles.
Chapter 2 covers much material on the OpenJDK platform (11-17+), many Java language features, and deep knowledge of Java internals.
Chapters 3-6 represent the main categories of design patterns such as Creational, Behavioral, Concurrency, etc.
Each chapter begins with a URL to the chapter’s source code. I like how Miroslav uses a common theme of automobiles (cars) when showing the code samples. This helps me remember and conceptualize the design patterns tangibly.
Each chapter has three main sections Motivation, Finding it in the JDK, and Sample code. The author carefully explains the motivation to help the reader understand the what, where, when & how to apply design patterns in the real world. Next, the author describes where you can find the design pattern in the Java language, such as existing Java types (classes, interfaces, etc.). Thirdly the author presents a UML diagram with sample code. At the end of each chapter, the reader is presented with questions to assess their knowledge.
Chapter 7 is my favorite chapter. I love how Miroslav talks about scenarios related to current technology stacks of today, such as microservices, concurrency programming, etc., unlike other pattern books that are too cut and dry for my taste. In practice, we often learn how to do things correctly but don’t realize we’ve been doing some things incorrectly for so long. This chapter will teach you how to recognize Anti-patterns. In other words, how to avoid bad coding (code smell) practices.
The Assessments chapter (like at the end of each chapter) will provide many questions to help challenge the reader. If only I could turn back time and use this book during those intense interviews.
Pros:
- UML diagrams
- Easy examples to follow
- Explains Anti-Patterns
- Assessments in each chapter to challenge the reader
- References to further reading sections
- Code is open-sourced on GitHub
- Practical examples
Cons:
- Not for the Java beginner
If you are an impatient mid to senior-level Java developer, you can just go jump to Chapter 3.
- The title font of each design pattern name isn’t prominent at first glance.
Conclusion
The book is a breath of fresh air for many Java developers who care about maintaining, developing, and designing software. You can immediately tell Miroslav has a deep knowledge of the Java Platform internals. Many examples are easy to follow and well-explained. This is the kind of book you can read during your travels without needing your computer and compiler. It may not be as thrilling as a mystery novel, but you never know; it could land you your next dream job.
- Reviewed in the United States on March 18, 2023Early 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.
Top reviews from other countries
- Frank DelporteReviewed in the Netherlands on March 8, 2023
5.0 out of 5 stars Many useful tips and patterns to write better Java code!
The book of Miroslav Wengner is exactly the kind of book I was missing when I got more experienced in Java development and wanted to uplift my career. On top of that, it also provides a lot of extra information related to the recent changes in the OpenJDK, which brought a lot of evolutions into the Java programming language and make it once more the preferred language for many different use cases.
I'm impressed with the knowledge Miroslav exposes in his book. For each principle, at least one implementation inside OpenJDK is referenced to illustrate they are part of the Java code base itself, revealing his engagement in the OpenJDK project and his experience with Java.
The long list of principles can be a bit frightening as it not only illustrates what you should understand and know to produce good code, but also what you can do wrong, or did wrong in the past. But personally, it was also a confirmation. You do grow as a developer in your career when you focus on clean code. Some of these principles, became a daily habit as I wanted to become a better coder, and started implementing them without even knowing of their existence, as they made my code better to maintain.
Many good points...
* The principles and patterns explained in the book will uplift your knowledge and bring your code quality to the next level.
* When you buy the paper version of the book, you can get a DRM-free PDF via an easy web form with a fast response.
* You can also download a PDF with a color version of all the images. Most are flowcharts, but for instance, for the screenshots of the thread visualization with JFR, they are handy.
* Each chapter ends with questions to validate you picked up the most important information. Also, a list with links for "Further reading" is included.
* All example code is based on a "vehicle" approach which is implemented or extended into different use cases as needed to illustrate the topic. No foo/bar examples in this book!
* All example code is available on GitHub if you want to run them or dive into the code to better understand the principles.
- Péter CsalaReviewed in Germany on August 5, 2024
1.0 out of 5 stars Poorly written book
Unfortunately this book promised way more than it delivered. The first few chapters are hard to follow for those who have never worked with Java. For those who have worked with Java does not tell anything new and does not serve as a great recap either. The design patterns are poorly covered and in couple of cases the sample codes are terrible. The code quality is bad also the narrative is shallow. The anti-patterns could be detailed in more depth IMHO.
I as a seasoned developer found this book really disappointing.
- Kindle CustomerReviewed in Germany on August 18, 2023
2.0 out of 5 stars Shallow Content - Trivial half page explanations
Very shallow explanations most of the times a design pattern is explained in one- one and a half page.
This is not enough to even grasp the basics. Definitely don't recommend for a professional java developer. There are better alternatives.