Java EE 8 Design Patterns and Best Practices
eBook - ePub

Java EE 8 Design Patterns and Best Practices

Build enterprise-ready scalable applications with architectural design patterns

Rhuan Rocha, João Purificação

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

Java EE 8 Design Patterns and Best Practices

Build enterprise-ready scalable applications with architectural design patterns

Rhuan Rocha, João Purificação

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Get the deep insights you need to master efficient architectural design considerations and solve common design problems in your enterprise applications.

Key Features

  • The benefits and applicability of using different design patterns in JAVA EE
  • Learn best practices to solve common design and architectural challenges
  • Choose the right patterns to improve the efficiency of your programs

Book Description

Patterns are essential design tools for Java developers. Java EE Design Patterns and Best Practices helps developers attain better code quality and progress to higher levels of architectural creativity by examining the purpose of each available pattern and demonstrating its implementation with various code examples. This book will take you through a number of patterns and their Java EE-specific implementations.

In the beginning, you will learn the foundation for, and importance of, design patterns in Java EE, and then will move on to implement various patterns on the presentation tier, business tier, and integration tier. Further, you will explore the patterns involved in Aspect-Oriented Programming (AOP) and take a closer look at reactive patterns. Moving on, you will be introduced to modern architectural patterns involved in composing microservices and cloud-native applications. You will get acquainted with security patterns and operational patterns involved in scaling and monitoring, along with some patterns involved in deployment.

By the end of the book, you will be able to efficiently address common problems faced when developing applications and will be comfortable working on scalable and maintainable projects of any size.

What you will learn

  • Implement presentation layers, such as the front controller pattern
  • Understand the business tier and implement the business delegate pattern
  • Master the implementation of AOP
  • Get involved with asynchronous EJB methods and REST services
  • Involve key patterns in the adoption of microservices architecture
  • Manage performance and scalability for enterprise-level applications

Who this book is for

Java developers who are comfortable with programming in Java and now want to learn how to implement design patterns to create robust, reusable and easily maintainable apps.

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.
Java EE 8 Design Patterns and Best Practices è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Java EE 8 Design Patterns and Best Practices di Rhuan Rocha, João Purificação in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Ciencia de la computación e Programación en Java. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2018
ISBN
9781788837736

Security Patterns

In this chapter, we will look at security pattern concepts and how they can help us to implement better security applications. We will also learn about the single-sign-on pattern and how this can help us to provide a secure application. In addition, we will learn about the authentication mechanism and authentication interceptor, focusing on how to implement those concepts. After reading this chapter, we will be able to create a security application and implement it using Java EE 8. The topics covered in this chapter are as follows:
  • Explaining the concept of security patterns
  • Explaining the concept of the single-sign-on pattern
  • Implementing the single-sign-on pattern
  • Explaining the authentication mechanism
  • Implementing the authentication mechanism
  • Explaining the authentication interceptor
  • Implementing the authentication interceptor

Explaining the concept of security patterns

Applications have a close relationship with data and its storage. This is because applications basically consist of managing data in order to make it possible to optimize the business using automation tasks, helping with decision-making, organizing tasks, and managing certain areas. Also, many companies need to store delicate data and validate access control. Over time, the demand for security software grew significantly, and many companies increasingly invested in creating safe applications. An integral element of security is security information, which follows these basic principles:
  • Confidentiality: The data should not be accessible to non-authorized users or to any entities that request access to the data.
  • Integrity: The data cannot be updated or modified in a non-authorized manner.
  • Availability: The data should be available when it is needed.
  • Non-repudiation: Users cannot repudiate or deny the relation using data or any other process.
For an application to be safe, it needs to provide at least these basic principles.
Security patterns are a set of solutions to common security problems that occur over and over. A large part of these security patterns works to solve problems about authentication, which is associated with confidentiality and integrity principles. With security patterns, the developer can write software with a high level of security for targeting known problems and issues using solutions that are tested and validated.

Explaining the concept of the single-sign-on pattern

In a business environment, it is very common that, when a user logs in to a system, they are automatically logged into various other systems within the business without having to input their login details more than once. One example of this is Google services. Here, if a user logs in to one Google application (Gmail, YouTube, Google Drive), they are logged in to all the available Google services. For example, if we log in to Gmail, we can access YouTube without having to log in again.
Single-sign-on is a security pattern that creates an authentication service that is shared with several applications of a domain to make the centered validation of authentication and authenticates a user only once in this domain. The user can then access all applications of this domain without having to authenticate again. All applications that depend on this type communicate with service authentication in order to validate the authentication of a user and log in if they are not yet logged in. These applications can be made in any language or technology and can stay in several networks or separate physical locations. In the following diagram, we can see the process of authentication using single-sign-on:
In the preceding figure, we have three applications that are accessed by a user as well as a single point to log in and validate authentication. This single point is shown in our diagram by Authentication Service. When a user (represented by Actor in the diagram) sends a request to an application (Application 1, Application 2, or Application 3), this application waits for Authentication Service to validate whether the user is logged in. If not, they are redirected to the login page, and the user can log in there. Afte...

Indice dei contenuti