Monday, February 6, 2012

Using Listener instead of GWT Event Bus

When developers design communication between controllers in GWT applications, they often use Event Bus. It is a good decision if you have at least several event handlers for every event. But what if there are only two controllers? If we prefer Event Bus, then every event will have only one event handler. It is too costly. In this situation it is better to use Listener design pattern (it is also known as Observer).

This post has a Russian version.

Earlier we have created an application with Event Bus. Now let's create a similar project, but using Listener pattern.