The classes in the request-response loop – Apple WebObjects 3.5 User Manual

Page 65

Advertising
background image

The Classes in the Request-Response Loop

65

As you learned at the end of the first chapter, WebObjects applications
respond to HTTP requests from the server and return responses in the
form of dynamically generated HTML pages. The main loop of a
WebObjects application, in which the application performs this work, is
called the request-response loop. You have a very broad understanding of
how this works: the web browser sends a request to the HTTP server,
which forwards it to the WebObjects adaptor, which translates it into a form
that a WebObjects application can understand. For the response, the
process is reversed.

This chapter describes in much greater detail what happens during the
request-response loop. It does so by describing the request-response loop
as WebObjects views it: as a communication between objects. In this
chapter, you learn about the objects that are involved at each level of the
loop, each object’s duty during each part of the request-response loop, and
the way these objects generate an appropriate HTML page in response to
the user request.

In the chapter “Common Methods” (page 41), you learned some of the
methods that are invoked during the request-response loop, and you
learned about cases where you might want to override these methods. As
you write more complex WebObjects applications, it becomes necessary to
know exactly what happens at each point in the processing of an HTTP
request and the generation of an HTTP response. You should read this
chapter to learn that level of detail. You can also refer to the class
specifications in the online book WebObjects Class Reference.

The Classes in the Request-Response Loop

The request-response loop begins when an incoming message (URL) from
a client web browser is handled by the HTTP server. This section starts at
that point and then dives into the request-response loop layer by layer,
telling you which classes get involved, and at which point. Later sections
walk you through the sequence of events that happen during one cycle of
the request-response loop and the sequence of events for generating an
HTML page.

Server and Application Level

At the server and application level, the request-response loop looks like

that shown in Figure 14.

Advertising