Forum OpenACS Development: Response to Query Dispatcher initial specs posted

Collapse
Posted by Ryan Campbell on
I think you shouldn't force people to create a SQL file for each tcl/adp file.  Just let them specify where a query is, like an include file.  You might recommend a convention, but you shouldn't dictate one.

Some modules might choose to put all their queries in one monolithic SQL file, while others might choose to break them up based on the type of query. The ecommerce module in 3.x does this with TCL libraries and I think it makes it much easier to see all the logic associated with one area of the application at once.  Perhaps this is not always the case, but you need to give people the flexibility so they can decide what's best for a particular situation.

You could still use the naming scheme to determine which exact SQL file to read from.

Also, I think the package_name.section_name.chunk_name.query_name is a bit verbose.  How about just package_name.query_name?  Shouldn't I be able to reuse a query in different places throughout a module?  Your naming scheme seems to prohibit this.