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

Buch teilen
  1. 314 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
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

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

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.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Java EE 8 Design Patterns and Best Practices als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Java EE 8 Design Patterns and Best Practices von Rhuan Rocha, João Purificação im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Ciencia de la computación & Programación en Java. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

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

Inhaltsverzeichnis