[ZDP] BackTalk to Document Zope Developer's Guide (2.4 edition)/Object Publishing
webmaster@zope.org
webmaster@zope.org
Fri, 04 Oct 2002 22:55:52 -0400
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZDG/current/ObjectPublishing.stx#2-2
---------------
When you contact Zope with a web browser, your browser sends an
HTTP request to Zope's web server. After the request is completely
received, it is processed by 'ZPublisher', which is Zope's object
publisher. 'ZPublisher' is a kind of light-weight ORB (Object
Request Broker). It takes the request and locates an object to
handle the request. The publisher uses the request URL as a map to
locate the published object. Finding an object to handle the
request is called *traversal*, since the publisher moves from
object to object as it looks for the right one. Once the published
object is found, the publisher calls a method on the published
object, passing it parameters as necessary. The publisher uses
information in the request to determine which method to call, and
what parameters to pass. The process of extracting parameters from
the request is called *argument marshalling*. The published object
then returns a response, which is passed back to Zope's web
server. The web server, then passes the response back to your web
browser.
% Anonymous User - Dec. 21, 2001 8:39 am - I don't understand.Sorry.
% Anonymous User - Jan. 11, 2002 9:53 am - Maybe clarify, that "Web Server" is just the
front end, passing requests to and receiving responses from ZPublisher, ZPublisher mapping requests to
responses?
% tibi - Feb. 22, 2002 6:00 am - Prehaps give an example at this point: say the URL http://zope/animals/monkey/feed?fruit=banana&num=17 is translated in Python to the call animals.monkey.feed(fruit = banana, num = 17)
% Jace - July 8, 2002 5:41 am:
In the above example, the actual call will be animals.monkey.feed(fruit = "banana", num = "17"). Note that
they are passed as strings. If the second parameter was meant to be passed as an integer, the URL should have
been "http://zope/animals/monkey/feed?fruit=banana&num:int=17.
% Anonymous User - Aug. 9, 2002 12:29 am:
Last 2 comments are illustrative and helpful and might be expanded upon.
% Anonymous User - Sep. 4, 2002 11:24 pm:
num:int is not a standard convention
% Anonymous User - Oct. 4, 2002 10:55 pm:
num:int nevertheless is part of Zope and above examples are on the right track:
exemplify URL traversal as July 8 above;
point out "feed" need not be contained in ~/monkey (acquisition)
and pattern Form/Action/Response is eased by num:int (conversion)
(with [apologies for lack of]![refs to] detail)
then reader may see the promised land. How ease it is to publish objects...:)blf