Giter Site home page Giter Site logo

ramakanth6789 / practical-design-patterns-for-java-developers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from packtpublishing/practical-design-patterns-for-java-developers

0.0 0.0 0.0 24.3 MB

Practical Design Patterns for Java Developers, published by Packt

License: MIT License

Java 100.00%

practical-design-patterns-for-java-developers's Introduction

Practical Design Patterns for Java Developers

LinkedIn URL

Design Patterns and Best Practices in Java

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

https://www.packtpub.com/

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.

Related products

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:

$ 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:

# Starting the JavaFlightRecorder for the patterns
# Recordings are done on Java 17
$ java -XX:StartFlightRecording=filename=<PATTERN_NAME_MAIN>.jfr,dumponexit=true,settings=profile <MAIN_CLASS>

HowToCompileAndExecuteCode

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!

Twitter URL
LinkedIn URL

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

practical-design-patterns-for-java-developers's People

Contributors

maran9 avatar mirage22 avatar packt-itservice avatar rohitpackt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.