GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Python Wiki
  • PSF Wiki
  • Jython Wiki
  • Python Wiki
  • Language Reference

This view

  • Original page
  • New address

GeezerVison is showing wiki.python.org — Data Representation

View as Markdown

Data Representation¶

Legacy Wiki Page

This page was migrated from the old MoinMoin-based wiki. Information may be outdated or no longer applicable. For current documentation, see python.org.

Data on the web¶

There are several approaches to represent data using Python on a web page (see WebProgramming).

  • PythonInWebPage

  • StructureAnnotation

  • Programmatic

Another interesting article about this is “Choosing a Templating System”.

Syntax¶

Different approaches lead to different design decisions. Often it is the principal reason that new template systems get invented:

  • ElementBasedSyntax

  • CommentBasedSyntax

  • AttributeBasedSyntax

Examples¶

Some presentation systems fall neatly into the categories above. Others are less easy to classify but have a closer association to one category than the others.

PythonInWebPage¶

  • Castalian

  • Cheetah

  • PSP (from Webware)

  • Spyce

StructureAnnotation¶

  • ClearSilver

  • DOMTemplate (from TwistedMatrix)

  • DTML (Document Template Markup Language - see Zope)

  • Woven (from TwistedMatrix)

  • wt (see JonsPythonModules)

  • ZPT (Zope Page Templates - see Zope)

Hybrids¶

  • CHTL and CGTL (from CherryPy) - PythonInWebPage and StructureAnnotation

  • PyMeld - StructureAnnotation and Programmatic

  • STML (from SkunkWeb) - PythonInWebPage, StructureAnnotation, and Programmatic being all equally apt (or equally inadequate)

Programmatic¶

  • PTL (from Quixote)

Notes¶

Feel free to add more abstract descriptions and more examples to help people decide what they are looking for!

Do you need to use full-fledged python, embedded bits of definitions but no functions – there is a range of options depending on your problem. Sometimes there’s no python in “the output page” – as in raw documents put thru a filter. Or there may be limited amounts of embedded python – as in YAPTU and other filters. Or python may be the matrix language, with text embedded within it. Your handler code can be anything from a substituter (using, say, regular expressions to catch things to be altered) to a mini python engine. See ‘Python Journal 3(1)’ a feature article that draws together several of the options above into a series on the pure-text to pure-python “dimension”. See what your options are.

Previous
Config Parser Shootout
Next
Decorators
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.