Forum OpenACS Q&A: Re: New content repository documentation

Posted by Tom Jackson on

I think you loose too much with autogenerated tables, the sql for a table is really the best way to document the data model. The same thing happens with the plsql code: it is all autogenerated and never written down anywhere. But that is the requirement for having a dynamic typing system I guess.

I am working on some improvements to the query-writer package which generates the pl for the new/update/delete functions. The improvements include removing all pl, except that necessary to createupdate/delete the parent acs_object. Even this pl is wrapped in a tcl proc acs_object::new/update/delete.

Also there was a tedious process once the datamodel had been created to reenter all this information into the query-writer package. This has been replaced with a wizard which requires you to create the object which is related to the table for the data model, the wizard takes the table and traces the primary key back to the acs_objects table. There are no 16 param limits with this method.

Although the query-writer handles all the dml/pl dynamically, I think I will put in the code for writing out standard tcl procs similar to the acs_object procs. Then using the query-writer for a few minutes would allow the developer to get a set of functions they could use in their application independent of the query-writer.

Anyway my point here is if you are autogenerating code, why not make it tcl code!