Documentation versions (currently viewingVaadin 8)

Vaadin 8 reached End of Life on February 21, 2022. Discover how to make your Vaadin 8 app futureproof →

Migrating from Vaadin 6

The client-side architecture was redesigned almost entirely in Vaadin 7. In Vaadin 6, state synchronization was done explicitly by serializing and deserializing the state on the server- and client-side. In Vaadin 7, the serialization is handled automatically by the framework using state objects.

In Vaadin 6, a server-side component serialized its state to the client-side using the Paintable interface in the client-side and deserialized the state through the VariableOwner interface. In Vaadin 7, these are done through the ClientConnector interface.

On the client-side, a widget deserialized its state through the Paintable interface and sent state changes through the ApplicationConnection object. In Vaadin 7, these are replaced with the ServerConnector.

In addition to state synchronization, Vaadin 7 has an RPC mechanism that can be used for communicating events. They are especially useful for events that are not associated with a state change, such as a button click.

The framework ensures that the connector hierarchy and states are up-to-date when listeners are called.

Quick (and Dirty) Migration

Vaadin 7 has a compatibility layer that allows quick conversion of a widget.

  1. Create a connector class, such as MyConnector, that extends LegacyConnector. Implement the getWidget() method.

  2. Move the @ClientWidget(MyWidget.class) from the server-side component, say MyComponent, to the MyConnector class and make it @Connect(MyComponent.class).

  3. Have the server-side component implement the LegacyComponent interface to enable compatibility handling.

  4. Remove any calls to super.paintContent()

  5. Update any imports on the client-side