Integrating the Two Sides with a Connector
A connector normally gets the state of the server-side component by the shared state, described later in “Shared State”.
Here, we handled state change with the crude onStateChanged() method that is called when any of the state properties is changed. A finer and simpler handling is achieved by using the @OnStateChange annotation on a handler method for each property, or by @DelegateToWidget on a shared state property, as described later in .
Communication with the Server-Side
Server-to-client communication is normally done using a shared state, as described in , as well as RPC calls. The serialization of the state data is handled completely transparently.
For client-to-server communication, a connector can make remote procedure calls (RPC) to the server-side. Also, the server-side component can make RPC calls to the connector. For a thorough description of the RPC mechanism, refer to “RPC Calls Between Client- and Server-Side”.