[kforge-dev] random q re python templating systems

Jo Walsh jo at frot.org
Mon Sep 19 20:31:28 UTC 2005

On Mon, Sep 19, 2005 at 08:27:12PM +0100, Nick Stenning wrote:
> Clearsilver also has a pretty friendly data format (HDF) that's pretty
> easy/foolproof to write in. Of course, that presupposes you've already
> got templates out of the way =)

yes. I'm doing this because i'm being forced to; i wrote this for an
arts oriented project, and these people are used to needing a lot of
presentation control. they tend to know HTML, and occasionally 
'a bit of php'. I showed people the ontomatic, the version which has
the whole description of the presentation logic in the RDF store, and
got lots of 'how do i really control it' and 'why do i need this
seeming complication' reactions.

My current plan, failing better ones is to provide a script or maybe a
web service interface which builds a template set (which you supply
with generator templates) from an RDF schema, that provides the basic
interface for each Class, and build prototypes of modules that are handlers for URIs. 

You supply it with an RDF schema or it helps you build an RDF schema 
from scratch, describing classes and properties in your domain model, 
finding then from in the world definitions, at rdf namespaces or from
other installations of nodel.

I *know* the fully generic, recursive approach is *really tempting*.
But i want to get people engaged at a level of detail they understand. 
If i say, here is a familiar looking HTML template, and here are some
objects you can look at through it, with familiar looking properties
and functions, they will be able to engage more deeply with the data
afterwards, look at it in more raw and idiomatic ways.

The templated representation thing is something i wish i could do
another way. But this really seems the simplest one: interface
designers get something they can properly control; update and
persistence is handled using the schema.

> In all honesty, my personal choice of templating language for a
> self-contained project that didn't really need to be language neutral
> would be something like Cheetah for Python or Erb/Eruby for Ruby.
> Something that requires a little bit of self-restraint when writing
> templates but that has a good deal of power behind it.

I still *do* like cheetah, and i see they are coming up for 1.0 at
some point, and it is in debian, and so on.
I'll persist in tracking down this bug, which is in every
version since .9.15 and either sending them a patch or giving myself a slap.



More information about the kforge-dev mailing list