Vaadin components consist of two parts: a server-side and a client-side component. The latter are also called widgets in Google Web Toolkit (GWT) parlance. A Vaadin application uses the API of the server-side component, which is rendered as a client-side widget in the browser. As on the server-side, the client-side widgets form a hierarchy of layout widgets and regular widgets as the leaves.
When rendering the user interface, a client-side connector and a widget are created for each server-side component. The mapping from a component to a connector is defined in the connector class with a
The state of a server-side component is synchronized automatically to the client-side widget using a shared state object. A shared state object implements the
The state sharing assumes that state is defined with standard Java types, such as primitive and boxed primitive types,
In addition to state, both server- and client-side can make remote procedure calls (RPC) to the other side. RPC is used foremost for event notifications. For example, when a client-side connector of a button receives a click, it sends the event to the server-side using RPC.
Widget set compilation, as described in Section 13.3, “Client-Side Module Descriptor”, requires using a special project structure, where the client-side classes are located under a
The basic project structure is illustrated in Figure 16.2, “Basic Widget Integration Project Structure”.
The Eclipse wizard, described in Section 16.2, “Starting It Simple With Eclipse”, creates a widget integration skeleton with the above structure.