Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Practical Design Patterns for Java Developers
Practical Design Patterns for Java Developers

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

eBook
€25.99
Paperback
€31.99
Subscription
Free Trial
Renews at €11.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods

Key benefits

  • 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

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.

Who is this book 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.

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
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 03, 2023
Length: 266 pages
Edition : 1st
Language : English
ISBN-13 : 9781804614679
Category :
Languages :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Publication date : Feb 03, 2023
Length: 266 pages
Edition : 1st
Language : English
ISBN-13 : 9781804614679
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€11.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€119.99 billed annually
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€169.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 105.97
50 Algorithms Every Programmer Should Know
€37.99
Practical Design Patterns for Java Developers
€31.99
Test-Driven Development with Java
€35.99
Total 105.97 Stars icon
Banner background image

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7
(20 Ratings)
5 star 90%
4 star 0%
3 star 0%
2 star 5%
1 star 5%
Filter icon Filter
Top Reviews

Filter reviews by




Maryna Savchenko May 17, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
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.
Amazon Verified review Amazon
Jeanne Boyarsky Mar 18, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
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.
Amazon Verified review Amazon
Rachel E. Barnes Jun 20, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I 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.
Amazon Verified review Amazon
Marcus Lagergren Mar 27, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Miroslav Wengner, the author of this book, has been an active member of the Java community since he worked at Sun Microsystems, back in another age. He has frequently contributed his knowledge, and has impressively had a prolific output of useful material and articles throughout his career since then.I should disclose here already, that I know Miro well, and he is a fellow Java Champion, so this may not be a completely unbiased review. But I still stand beside my positive feedback here. If in doubt - do verify what I say about this book yourself, or check with someone who has the equivalent level of knowledge. Personally, I feel that my observation that Miro's writing, while coming from deeply technical level, should be accessable to almost everyone with a little bit of experience in Java programming and object oriented paradigms.The book is not the first of its kind in the Java space, but it's probably the first that I have seen with the specific details provided as elegantly as way Miro does it. Miro doesn't just talk about design patterns and best practices, and what has happened to the Java platform through its history. I can also tell from the way he has written the book, that the design patterns he has chosen to write about are based on his impressive vertical knowledge too, from Java applications, and all the way down to the bare metal.Another observation that I have made over the years in various tech leadership positions over Java technology stacks, is that many senior Java developers with great domain knowledge of all the complex dependencies and libraries involved building modern software, still has untapped potential if he or she doesn't understand how the runtime(in this case the JVM and OS) executes their code, and how the CPU actually works (concepts like page faults, cache misses, memory bandwidth, and so on). This does not mean that a good Java programmer needs to explicitly do things that break the abstraction layers towards the native part of the platform - or usually hack about with these kinds of details. That is also very much not something that isn't recommended. There are typically several "nice" ways to get performance and scalability. But understanding at some coarse grained level of detail how the black box that is the JVM will execute your code, will still turn you into a massively better high level programmer. This, without you having the knowledge to build your own JVM and step your way through the garbage collection process with a debugger, or anything of that sort. I strongly believe this is a valid observation.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. I think it is very hard to promote certain practices that a person with good vertical knowledge has, when it comes to diving into complicated explanations of exactly what is going on under the hood for every use case. Adding lots of detail here, wouldn’t necessarily do any harm to the reader. In some cases, like the great "Optimizing Java" by Evans, Newland et al, this is the actual message the book tries to convey. In this case, though, I believe it would have significiantly reduced Miro's audience and the amount of good this book will do, where he do go into implemenation detais. However, the way he picked the design patterns to go over, and the way he explains them, are a great source of nderstanding for engineers who want to improve themselves and that strive to reach the lead software architect level. And this is the right end to start - not prying apart a lot of black boxes to look in side, but rather evangelize on best practice ways to do something in a high level language like Java, that will also bring the benefit of more efficient and less resource hungry programs.The book is made out of several main sections, first a summary of design patterns (general) and a bit about the Java platform and its functionality. The main part of the book follows next, which shows how design patterns should ideally be implemented in Java, and the relevant portions of the JDK libraries that should be used. The final part of the book talks about other essential patterns and anti-patterns. The anti-patterns are the most interesting topic here, IMHO, because typically they are not described in any detail in most literature.The book talks about how certain anti-patterns are bad design, create technical debt and so on, but also has good examples of how seemingly clean code will, in reality, stretch the intended JVM limits, and without the user understanding it, put unnecessary performancedegradations or scalability limits in the system. I really wish there were more of these kind of articles, because this ties directly into my observation that if you do know the vertical of the platform, without actually breaking any abstraction layers or anything. You should still be aware of things like autoboxing overhead in Java, and that the JVM can't magically detect and deduplicate equal Strings on the heap, without extra analysis overhead (typically deduplication as a function of GC) and so on. I think that a great topic for an expansion on this book would be good patterns and anti-patterns when it comes to interference in the JVM. There are not only things to be avoided that a good high level programmer should know, there are also things that are done as premature optimizations but do not alwaysmatter for performance. This section serves as a really good starting point to continue learning about how the Java program interacts with the platform, and should be a good primer for any developer who, before reading Miro's book, may have felt slightly nervous about delving into something heavier, more specialized on-the-JVM behavior, and more low level - e.g. the excellent "Optimizing Java" by Evans, et al.Finally - to summarize - Miro's book is fairly short, consise and to the point. And still it manages to present and explain common best practices used by pretty much any senior engineer in the Java ecosystem to anyone. I think this is quite valuable. It might evenhade been easier to write a thick detailed book, going depth first all the way down to the silicon, describing every detail of what makes a design pattern effective (and not just good abstraction).The way the book balances the width and depth of the material, and that it has still obviously been carefully written to promote patterns that are healthy both for general high level programming, but also gives you efficient implementations when they are running on the JVM, OS aand Silicon, is well thought through. The author also stays far away from the other common failure of a short technical book, which is not really expanding the reader's knowledge much, or even worse, just makes various "dangerous" buzzwords stick in the reader's mind ("blockchain" anymone?)I definitely recommend this book to anyone who wants to be a better Java architect, or for any Java architect already there, who wants to validate (and possibly expand) his or her knowledge. I am impressed by the outline, the material chosen, and the order and the way it is presented. This is really well done!
Amazon Verified review Amazon
S. E. Ritter Aug 03, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Developers need to master multiple skills to become successful. If you plan to work as part of a team, one of those skills will be design patterns. Patterns give us a concise way to express complex concepts that recur frequently in software development. For example, if you say that this part of the design will require a singleton, your team members will immediately understand that you only want a single instance of an object (and the complexities of guaranteeing that, especially in a multi-threaded application).The definitive book on patterns, written by the so-called Gang of Four, has been around for nearly thirty years. However, this is written in an abstract form without demonstrating the patterns used with a specific programming language.Miroslav Wenger’s book has taken a comprehensive approach to patterns targeted at the millions of developers using Java as their language of choice. Thirty-four core patterns are divided into creational, structural and behavioural. For each, a clear description and the motivation for use and sample Java code are provided. The book's second half looks at a further eight patterns targeted at concurrent applications and an equally important discussion of anti-patterns or things to avoid.If you’re a Java programmer looking to understand how patterns can be applied to your code, this book is for you.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela