Albatross - a Toolkit for Stateful Web Applications
Albatross is a small and flexible Python toolkit for developing highly stateful web applications. The toolkit has been designed to take a lot of the pain out of constructing intranet applications although you can also use Albatross for deploying publicly accessed web applications.
In slightly less than 2600 lines of Python (according to pycount), you get the following:
- An extensible HTML templating system similar to DTML that promotes
separation of presentation and implementation for improved program
maintainability. The templating system includes tags for:
- Conditional processing,
- Macro definition and expansion,
- Sequence iteration and pagination,
- Tree browsing,
- Lookup tables to translate Python values to arbitrary template text.
- The ability to place Python code for each page in a dynamically loaded module, or to place each page in it's own class in a single mainline.
- Optional sessions, which can be either:
- Browser based sessions via automatically generated hidden form fields (cryptographically signed to ensure integrity),
- Server-side sessions via a supplied TCP session server,
- Server-side file based session store.
- Applications that can be deployed as either CGI programs or as mod_python module with minor changes to program mainline. Custom deployment can be achieved by developing your own Request class.
- Over 120 pages of documentation including many installable samples.
A primary design goal of Albatross is that it be small and easy to use and extend. The toolkit application functionality is defined by a collection of fine grained mixin classes. Eight different application types and four different execution contexts are prepackaged, allowing you to define your own drop in replacements for any of the mixins to alter any aspect of the toolkit semantics.
Object Craft developed Albatross because there was nothing available with the same capabilities which they could use for consulting work. For this reason the toolkit is important to Object Craft and so is actively maintained and developed.
Albatross is licensed under a liberal BSD open-source license. The license from Albatross 1.00 reads:
Copyright (C) 2002, Object Craft P/L, Melbourne, Australia. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Object Craft nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.