In this chapter, we tackled the concept of events and listeners. Both form the basis for the observer design pattern implementation. The latter can be summed up as: when objects want to be notified of certain occurrences in another object, they register as observers and a certain behavior is called, depending on each object's implementation.
Then, we learned that this pattern is used throughout fat client software's user interfaces, but web developers are seldom aware of it: there are some event model implementations in Java EE, but they are unrelated to UI.
In Vaadin, however, we can keep our event-listener related knowledge (or acquire it) because it is fully observer-compliant. There are two ways to register an observer: