Learn to Make Web Apps in Python!
quick overview
The workshop architecture is a collection of modules that can be used independently.
platonic components
The word platonic is used in the sense of a "platonic ideal": platonic apps are applications decoupled from any interface whatsoever. This means you can reuse components in different apps - even web services or GUI apps.
platonic was actually prototyped in a perl application done for one of those giant atlanta-based beverage companies back in 2004. In 2005, the python libraries were extracted as I refactored the old sixthday stuff in the cornerhost control panel ("cornerops") using the ideas from the perl project...
Therefore, cornerops is currently the only platonic web app written in python. Most of the paid work in this framework would be for cornerops / versionops (for versionhost) and duckbill (a billing system). However, these are all fairly huge projects and not open source (at least for now)...
So, in order to let people play around with the code, we need an open source app. There are several planned, but all of them will be based on a simple application called amoeba.
amoeba and trailblazer
The flagship program for this architecture is called amoeba. It is sort of a cross between a wiki and a relational database, and is based around an RDF model.
Basically amoeba is what ties platonic to the web. It's both a generic (but useful!) web app and a RESTful web service.
Amoeba is the proto-app: when you go to make a platonic web app, you should instantiate an amoeba, which you can then extend with your own features through the miracle of object composition. :)
You can watch an early video demo of amoeba (macromedia flash with sound) if you want to see what amoeba looks like.
Unfortunately, amoeba was written as a sixthday app (no unit tests) but will soon be rewritten as a platonic web app using a narrative programming tool called trailblazer.
What trailblazer does is allow you to see the program being built as you read, so that you aren't overwhelmed with trying to understand a complete design, but rather can see it evolve step by step.
The earlier tutorials below also use a narrative style, but were written before trailblazer, and so aren't actual running programs.
browse the code
The pydoc pages were generated 0913.2005 from the latest version of the modules
cvs browser is here. a lot of that stuff isn't web-related, though, so here's the short list:
- platonic (new framework)
- sixthday (old framework)
- weblib (simple request/response stuff)
- strongbox (data objects)
- storage (tabular storage)
- arlo (O-R mapping)
- zebra (templates)
- handy (misc utilities)
- pytypes (old Date, FixedPoint, etc classes)
- ransacker (search engine)
- rantelope
See setting up shop for how to check out the code
basic lessons
Sep 13, 2005: these lessons were written in May of 2002. Except for the last one, these describe very basic stuff that hasn't changed.
- "Hello, %s!" - simple weblib usage
- The Spec - cornerhost control panel overview
- Data objects - basic python class usage
- Strongbox - more on the control panel, plus how we really do data objects
- App and WikiApp (old school)
this talks about an older web framework called
sixthday, which has been discarded in favor of the more flexible and testableplatonic.
project: rantelope
Sep 13, 2005: rantelope is a content management system. In the simplest case, it works as a blogging tool like movable type or wordpress. These lessons were written in September 2002 in a one week sprint when the blogging features were created, and describe the old sixthday approach. As such, they are out of date and need to be reworked.
- Channels, Stories, and Raw RSS
- RSS-to-HTML with XSLT Templates
- Yahoo!-style Hierarchies
- The Ransacker Search Engine
- Comment system and next steps
other docs
These were pages from an old wiki that used to be here. They're mostly up to date as of september 2005
- basic intro to python
- coding standards
- setting things up for using the framework
- strongbox documentation
- where-clauses in storage/arlo
- weblib - low level request/response/session library
historical
- sixthday was how apps were
structured before
platonic. Sixthday was fun but it was hard to write tests for sixthday apps. Platonic solved the testing problem, so sixthday went out the door. However, many of the notes in this document still apply to platonic. - strongbox idea - this was an early attempt to gather my ideas for what would become strongbox
- zdc was an early data object
concept. the downside was that each instance was tied to a
database, so you couldn't even run the tests without connecting
to MySQL. zdc was replaced by
strongbox,arlo, andstorage.
the app list
Several apps have been written with this framework:
These three are the most advanced, and in constant use:
- the cornerhost control panel
- the versionhost control panel
- duckbill, the billing system used at cornerhost/versionhost
These haven't been worked out completely
- amoeba - sort of like a wiki crossed with a database
- rantelope - the content management system mentioned above
- planaconda - a project management tool
- buggernaut - a bug tracking system
- solomon - a knowledge base / customer support system
- zikeshop - this was a shopping cart system. currently suffering bit rot
- linkwatcher - a website that monitors other sites for changes (some of this is still old php stuff)
- letsbank - an alternative currency banking system for communities