[Zope-dev] SkinScript Questions
Steve Alexander
steve@cat-box.net
Mon, 02 Apr 2001 16:19:31 +0100
Michael R. Bernstein wrote:
> Hi all,
>
> I had some questions about SkinScripts:
>
> 1) Are there any naming conventions for SkinScripts?
I have used the names "attributes" "domain_catalog" and "site_index"
quite often.
I use "attributes" for computed attrubutes, "domain_catalog" to trigger
cataloging in a ZCatalog within the Specialist, and "site_index" for
cataloging in an acquired ZCatalog common to the entire application.
I typically use the SiteIndex for text searches across many types of
content.
I also often call a Class Extender "instance_methods".
On other applications, I've split the SkinScript according to whether it
provides attributes for the object computed from its own real
attributes, or whether it provides attributes and triggers that link the
object to other objects and take care of referential integrity.
> 2) Is there any reason (other than factoring) to split
> SkinScripts up, or is putting all your declarations in one
> SkinScript ok?
Each SkinScript statement gets compiled into a separate
provider/trigger/agent/whatever, so it doesn't make any difference to
how fast the SkinScript executes.
You do need to split your SkinScript up according to what proxy roles
they need.
There's another related issue of what attributes to compute in a single
SkinScript statement, but that's pretty much covered in the
documentation. I looked into this quite deeply when I found I needed the
"INVALIDATE FOR" syntax.
--
Steve Alexander
Software Engineer
Cat-Box limited