Wednesday, June 30, 2010

Re: How to simplify your GwtEvent classes and have fun doing it!

> public class GenericEvent extends GwtEvent<GenericEvent.Handler> {

This is very tangential, but all the talk about a generic event made
me think of a paper a colleague of mine linked me to about potential
design patterns for UI listeners in Scala:

Again, this is very tangential to GWT itself, but I enjoyed the read.

One concrete thing I did like from the paper is that if an observer
doesn't care about the actual payload of an event, just that it was
triggered, the observer can be hooked up to any and every event,
regardless of the event's type. Multiple times in GWT I've wanted to
run the same logic on blur, on click, on whatever, but cannot have
just a single new HeySomethingGenericHappened() { public void handle()
{ ... } ) that can be hooked up to any event.

- Stephen

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment