Forum OpenACS Development: Re: Custom Code: New development solution

Collapse
Posted by Malte Sussdorff on
Usually all callbacks should be stored in the ${package_key}-callback-procs.tcl file. I found one situation where I think it might make sense to deviate from that rule:
In contacts we have a "contacts::populate" namespace, which contains optional procedures that can be run once after installation (manually using the OpenACS shell) to create a custom environment (e.g. contacts::populate::crm will setup our vision of a bare CRM system's attributes). Other setups could be stored in these procedures as well (grand vision: provide an interface to show all ::populate::* functions in the various packages keys so a user can click his initial setup together this way instead of relying on the install.xml).

Anyway, this brought me off my topic. So we have this procedure(s) which might be only called once, if at all. But they can have a lot of callbacks (e.g. for the CRM system every combination of person/organization with groups might be a good idea, so other packages could add package specific custom attributes). I would prefer not to clutter the callback-procs.tcl file with the definitions, so for contacts::populate::* callbacks I stored them in the contacts-populate-procs.tcl file and made them private.

Will this be too confusing for developers? What do others think?

As people have been asking me about the workshop, I'm currently planning to do it on a sunday in July, but I'm not sure if people would prefer a working day instead. To accomodate West Coast people the workshop will start at around 4pm GMT (9am PT, 6pm Hamburg time). Once I'm sure about possible dates, I will create an "election" so interested community members could vote on the date.