Forum OpenACS Q&A: Response to A Template-Based ACS

Collapse
Posted by Titus Brown on
I have to throw my own oar in here ;).
<p>
It's clear that Tcl is not just the plumbing, as you say (Ben).  I'm a little bit dismayed at the Oracle-centric aD stuff, and I have to wonder if aD is coming clean with us.  Just what sort of business deals are aD and Oracle cooking up between them??
I'm beginning to not trust aD people's responses on the Web/db forum...
<p>
FWIW, it's become even more clear to me that Tcl is important as I've worked on the Python module.  There's a large user base out there for ACS/Tcl -- not least of them being me -- and it's important to keep them mentally comfortable.  Frankly, SQL is SQL, and soon PgSQL will be as good as Oracle SQL or better; and the transition from Tcl to Python (well, C to Tcl - Python's pretty easy) was much more painful than the transition from Oracle SQL to PgSQL.  So, switching away from Tcl would probably deeply disturb aD/ACS using people far more than switching to PG would.
<p>
Some offline discussion with Brent leads me to believe that a templating system could become part of the PyWX project (or perhaps a spinoff, once we get the Tcl linkage up to par).  Part of the requirement for templating IMO is extensibility of the underlying system, and Python is MUCH better at that than Tcl.  (Not to mention, integrating Tcl code into Python is easy; vice versa is not.)
<p>
Does anyone have any references to object-oriented templating systems?  OR is this a ludicrous idea?  I haven't thought deeply about it, beyond having skimmed a fair bit of text on the aD templating system and others; but it seems like using an OO framework to organize a hierarchy of SQL/Tcl/HTML/whatever statements, and provide a standard interface by which the HTML section could e.g. access the SQL output,
could work out well.
<p>
Just to continue rambling, you could imagine defining a page with
a "loop" section in it: the "loop" section would have a "loopdata" construct that would be an SQL statement, and a "loopprint" construct that would be HTML wrapped around variables, and a "looptranslate" construct in which the Tcl people could define a set of functions for producing various modifications of the data that SQL didn't provide.
<p>
Or am I being silly and uneducated here?
<p>
--titus