[Seaside] rebuild children - when to do it

Julian Fitzell julian at fitzell.ca
Thu Jul 17 00:06:31 UTC 2008


I don't disagree that the rule "do not change state" in the render
phase is a good one.

My point is simply that many people assume they need a component for
everything when in fact they don't. If you have a class doing
rendering that doesn't have state, then it doesn't need to be a
component and doesn't need to be persisted. If it doesn't need to be
persisted then you *aren't* modifying state in the render phase.

That said, however, I'm looking at the code in 2.9 and 2.8 and while I
swear you *used* to be able to easily subclass WAPresenter, it seems
like it may be a little more awkward now. I still think we should be
doing a better job of pointing out that you can implement any class
with a #renderOn: method and thus reuse rendering code but I think
you're right that we need that properly documented with examples and
it may just be confusing now.

So you're right: Probably best to stick to the simple answer for now...

Julian

On Thu, Jul 17, 2008 at 7:47 AM, Ramon Leon <ramon.leon at allresnet.com> wrote:
>>
>> It's not the normal pattern.
>>
>
> Which is why I'd still recommend against it.  It's hard enough stopping new
> people from making this mistake as is, without mixing the message with
> exceptions.  If someone has to ask, then they should be told "do not change
> state during the render phase".  This is even a rule in the code critic.
>
> Once they understand why, they won't need to ask when they can violate that
> rule because they'll understand the reason for the rule.
>
> Ramon Leon
> http://onsmalltalk.com
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list