In the gwt-user.jar there are 2 EventBus interfaces and SimpleEventBus implmentations.
com.google.gwt.event.shared.EventBus and com.google.web.bindery.event.shared.EventBus
I’ll refer to these as ‘gwt.event’ and ‘web.bindery’.
Looking at the JavaDocs and source code I can see that the gwt.event merely wraps the web.bindery one. However the gwt.event implementation also hides a number of deprecated methods
So which implementation should I use? (I’m on GWT 2.4)
Generally you should use the one in
com.google.web.bindery. The only version used to be incom.google.gwt.event, but when RequestFactory and AutoBeans were moved out of GWT itself and intocom.google.web.binderyso they could work in non-GWT clients.If you use the
com.google.web.binderyversion in your presenters and such, it will make it easier to use outside GWT apps, should you need to. You’ll also not get deprecation warnings when passing that instance toPlaceControllerand other classes that use EventBus.