Re: [Zope-dev] SkinScript Questions

2001-04-02 Thread Steve Alexander

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


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] SkinScript Questions

2001-04-02 Thread Phillip J. Eby

At 10:59 PM 4/1/01 -0700, Michael R. Bernstein wrote:

1) Are there any naming conventions for SkinScripts?

Not that I'm aware of.  I think Ty names all of his methods "SkinScript",
but then, he tends to name all his working/temporary files "x", so what
does he know?  ;)


2) Is there any reason (other than factoring) to split
SkinScripts up, or is putting all your declarations in one
SkinScript ok?

The compiler creates a seperate attribute provider or agent for each
declaration anyway, so there's no reason not to put them all in one if you
don't need to interleave non-SkinScript providers/agents into the priority
order.



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] SkinScript Questions

2001-04-01 Thread Michael R. Bernstein

Hi all,

I had some questions about SkinScripts:

1) Are there any naming conventions for SkinScripts?

2) Is there any reason (other than factoring) to split
SkinScripts up, or is putting all your declarations in one
SkinScript ok?

Thanks,

Michael Bernstein.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )