Which GWT EventBus should I use?

后端 未结 4 1691
时光取名叫无心
时光取名叫无心 2021-02-18 16:43

In the gwt-user.jar there are 2 EventBus interfaces and SimpleEventBus implmentations.

com.google.gwt.event.shared.EventBus and com.google.web.bindery

4条回答
  •  面向向阳花
    2021-02-18 17:30

    Generally you should use the one in com.google.web.bindery. The only version used to be in com.google.gwt.event, but when RequestFactory and AutoBeans were moved out of GWT itself and into com.google.web.bindery so they could work in non-GWT clients.

    If you use the com.google.web.bindery version 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 to PlaceController and other classes that use EventBus.

提交回复
热议问题