On Friday, August 5, 2011 1:06:14 PM UTC+2, Jens wrote: > > Yes you have to use chaining or you introduce a new service method that > does all the work in just one server request. If you have code flows like > finding an ID_b for a given ID_a and then immediately use ID_b to fetch the > final object you could create a specialized method that takes ID_a and > directly fetches and returns the final object. Finding ID_b would then only > happen on server side. > I prefer the last option as I want to reduce server requests as much as > possible. >
Plausible. > > If you have to chain then you should call good named methods in your > callbacks onSuccess methods to start the next server request. I think this > will increase readability at least a bit. > Might increase it but I'm afraid chaining produces badly readable code by its nature. Working with methods which are independent from each other would simplify many things. OTOH you can do everything server-side which encourages to write very performant code. Thx for the enlightenment! Alex -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/d7Ne54vPEaAJ. 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.
