On 9/25/07, Sam Hough <[EMAIL PROTECTED]> wrote: > > I see that it is not such an obvious win here as with fat client but how > about another of my use cases: > * Large page with small parts being updated by Ajax > * Two components sitting long way apart in the tree (context sensitive > button that responds to items in rest of the page) > > So having an almost declaritive style "this button is enabled = fn(x)" only > works if I know when to re-render that button. > > I seem to be leaving OO behind by having lots of procedural "when x happens > update a, b and c" rather than a subscribing to events from another > component. > > Using some sort of event model seems to me to improve OO -> encapsulation -> > reuse. For large trees of components with only tiny parts that need sending > to the client it also seems more efficient.
Yeah, if most of what you're doing is Ajax, you need to find a way to know which components should be updated and my remarks are less relevant. Still, I think most of it should be communicated via models. It shouldn't be hard to let your model(object)s implement an observer pattern and use that to your advantage. Eelco --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
