trancemar schrieb:
> public void onSuccess(Object o ) {
> if(eventId == MyEvents.SEARCHBUTTON ) {
> // todo
> } else if ( .. ) {
> // todo
> }
>
> }
The application I'm currently working on has a count of 187 AsyncCall-
back-classes being used as callback of RPC-functions[1]. So alone the if-
elsif-cascade would take nearly 400 lines inside the onSuccess-method
(and the onFailure-method as well, because I print localized
error-messages as well).
> What do you think it will increase some kind performance ?
Check it out. Write a GUI, that does repeated calls using callbacks
the regular way and your way and compare the result. But I doubt
that there will be significant differences, especially because we're
talking about something that involves a complete HTTP-request-
response-roundtrip that should way more time than the simple
creation of an instance of a class (assuming that this still happens
inside the Javascript-code being generated by the GWT-compiler).
Regards, Lothar
[1] I used a
find -name '*.java' -print0 | xargs -0 grep -c "new AsyncCall"
to find out.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---