The application presentation layer works in conjunction with a
system application server (such as IBM® WebSphere® Application Server) to provide
a layered multiple channel architecture. The application presentation
layer works as a bridge that connects the clients with the application
logic layer, which performs business transactions. Java clients
and HTML clients use different application presentation components
to connect to the application logic layer.
To get connected with the application logic layer, the presentation
layer defines the following entities:
- Java RequestHandler processes
a Java client (Swing based or SWT based) request
for a particular type of requester. The toolkit registers these handlers
to determine which specific handler it needs for a specific request.
For example, there are different RequestHandlers for requests coming
from a Java client in a home banking environment, from
a Java client in a branch teller environment,
and from a Java client in a call center environment.
The RequestHandler is responsible for interacting with the client
side operations that controls the dialog navigation for a specific
client type and for interacting with invokers that call application
logic layer transactions.
- Java PresentationHandler processes
the reply for a particular type of requester (for example, DOJO).
- Web2.0 RequestHandler is responsible for processing a particular
request from Web 2.0 Workspace. The request handler performs the following
tasks to integrate with the application:
- Executes a generic application operation for the Web 2.0 Workspace.
- Determines the appropriate presentation handler from the handler
registry to render the results back to the client.
- Web2.0 PresentationHandler is responsible for processing
the reply to the Web 2.0 Workspace.
- HTML RequestHandler is responsible for processing a particular
request from an HTML client (The HTML client represents the traditional
Web1.0 application here). The handler may need to be aware of the
device type. This is managed by the channel context. The request handler
performs the following tasks to integrate with the application:
- Establishes the session between the client and the server for
the specific device
- Executes a generic application operation for the HTML channel
- Determines the appropriate presentation handler from the handler
registry to render the results back to the client.
- HTML PresentationHandler is responsible for processing
the reply to the HTML client. The main API provided by this class
is void processReply(ChannelContext, ServerOperation).
This starts the process of dynamically creating the HTML and rendering
it to the client using the servlet JSP engine.
- AjaxRequestHandler defines how AJAX request logic is handled.
The AjaxRequestHandler has the following functions:
- AJAX request validation: when an HTTP request is made, the AjaxRequestHandler
handler determines whether the request is an HTML channel request
or an AJAX channel request.
- Initializes channel parameters and generates data that is required
by the AJAX channel to process an AJAX request.
- Concurrent request support: enables two or more requests to be
executed at the same time in a session.
- AJAX time out value: specifies how long an AJAX request will be
timeout.
- Context handling: when a request is made, the AjaxRequestHandler
methodrebuilds the current context. If a request is raised in a processor,
the AjaxRequestHandler method rebuilds the processor context and chains
the request operation context to the processor context so that the
operation can access the processor context. If a request is not raised
in a processor, the AjaxRequestHandler method chains the AJAX operation
context under the current session context. When a request has been
processed, the AjaxRequestHandler method unchains the operation context
from the parent context. If the request is the last active request
and the parent is a process, it will save the processor context in
the cache as html processor done.
- AjaxHtmlPresentationHandler processes the response of Ajax
request, format the response message as JSON string. The client browser
handles the string as a JSON
To pass business process requests to the application logic layer,
the application presentation layer has the Invoker Component. The WebSphere Multichannel Bank
Transformation Toolkit Invoker
Component creates invokers according to the different protocol so
that the requester can invoke the EJBs, Web services, POJO or JMS
that perform the business processes in the application logic layer.