Hi,

No, I am not using an abstract class, I just defined a one method interface
(or you could reuse something in Guava or Java) and I am using a decorator
approach to add error handling or modality in case we want to block the UI
when an RPC call is happening. So you basically start with

interface Callback<T> {
  void execute( T value );
}

and when we perform an rpc, we just decorate

service.doSomething( "david", modal( new Callback<String>() {
  void execute( T value ) {

}));

Where modal is a static import that shows a glasspanel and animation to
keep de user happy. It wraps the Callback into an AsyncCallback with our
default error handler, but you can also use a second form of the modal
function where you use 2 Callbacks one for success and one for failure.

This will easily map to Java 8 lambdas (Most of the time all we want to do
in the callback.execute is to forward to a method of the class, so I could
just pass the method reference instead of needing to create a Callback
everytime).

David

On Fri, Oct 25, 2013 at 5:59 PM, Andy <[email protected]> wrote:

> Thanks for your input. It sounds like we're in the identical situation.
>
> Regarding onFailure, do you use an abstract implementation of
> AsyncCallback, like I mention in this post?
>
> http://stackoverflow.com/a/4725052/497700
>
> -Andy
>
> On Friday, October 25, 2013 11:47:43 AM UTC-4, stuckagain wrote:
>>
>> IE8/IE9 I agree, we are in the same situation. Our customers only just
>> migrated to IE8, so that will take at least 2 years before they will move
>> on.
>> We could wait longer to move on to GWT 3.0, but the problem is that other
>> customers are already asking for IE11 support.
>>
>> About Java8 support on the client, I am looking forward to lambdas
>> instead of asynccallbacks, it would make my code a lot more compact! I only
>> have one onFailure implementation so it would be great if the APIs would
>> decouple these and allow for a default implementation.
>>
>> But the gwt-servlet.jar will still need to be compiled for Java 7
>> compatibility or we will be really in big problems. A lot of customers are
>> still running Java 6 on the server side.
>> Java 7 is about to become mandatory for us, but Java 8 that will take
>> ages.
>>
>> David
>>
>>
>>
>> On Fri, Oct 25, 2013 at 4:50 PM, Andy <[email protected]> wrote:
>>
>>> I just read through the notes from the GWT steering 
>>> committee<https://groups.google.com/d/msg/gwt-steering/ldyo7OXUnHQ/ogtT-kPFoaoJ>and
>>>  would like to share our perspective. I know you have a lot of survey
>>> results and we're just 1 company, but here's some more info based on our
>>> needs.
>>>
>>> *Java 8 only*
>>>
>>> I would encourage and support this move. I've been writing a ton of
>>> Javascript for the past few weeks and really miss the functional style when
>>> I come back to Java. Lambdas in Java 8 are going to be powerful and fun and
>>> they should be used liberally throughout the GWT 3.0 APIs. We won't be able
>>> to move our backend to Java 8 for a while, but since we only ship the JS
>>> output of the GWT compiler, I'm happy to use Java 8 for front-end
>>> development.
>>>
>>> *Dropping IE 8/9*
>>> *
>>> *
>>> We just decided on Tuesday to drop IE7 with our next release. We got
>>> tired of working around hasLayout bugs, etc. We have several major
>>> customers that still have users with XP/IE7, but after consulting with
>>> them, we decided we could go ahead with dropping support. Unfortunately,
>>> many of our customers are using IE8 and we won't be able to drop IE 8/9
>>> anytime soon. As a developer this is extremely frustrating, but it's the
>>> sad reality of the enterprise.
>>>
>>> So Java 8 would be awesome, but dropping support for IE 8/9 would
>>> prevent us from being about to use GWT 3.0 until our enterprise customers
>>> upgrade their browsers.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google Web Toolkit" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to google-web-toolkit+**[email protected].
>>> To post to this group, send email to google-we...@**googlegroups.com.
>>> Visit this group at 
>>> http://groups.google.com/**group/google-web-toolkit<http://groups.google.com/group/google-web-toolkit>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to