Forum OpenACS Development: Response to Current short-term happenings...

Collapse
Posted by Kapil Thangavelu on
in addition i making another release of the acs-sql-extractor later
this week (probably wednesday) this is the first release ready for
mass usage/testing. its been tested on python 1.5.2 /2.0 on linux
and windows:) with the aD acs4 packages from cvs and on the openacs
cvs. it seems to perform perfectly afaics. at this point i'm just
cleaning up the code/documenting and i've started working on
transformation of the original tcl source to use the query
dispatcher calls. i'm not sure on the exact syntax of what this
transformation should be, right now i'm working with the assumption
that something like

db_0or1row foo_select "select object_id from site_nodes where
node_id=:node_id"

gets transformed into
db_0or1row foo_select [db_fullquery_get_text [db_fullquery_fetch
"xxx.yyy.foo_select"]]

does this look right?

feedback on the extractor is welcome.

for those who don't know what the extractor is... its a software
thingy that eases the developer burden of conforming to requirements
of the query dispatcher by extracting the queries from .tcl files
and converting them to the xml format files that the query
dispatcher expects. it will also transform your original db calls
into the appropiate query dispatcher calls.

a couple of other ideas on various utilities to toss into the mix
have occured to me.

  - package .info metadata compiled into sets of html pages with
packages, sorted by num of files, version, dependencies, etc. should
be useful initially for people to pick a port to work on.

  - the transformer can just as easily replace query dispatch calls
with a db specific query, such that you can by pass the dispatcher
if you need the extra speed. this should be roundtrip so you can
make the package available again in a db-neutral manner.

  - i was looking at the code for the query dispatcher in cvs, and
realized its using ns_xml which is based on the dated and somewhat
buggy libxml (hence libxml2), not to mention that ns_xml is probably
not going to be maintained. it should be trivial to convert the
query xml files into a format the query dispatcher could convert
into tcl data structs with some simple regexs.

  - generate html of the queries on a per package basis, to be
included with
the package html. allows a developer to quickly view the sql in a
web browser.... perhaps of dubious utility...

i'm trying to make this system into a suite of openacs developer
tools so if people have other ideas, i'm all ears... umm.. eyes:).

i'm planning on making releases of this package on at least a
biweekly  basis for probably the next two months. release early,
release often... the internal interfaces aren't completely stable in
this release, but they will be soon once i finish the xml parsing
jaunx.