Forum OpenACS Improvement Proposals (TIPs): TIP#36 (Rejected: please Clarify/resubmit): Design patterns for reusable includes

Assuming there is concensus that packages should provide reusable include chunks in <package-key>/lib directories. Its probably a good idea to have some coding guidelines which are specifically about writing them.

I'm assuming that, if approved, this TIP would result in a document containing quite a few distinct ideas, and that each idea would be considered and approved independently.

These are the ideas I have to start with:

For flexibility, an include whose main purpose is to display a single acs-object should expect an array containing the row data of that object - as opposed to accepting an id and looking up the data itself.

As well as provinding a default adp each include should accept an alt_template parameter and then ad_return_template $alt_template at the bottom.

If ds_include is set to 1 the include should template::set_file instead of ad_return_template.

I think this is not so much a formal TIP as a call for discussion so I think it should be discussed in OpenACS Development first and then writen up in the documentation (and if there is anything controversial we could have a tip to resolve that).

One thing I would like to see us address is the difficulty we encounter whenever something is portalized, that we have to add a package_url prefix to all the links in the lib/ .adp files.

As Jeff said this needs discussion instead of a TIP, or even just a bit of practical examples. For more complex UI reuses see also this strategy:
Vetoed, since this needs public discussion and is not a concrete thing that can be decided on. A TIP could later be opened to decide on wether a document with the proposed practices that emerged from the discussion should be adopted.
This is not a TIP.

Once we have a document, which describes in detail the distinct ideas, we can have a TIP to decide whether to accept the document as a whole or parts of it as a standard (coding guidelines) in OpenACS.