About | Code | Design | Microformats

PyYUI

PyYUI is a Python wrapper of the Yahoo YUI library. The intention of the project is to provide a Python object representing all YUI objects, such that you can write only Python to generate rich, AJAX web applications.


About | Code | Design | Microformats

Code

PyYUI is hosted on SourceForge. You can browse its code base via CVS. If you would like to contribute, get in touch!


About | Code | Design | Microformats

Design

PyYUI uses Cheetah templates to write the javascript code (fast!). A minimal object will inherit from YUIObject.py, add any dependencies to self["dependencies"] and then over ride self["template"] with the template required to put the javascript object on the page. There are two special objects, the YUIRegistry and the YUIRoot that are described below.


YUIRegistry

The YUIRegistry is a factory to return the PyYUI objects, records the PyYUI classes that are in use and loads the appropriate js files (either directly or from a "controller").

The registry is a dictionary for PyYUI:YUI lookup and a set of classes in use. It also defines the namespace of the objects is provides and tracks.

YUIRoot

YUIRoot is an object representing the <script/> containing the YUI code. It should probably be merged with the YUI Registry.


About | Code | Design | Microformats

Microformats

Microformats are litte bits of well structured html that can be parsed to create calendars, vCards etc (their home page explains it far better than me). I've started writing something to produce these from Python, and as it's using the same kind of design as PyYUI I thought I'd include it here, too. The current code is far from complete. If you would like to contribute, get in touch!


Del.icio.us Digg reddit

+441179288714
aim: simonmetson1234
Bristol : Data Manager PhEDEx Contact Research Associate