Hands-On Design Patterns with Java
eBook - ePub

Hands-On Design Patterns with Java

Learn design patterns that enable the building of large-scale software architectures

Dr. Edward Lavieri

  1. 360 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Hands-On Design Patterns with Java

Learn design patterns that enable the building of large-scale software architectures

Dr. Edward Lavieri

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Understand Gang of Four, architectural, functional, and reactive design patterns and how to implement them on modern Java platforms, such as Java 12 and beyond

Key Features

  • Learn OOP, functional, and reactive patterns for creating readable and maintainable code
  • Explore architectural patterns and practices for building scalable and reliable applications
  • Tackle all kinds of performance-related issues and streamline development using design patterns

Book Description

Java design patterns are reusable and proven solutions to software design problems. This book covers over 60 battle-tested design patterns used by developers to create functional, reusable, and flexible software.

Hands-On Design Patterns with Java starts with an introduction to the Unified Modeling Language (UML), and delves into class and object diagrams with the help of detailed examples. You'll study concepts and approaches to object-oriented programming (OOP) and OOP design patterns to build robust applications. As you advance, you'll explore the categories of GOF design patterns, such as behavioral, creational, and structural, that help you improve code readability and enable large-scale reuse of software. You'll also discover how to work effectively with microservices and serverless architectures by using cloud design patterns, each of which is thoroughly explained and accompanied by real-world programming solutions.

By the end of the book, you'll be able to speed up your software development process using the right design patterns, and you'll be comfortable working on scalable and maintainable projects of any size.

What you will learn

  • Understand the significance of design patterns for software engineering
  • Visualize software design with UML diagrams
  • Strengthen your understanding of OOP to create reusable software systems
  • Discover GOF design patterns to develop scalable applications
  • Examine programming challenges and the design patterns that solve them
  • Explore architectural patterns for microservices and cloud development

Who this book is for

If you are a developer who wants to learn how to write clear, concise, and effective code for building production-ready applications, this book is for you. Familiarity with the fundamentals of Java is assumed.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Hands-On Design Patterns with Java è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Hands-On Design Patterns with Java di Dr. Edward Lavieri in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Programming in Java. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2019
ISBN
9781789809954
Edizione
1

Section 1: Introducing Design Patterns

In this section, you will gain an understanding of the concept and significance of design patterns, learn necessary unified modeling language constructs, and learn how design patterns are classified into a comprehensive library.
The following chapters will be covered:
  • Chapter 1, Unified Modeling Language Primer
  • Chapter 2, Object-Oriented Design Patterns

Unified Modeling Language Primer

This book features several design patterns and covers their implementation using Java. We can use Unified Modeling Language (UML) to help communicate class structures, objects, and interactions. This chapter provides an overview of UML, with a specific focus on diagrams applicable to the hands-on activities in this book.
The following topics will be covered in this chapter:
  • Introducing UML
  • Behavior diagrams
  • Structural diagrams

Technical requirements

This chapter does not have any technical requirements. In order to create UML diagrams, the following open source software tool is recommended:
  • Modelio, which is available at https://www.modelio.org
Modelio can be run on systems with any of the following operating systems:
  • Debian/Ubuntu
  • macOS X
  • RedHat/CentOS
  • Windows 7
  • Windows 8
  • Windows 10

Introducing UML

UML was developed in 1994 to document object-oriented systems. Since that time, UML has become a standard tool for software engineers, software developers, and businesses. UML is used to design software and, after programming, also provides a visual record for the system which can be included as part of formal software documentation.
There are two types of UML diagrams—behavioral and structural. Both are described in the sections that follow.

Understanding behavioral UML diagrams

Behavioral diagrams illustrate how system components interact to form a system. The four diagrams listed here are behavioral, and are briefly described in the subsections that follow:
  • Activity diagrams
  • Interaction diagrams
  • State machine diagrams
  • Use case diagrams

Activity diagrams

Activity diagrams illustrate the flow of processes in a system. This type of diagram is used to visually document activities within a system, also referred to as a system's procedures or dynamic components.
The following activity diagram shows the activities involved when a coffee shop customer places an order. The starting point is the top black circle. From there, an order is received. Beneath the Receive Order node is a horizontal black bar referred to as a fork. There are three activities that take place in parallel after the fork—Make Drink, Get Bakery, and Collect Payment. All of those activities take place in parallel. Each of those activities feed into a second black bar, this time referred to as a join, which has multiple activities linked to it. Once all three activities are completed, the order can be completed and ends with the bottom black circle:
An activity diagram for a coffee shop order process

Interaction diagrams

Interaction diagrams visually document how system components interact with each other.
In the following interaction diagram, you can see that the flow starts with a decision on whether the customer is a new, or already existing, customer. In both cases, the interaction between the Customer object and Customer Database object is documented:
An interaction diagram for a coffee shop order
Interaction UML diagrams are robust and come in several different types. The interaction UML diagram types are listed here and will be covered in the subsequent sections:
  • Sequence diagram
  • Communication diagram
  • Timing diagram

Sequence diagrams

Sequence diagrams are used to show a specific use case scenario. So, these diagrams are representative of a typical behavior based on the given use case.
The following sequence diagram example visually documents the use case where a student logs on to an online book order system and enters their course code. The online system calculates a price and provides this total to the student. The student is then able to submit their payment, which goes through the online bookstore and informs the fulfillment center, which ships the books to the student:
An example sequence diagram

Communication diagrams

Communication diagrams are a special type of interaction diagrams. They f...

Indice dei contenuti