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

Compartir libro
  1. 314 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y 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

Detalles del libro
Vista previa del libro
Índice
Citas

Información del 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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Java EE 8 Design Patterns and Best Practices un PDF/ePUB en línea?
Sí, puedes acceder a Java EE 8 Design Patterns and Best Practices de Rhuan Rocha, João Purificação en formato PDF o ePUB, así como a otros libros populares de Ciencia de la computación y Programación en Java. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
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...

Índice