Monday, January 23, 2012

Re: How to build a simple GWT event bus using Generators

Thomas,

Your analysis is dead on. There are 17 built-in GWT listeners
interfaces and publishers added to the registry (not to mention user-
defined listeners) whether or not they are used in the final
application. The generated Javascript (*.cache.html) are about 280K,
will be interesting to see how much are due to the extra classes.

I like that you've provided options with your findings. Thanks.

Annotations: This could work, but the developer has already specified
which listeners they want to use -- just by using them. It might be
burdensome to explicitly declare them again. This seems like
something the framework (or compiler) should be handling out-of-sight.

GWT create: Do I understand your point correctly, are you suggesting
passing a factory interface to GWT.create()? Something like:

public interface MyEventBus extends IEventBus {
SearchListener createSearchPublisher();
}

If so, I like it. Providing an API to set eventSource and topic would
be needed, but this looks like a great approach. Thanks for
suggesting it. Honestly, I'm more than a little jealous I didn't
think of it myself :)

Cheers,
Dele

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment