Saving Browser State without Cookies

Tim Churches tchur at optushome.com.au
Thu Feb 7 15:07:17 EST 2002


"Orr, Steve" wrote:
> In this regard I'm looking into Albatross. As a welcome departure from the
> norm with frameworks, the number of lines of code is actually exceeded by
> the number of lines of documentation. ;-)

I'd be happy for that to be known as Tim's (not Timothy's) Axiom...

> In the book you mention Albatross along with many other Python solutions.
> (There's so many it's overwhelming to the relative newbie.) Preferring
> brevity and simplicity, Albatross looks like a very well engineered
> solution.
> 
> It would be great if someone could share their experience with using
> Albatross in a real world Python/Web implementation.
> 
> Anyone???????

I have been working on an Albatross-based app. Admittedly, the Object
Craft guys (the authors of Albatross) did the first version of the
front-end (i.e. the Web pages and associated logic) under contract, but
after spending a few hours reading the excellent Albatross docs, I have
been happily tweaking and extending the application. The application is
fairly complex: it is an epidemiological mortality analysis system, with
separate pages to collect fairly detailed user-specified parameters for
each of the basic epidemiological questions: who (died i.e. age and
sex), when (did they die), where (did they live), why (did they die i.e.
cause of death, not a higher metaphysical question...), and also what
(does the user want - tables, graphs etc). Selections on one page may
limit the valid choices on another page in complex ways, and the 5
parameter pages can all be accessed in random order. Albatross makes it
quite easy to implement the logic for all of this by transparently
saving state, so the Python code is relatively straighforward, and is
all neatly contained in Python modules, not scattered about in the HTML
templates. This also allows a unittest suite to be written to direcctly
exercise all of the application logic without having to sit and click on
Web pages ad nauseum. The line count for the application is only about
500 lines. The way in which Albatross strongly encourages the separation
of Python code and the HTML templates also means I can give the HTML
templates which define the "presentation layer" to someone with a better
developed aesthetic faculty than I for prettification, without fear that
they will come back with all the code mangled, because all the code is
elsewhere. I should also mention that one of the app's pages allows the
user to browse trees of ICD-8, ICD-9 and ICD-10 cause-of-death codes and
make selections. Each of these code sets contains between 5000 and 10000
elements (nodes on the tree, each with a code and a description).
Albatross successfully manages the display of these trees through its
<al-tree> tag and associated classes - in folded form first, showing
only the top levels of the ICD code hierarchies - the user can then
drill down to find the codes they require and select them.

The app is still in pre-production form, but it works perfectly and the
performance is excellent - I haven't needed to think about mod_python
but that is also an option with Albatross if you need more performance.
I encountered one bug in the Albatross code but the Object Craft guys
(there are three of them, two in Melbourne, one in Sydney) issued a fix
within 12 hours.

I believe that Object Craft plan to host some live demos of Albatross
apps on their Web server in the not too distant future, as well as
provide some more sample apps as starting points for would-be Albatross
developers.

Tim C




More information about the Python-list mailing list