If I have a user with multiple pages open on some shared objects (or
multiple users needing to see each others' updates), and I want to keep those pages updated on shared object changes: - Is Comet the best choice? other options? - Is Asteroid the starting point? other options? - Is it very complex to use? - Is it integrated with Seaside+SU? If not, how hard might that integration be? If I can limit to single-user/multi-page, am I better off building a richer single page (panels, tabs etc.), rather than trying to manage multiple pages that need to be sync'ed? Many Thanks - Sophie _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> If I have a user with multiple pages open on some shared objects (or
> multiple users needing to see each others' updates), and I want to keep > those pages updated on shared object changes: > > - Is Comet the best choice? other options? It is as far as I know the only choice for Seaside. > - Is Asteroid the starting point? other options? This is not Seaside based. > - Is it very complex to use? Not really, I think. The examples are rather simple. > - Is it integrated with Seaside+SU? If not, how hard might that integration > be? It is based on Scriptaculous, but it doesn't really depend on it. Right now it uses PrototypeJS, but I guess this dependency could be removed if necessary. > If I can limit to single-user/multi-page, am I better off building a richer > single page (panels, tabs etc.), rather than trying to manage multiple pages > that need to be sync'ed? I don't quite get your question. It is certainly easier for you and your server to just sync from time to time, e.g. using a periodical update ever couple of seconds. If you need instant updates (e.g. for a chat room) then Comet is your choice. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
"Lukas Renggli" <[hidden email]> wrote in message
>> - Is Asteroid the starting point? other options? > This is not Seaside based. Ah. My search for "Comet" on squeaksource only yields Asteroid. I now found the one you mean under Seaside. Perhaps the search on squeaksource should also search nested packages inside a top-level project like Seaside? >> - Is it very complex to use? > > Not really, I think. The examples are rather simple. I browsed the Chat example. Wow. Where do I get the "Streaming-server required", or is this an Apache-only setup? (Perhaps #renderChatPusherOn may be better called #renderChatPushListener?) >> If I can limit to single-user/multi-page, am I better off building a >> richer >> single page (panels, tabs etc.), rather than trying to manage multiple >> pages >> that need to be sync'ed? > > I don't quite get your question. Here are 3 scenarios; pardon me if too elementary: Scenario I: 1 user, 1 page: Ajax can keep it completely current. If some operations require updates to many components in that one page, either (a) collect those updates using model announcements on server that are grouped into the single client-triggered SU refresh; or (b) do client-triggered full page replace. Scenario II: 1 user, many pages: Ajax will not keep them current. Options: (c) Manage multiple 'virtual' pages on a single html page, by embedding into that page multiple tabs, multiple panels, etc. one each for what would have been a separate page. Remain entirely Ajax at that page level. (d) Server push with Comet (Comet is not multi-user specific, imo). (e) (Your suggestion): periodical refresh. Scenario III: Multiple users: just like the above, except (a) is not an option; and (e) probably not a good option if a collaborative app. Would your default recommendations be (b) and (e)? Would you recommend doing or avoiding (a), and correspondingly (c)? You had suggested something before, and I was trying to work through the detailed Hows. If you did it, would you do something like the following: WAComponent subclass: #PagePart PagePart class>>on: aModel ^self new model: aModel PagePart>>model: aModel aModel on: ModelChangeAnnouncement do: [:ann | self markDirty]. PagePart>>renderAnchorOn: html html anchor onClick: (html evaluator callback: [:s | model doClick. self refreshAllMarkedDirtyOn: s]); with: 'click' PagePart>>refreshAllMarkedDirtyOn: script self allDirtyDo: [:dirtyPart | dirtyPart updateYourself. script element id: dirtyPart id; update: dirtyPart] Where would you record the #markDirty list for #allDirtyDo? Just walk the component tree via #children from the Page? I keep wanting a Page object, but don't know how to get access to it from a descendant PagePart. I am likely missing a better way. Sincerest Thanks - Sophie _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Ah. My search for "Comet" on squeaksource only yields Asteroid. I now found
> the one you mean under Seaside. Perhaps the search on squeaksource should > also search nested packages inside a top-level project like Seaside? Also search the mailing-list for references. > >> - Is it very complex to use? > > > > Not really, I think. The examples are rather simple. > > I browsed the Chat example. Wow. Where do I get the "Streaming-server > required", or is this an Apache-only setup? Well, that's the drawback. You need to use WAListener, which has shown to be slightly buggy in Seaside 2.8 (fixed in 2.9). Moreover due to the nature of streaming, Comet doesn't work behind Apache (or any other proxy I know of). > Would your default recommendations be (b) and (e)? It is all a bit abstract. All your suggestens make sense in one way or the other. Some are more difficult to get right than others, so I would pick an easy one (e.g. the tabs) over something more complicated. > WAComponent subclass: #PagePart > > PagePart class>>on: aModel > ^self new model: aModel > PagePart>>model: aModel > aModel on: ModelChangeAnnouncement > do: [:ann | self markDirty]. > PagePart>>renderAnchorOn: html > html anchor > onClick: (html evaluator callback: [:s | > model doClick. > self refreshAllMarkedDirtyOn: s]); > with: 'click' > PagePart>>refreshAllMarkedDirtyOn: script > self allDirtyDo: [:dirtyPart | > dirtyPart updateYourself. > script element id: dirtyPart id; update: dirtyPart] > > Where would you record the #markDirty list for #allDirtyDo? Just walk the > component tree via #children from the Page? Yeah, that seems to be reasonable. This should also avoid unnecessary updates in dirty children or dirty components. What I would do however, if possible in your application, is to do one single update of <body> </body>. Thats ways easier than what you are doing now and still feels like an AJAX app. > I keep wanting a Page object, > but don't know how to get access to it from a descendant PagePart. I am > likely missing a better way. You could store the root component in the session. This doesn't make your components easy to reuse though. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
"Lukas Renggli" <[hidden email]> wrote in message
> however, if possible in your application, is to do one single update > of <body> </body>. Thats ways easier than what you are doing now and > still feels like an AJAX app. Sounds good. How do I do this from a sub-component callback? Thanks - Sophie _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> > however, if possible in your application, is to do one single update
> > of <body> </body>. Thats ways easier than what you are doing now and > > still feels like an AJAX app. > > Sounds good. How do I do this from a sub-component callback? You can also use announcements, or then you directly call your root component (e.g. using a dynamic variable or a session variable) to re-render itself. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
"Lukas Renggli" <[hidden email]> wrote in message
> You can also use announcements, or then you directly call your root > component (e.g. using a dynamic variable or a session variable) to > re-render itself. I just got a simple version of this working, and it is *much* easier than the alternatives I was trying. Saved me a huge amount of work. Thank you so much! Sophie btw: Are SU tabs in the 2.8 release essentially the same as 2.9 (except for more css styling)? _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> btw: Are SU tabs in the 2.8 release essentially the same as 2.9 (except for
> more css styling)? Yes, the SUTabPanel is slightly adapted to work with the famous kalsey css tabs (class names). What I don't like about them is that they do not work, when the font is resized. I couldn't find anything better: http://www.kalsey.com/tools/csstabs/ Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |