In general I think it is better to try to avoid this situation if
possible - and often it is if you think about it for a bit - because
a) the less RPC round trips you make the better, and b) the less
callbacks you have in your client code the simpler it is. In general
two good question to ask are:

1. Can the various logic branches be resolved automatically in the
happy days use case on the server as a result of one call? Often they
can if you look at things in a different way. If so you can then think
about how to deal with edge cases.
2. How much of the server state would the client really need to know
to successfully control the logic branches?  Often less than you'd
think at first.

For example, it may be that in your app the first selections the user
makes in this work flow are sufficient to generate a graph of
permissible branches and/or additional required data values on the
server from a single initial RPC call. In effect, create a simple
model for your work flow process on the server and transfer it to the
client up front. Thereafter the client could handle the UI dialog by
itself until completed (with no horrible async callback interruptions
and chains in the code) and then send the transaction details in one
final RPC call.

Of course this may not in the end be possible in your application, but
it's worth looking into as it will increase performance and decrease
complexity, as I think you have realized from your OP

regards
gregor.

On Mar 5, 6:12 am, hazy1 <[email protected]> wrote:
> Making an async call appear to be sequential is easy, just block or
> fade out or have a pop up progress bar until the async operation
> completes.
>
> On Mar 4, 10:15 pm, rlaferla <[email protected]> wrote:
>
> > How is everyone managing to implement sequential workflows when GWT
> > only allows async calls?
>
> > I have a series of panels that user must respond to in sequence and
> > their answers may lead to a different path of panels (warnings, error
> > panels, etc..)  I think every GWT programmer working on a large
> > project must have run into this.   I'm interested in what strategies/
> > techniques/code you used to help keep the complexity down.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to