Java Reference
In-Depth Information
Scaling Internet applications requires an architecture that uses indepen-
dent software components as building blocks. Table 10.1 reviews the likely
components. These pieces should stand alone, with only minimal standard-
ized interfaces, or touch points , exposed to the rest of the system.
Table 10.1 Here are the controlled touch points between the elements of our architecture. The
controller, JSP pages, and command layer form the interface between the static client and the
model. The communication to the static client goes through the controller, while model
communication is encapsulated in the command.
Touch Point
Shares Interfaces With
Uses This Interface
Static client
Controller
HTTP POST, GET
Controller (A.K.A. interaction
controller, IC)
Static clients
Commands
JSP
HTTP
Method calls
Request object, URL
parameters
JSP pages
Command beans
Controllers
Data JavaBeans from controller
Request object, URL
parameters
Command layer (A.K.A. facade)
Controller
JSP
Model
Method call
Data JavaBeans through con-
troller
Many
Model
Command layer
Many
Now let's explore each component's role in our system:
Static clients. The clients communicate to the middle tier exclusively
through HTTP POST and GET . The client scripting language can be gen-
erated dynamically. In the event that validation or complex user inter-
face logic forces deployment of client-side Java, this too should
communicate to the server exclusively through HTTP. In this way, the
client can request a service via a single name and the request can be
mapped by the edge services onto an appropriate server. This service
can be completely independent of the client.
Servlets. The initial touch points are the interaction controllers, which
are implemented as servlets. They get input in the form of HTTP
request form parameters. These servlets communicate with business
logic through intermediate objects called commands, or facades. They
also return dynamic content to the client by dispatching JSP pages. In
addition, servlets can use services provided by the web server, such as
Search WWH ::




Custom Search