百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

Practical-Design-Patterns-for-Java-Developers

> 编程语言
开源

《Java 开发人员的实用设计模式》,由 Packt 出版

100 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

《Java 开发人员的实用设计模式》,由 Packt 出版

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?

As the experience level increases for software developers, it becomes crucial to develop the required skillset for developing quality code. This book will enable you to identify and apply common design patterns for building quality applications by refining your code.

This book covers the following exciting features:

  • 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

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

The book

Instructions and Navigations

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

The code will look like the following:

public class Vehicle {
 private boolean moving;
   public void move(){
       this.moving = true;
       System.out.println("moving...");
 }

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

  • Figure 2.1 The Extension class loader mentioned in the image should be the Application & Platform Classloader

Related products

  • Domain-Driven Design with Java - A Practitioner’s Guide [Packt] [Amazon]

  • Java Memory Management [Packt] [Amazon]

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:

bash
$ 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.

download links:

  • https://github.com/openjdk/jmc
  • https://adoptium.net/jmc/
bash
# Starting the JavaFlightRecorder for the patterns
# Recordings are done on Java 17
$ java -XX:StartFlightRecording=filename=.jfr,dumponexit=true,settings=profile 

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.

https://packt.link/free-ebook/9781804614679

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言