[Seaside] render methods vs non-render methods in components -
convention?
Lukas Renggli
renggli at gmail.com
Mon Mar 31 16:27:45 UTC 2008
> I'm wondering if there's a convention for me to know whether I'm in a render
> method (or something called from that) or not. Do the experienced seasiders
> follow the convention that all render methods look like:
>
> renderFooOn: html
Exactly, and put it into a category called #rendering.
> But what about the other methods? How would you know if another method
> is being called from a render method or from a callback, or maybe both?
Exactly the same pattern, call it #render([A-Z][a-z]+)*On: and put it
into a category called #rendering.
> In other words, is there a convention for me to know if I can call:
>
> aValue ifNil: [aValue := self request: 'How many times?'].
>
> safely in a given method of a component?
You give it an intention revealing name ;-)
> Should I put all callback support into a separate protocol category?
I mostly put these into a category called #actions.
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch
More information about the seaside
mailing list