Linker and Generator documentation

41 views
Skip to first unread message

bconoly

unread,
Aug 1, 2011, 4:41:18 PM8/1/11
to google-we...@googlegroups.com
Hey All,
    I have a use case where I need two different GWT modules (compiled separately) to communicate with each other and I'd prefer to do this seamlessly for the developer.  My idea is to create an extension of the GWTEvent and extend it to create a GlobalEvent that when seen by either a generator or a linker (not sure which yet) will allow that event to be "serialized" and "deserialized" by the EventBus objects in each module so that they can communicate through their typical mechanisms.

I've researched Generators and Linkers before but felt like there used to be a lot more (and better) documentation.  Can anyone point me to some good documentation on the two?

On a side note I'd love to get suggestions on how to accomplish the above use case :)

Thanks in advance

Y2i

unread,
Aug 1, 2011, 5:12:05 PM8/1/11
to google-we...@googlegroups.com
What about having a third small module that defines an interface between the other two modules and is used to compile both of them?
The interface module could contain just a single event class or regular Java interface that the other two modules are aware of.

bconoly

unread,
Aug 2, 2011, 8:05:14 AM8/2/11
to google-we...@googlegroups.com
Well, that is kinda the plan, I was going to use a standard JS "eventBus" to facilitate the communication but I need to ensure that the event makes sense to both modules.  If the compiled event is different for each then they won't understand what the event is.

Y2i

unread,
Aug 2, 2011, 6:27:49 PM8/2/11
to google-we...@googlegroups.com
Why not to use a GWT event bus?  You can create an event by extending GwtEvent and place it in a small module that the other two modules can link to.  How a compiled event can be different if both modules link to the same version of the interface module?

bconoly

unread,
Aug 3, 2011, 12:10:10 PM8/3/11
to google-we...@googlegroups.com
The problem with that is that the GWT EventBus would be compiled separate for each module and I need them to understand each other when compiled independently.  I'll continue to work on it and hopefully find something.
Reply all
Reply to author
Forward
0 new messages