The best practice of Java8 design pattern-design pattern overview (fifth day learning record)

Presentation Patterns

In this chapter, we'll cover each topic by explaining the concept and showing examples of
in this chapter, we will explain the concept and presentation
. After reading this chapter implementations, you will know about these concepts and will
achieve. After reading this chapter, you will understand these concepts
be able to implement them using Java EE 8. Here are the topics that are covered in
JavaEE8. The following is the subject involved in the
upcoming sections:
the following chapters:
Explaining The Presentation Tier
explain presentation layer
Explaining the intercepting filter pattern
explained interceptor filter pattern
Implementing the intercepting filter pattern using Java EE 8
with javaee8 achieve knockdown filtering mode
Explaining the front controller pattern
interpretation controller mode before
Implementing the front controller pattern
achieved front controller mode
Explaining the application controller pattern
interpretation mode controller application
Implementing the application controller pattern
achieved Application Controller Mode

Explaining the presentation tier
explain presentation layer
at The Platform the Java EE IS A Distributed Multitiered the Application Model that has Three Widely
JavaEE platform is a distributed multi-tier application model, it has three widely
used common tiers. These tiers are the presentation tier ( or web tier), the business tier, and
use the common tier. These layers are the presentation layer (or web layer), the business layer and
the integration tier (or EIS tier). The
integration layer (or EIS layer).
The presentation tier, also known as the web tier, contains the components that create a presentation tier, also known as the web tier,
including creating a
web application. This tier has many components that use the HTTP protocol, construct
web applications. This layer has many components that use the HTTP protocol, construct
views and interfaces for users, and provide a web service. These components are called web provide views and interfaces for users, and provide
web services. These components are called web
components. There are two types of presentation tier:
components. There are two types of presentation layer:
the Presentation Tier-Oriented: This type of the contains The Presentation Tier
oriented presentation layer: This type of presentation layer comprises
components to construct an interactive web page and dynamic content using
the components used to construct the interactive web pages and
HTML and XHTML. These components are JavaServer Faces technology, Java
HTML and XHTML. These components are JavaServer Faces technology, Java
Servlet technology, and JavaServer Page technology, which allow us to construct
Servlet technology and JavaServer page technology, which allow us to construct
an interactive web page.
An interactive web page.

Server-oriented tier: This contains the components to construct an endpoint of a
server -oriented tier: contains the components used to construct a
web service. These components are JAX-RS and JAX-WS.
Web services. These components are JAX-RS and JAX-WS.
The presentation-oriented tier is generally used on web applications using component-based specifications such as JavaServer Faces technology, or web applications using actionbased Java Servlet technology as well as JavaServer Pages technology. The server-oriented
presentation layer is generally used on web applications using component- based specifications (Such as javaserverfaces technology) web applications, or use action-based javaservlet technology and javaserverpages technology web applications. For servers
Tier IS ON web Applications Used GeneRally that the Create A REST API or web Service that IS
Tier restapi often used to create web services or web applications
consumed by the client running on a mobile platform or browser. In the following diagram,Insert picture description here

Used by clients running on mobile platforms or browsers. In the following figure,
WE CAN See How at The Presentation Tier Works
we can see how the presentation layer works

As shown in the preceding diagram, the Client sends a Request to the server; the
shown, as in FIG client sends a request to the server
Presentation Tier processes the request and sends it to the Business Tier; the Business Tier
to send service layer The request
then sends a response to the Presentation Tier if the request is not asynchronous, and if the request is not asynchronous,
then the response is sent to the presentation layer, and
finally the Presentation Tier processes and sends the response to the Client.
Finally, the presentation layer processes and Send the response to the client.
Because the Presentation Tier is responsible for promoting HTTP communications and
because the Presentation Tier is responsible for promoting HTTP communications and
connections with external users, this tier fulfills many interactions and communications
. This tier fulfills many interactions and communications.
between web components. Numerous tasks need to be performed for this to work well.
between web components. To make this work go smoothly, many tasks need to be performed.
These tasks include validating the data sent by a client, formatting it, sending it to the
tasks include verification data sent by the client, format data, send it to the
correct business component or class, and filtering the data and requests.
Properly Business components

Guess you like

Origin blog.csdn.net/Coder_Boy_/article/details/110379433