Book Image

Practical Design Patterns for Java Developers

By : Miroslav Wengner
Book Image

Practical Design Patterns for Java Developers

By: Miroslav Wengner

Overview of this book

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.
Table of Contents (14 chapters)
1
Part 1: Design Patterns and Java Platform Functionalities
4
Part 2: Implementing Standard Design Patterns Using Java Programming
8
Part 3: Other Essential Patterns and Anti-Patterns

To get the most out of this book

To execute the instructions in this book, you’ll need the following:

Software/hardware covered in the book

Operating system requirements

Java Development Kit 17+

Windows, macOS, or Linux

Recommended IDE VSCode 1.73.1+

Windows, macOS, or Linux

A text editor or IDE

Windows, macOS, or Linux

For this book, installation of Java Development Kit 17+ is required. To verify if it is available on your system, execute the following commands:

  • Windows Command Prompt: java –version
  • Linux or macOS system command line: 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 you don’t have the JDK installed on your local machine, search for the appropriate instructions for your platform at https://dev.java/learn/getting-started-with-java/ and find the matching JDK version at https://jdk.java.net/archive/.

To download and install Visual Studio Code, visit https://code.visualstudio.com/download.

The following page describes and guides the use of the VSCode terminal: https://code.visualstudio.com/docs/terminal/basics.