Forum OpenACS Development: Re: Making use of the content repository easier - building a Tcl API

Yes, I would like to look into integrating both normal objects and CR objects with autoform generation.  And of course you and Dave should continue to whack away at CR Tcl API stuff.

Thus far in the extremely minimal work I've done I've been mirrring the CR's structure, i.e. along with content_type::create I've added Tcl surrogate calls to the SQL create_type package functions content_type::create_type and content_type::create_attribute.

I think it would be a good idea to mirror the Tcl API namespace and proc names in this manner because we already have a bunch of code using the CR SQL defs directly that may never get re-written.  Using the same naming scheme should make it easier for programmers to switch back-and-forth from the low-level SQL calls to the higher-level Tcl API calls when working on different (older and newer, rewritten or not) packages.

Also ... I wrote my sample content_type::create proc using package_exec_plsql (which I added to HEAD a few weeks ago), which avoids the need for explicit SQL calls.  We should do this in the CR Tcl API for those functions which create things (SELECTs should be inline for efficiency reasons).  This really simplifies things ...