[albatross-users] Random pages and application model

Dave Cole djc at object-craft.com.au
Fri Feb 21 15:08:59 EST 2003


>>>>> "Matt" == Matt Goodall <matt at pollenation.net> writes:

Matt> Gregory, thanks for the quick response.  I may be wrong but I'm
Matt> fairly sure random pages **are** processed differently. The docs
Matt> certainly imply this. The interface of pages handled by
Matt> RandomPageModuleMixin has no page_leave() method and the example
Matt> (4.8 Random Access Applications) uses ctx.redirect() rather than
Matt> ctx.set_page() to transfer to another page. In fact, if I use
Matt> set_page() in a random app I get an exception.

The RandomPage stuff is there to allow you to build bookmarkable
applications.  This means that the application is not really in
control of the sequence of pages requested by the browser.

You are right, as a consequence of the random nature the application
does not have the concept of "current page" when a new request comes
in.  If there is no current page then you cannot leave it.  Every
request enters the page requested in the URL.

Matt> The lifecycle of a 'normal' page is really nice - great for
Matt> clearing up session data - but I'm guessing that's hard to
Matt> achieve for random pages.  It's worth noting that an <al-a
Matt> href="page2"> tag on random pages is rendered as <a
Matt> href="/path/to/app.py/page2"> so Albatross is making no attempt
Matt> to "get in the way" of the request.

I am not sure I like the way Albatross does this.  It is really useful
for some things, but a pain for others.  The code is pretty hard to
follow too.

- Dave

-- 
http://www.object-craft.com.au




More information about the Albatross-users mailing list