Explaining the presentation tier

The Java EE platform is a distributed multitiered application model that has three widely used common tiers. These tiers are the presentation tier (or web tier), the business tier, and the integration tier (or EIS tier).

The presentation tier, also known as the web tier, contains the components that create a web application. This tier has many components that use the HTTP protocol, construct views and interfaces for users, and provide a web service. These components are called web components. There are two types of presentation tier:

  • Presentation-oriented tier: This type of presentation tier contains the components to construct an interactive web page and dynamic content using HTML and XHTML. These components are JavaServer Faces technology, Java Servlet technology, and JavaServer Page technology, which allow us to construct an interactive web page.
  • Server-oriented tier: This contains the components to construct an endpoint of a web service. 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 action-based Java Servlet technology as well as JavaServer Pages technology. The server-oriented tier is generally used on web applications that create a REST API or web service that is consumed by the client running on a mobile platform or browser. In the following diagram, we can see how the presentation tier works:

As shown in the preceding diagram, the Client sends a Request to the server; the Presentation Tier processes the request and sends it to the Business Tier; the Business Tier then sends a response to the Presentation Tier if the request is not asynchronous, and finally the Presentation Tier processes and sends the response to the Client.

Because the Presentation Tier is responsible for promoting HTTP communications and connections with external users, this tier fulfills many interactions and communications between web components. Numerous tasks need to be performed for this to work well. These tasks include validating the data sent by a client, formatting it, sending it to the correct business component or class, and filtering the data and requests.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.111.208