Forum OpenACS Development: reloading xql files in the www directory tree

To separate package customizations from release versions, I like to place the custom code in the ${serverroot}/www directory tree.

For example, if the photo-album package is mounted at /fotos3 and /fotos4, I can modify some aspects of /fotos4 by:

Copying files from ${serverroot}/packages/photo-album/www to ${serverroot}/www/fotos4/

and modifying them. However, xql files in the www directory appear to get loaded only the first time referenced. Changes to them require a server restart.

Since there is some development activity inspired from ROR etc. to make xql files work in the same manner as .adp/.tcl file pairs, can we expect the xql files to behave more like .adp/.tcl files (ie. not requiring a server restart) sometime soon?

Collapse
Posted by Jade Rubick on
You really should check into Arch. It makes it easy to track current development and still make local customizations.

Rubick.com is down right now (I'm moving servers), but when I get it back up, please look at http://www.rubick.com/openacs/arch

Collapse
Posted by Torben Brosten on
Thanks, Jade. I plan to learn arch at some point soon. However, I do not see a revision control system affecting an openacs instance to reload xql files in the www directory tree (like "watch files" does from the package manager /acs-admin/apm/).

I'm posting a suggestion to bugtrackers' acs-admin package, though maybe there is a better place for it.

Collapse
Posted by Alexandre Simard on
Any news on this front? I couldn't find your bug in the bugtracker. Have you found a workaround? At this time, I am thinking I should simply not use xql files while developping. Any better ideas?
Collapse
Posted by Dave Bauer on
For the most part all your XQL files should be contained in a package and mounted in the site-map.
Collapse
Posted by Torben Brosten on
Yeah, you can skip using the xql files when placing code in the www directory tree (by placing the sql directly in the statements), since the code is uniquely deployed ..ie not expected to be used anywhere else or on any other platform.
Collapse
Posted by Ryan Gallimore on
I could be wrong, but aren't xql files the only sql situation where you can use literal variables, ie, a variable where clause?

select event_id
from   events
$where_clause

I had no success getting this to work in db_* functions in my tcl files.

You can also use literal variables in the tcl files if you use quotes ("") instead of curly brackets ({}) in your query.
Thanks, Jose!