Core and JSF Extension

Server-Side Synchronization

To provide a responsive user experience, interfaces need to manage interaction in an asynchronous way based on events. End-user interaction results in events being fired that trigger execution of event handlers. Using the JSF Edition, developers can handle events either client-side or server-side.

Client-side event handlers provide maximum responsiveness because they do not require any communication with the server. They make use of the client-side component model and are executed by the Backbase Client Runtime. Server-side event handlers provide for a very simple way of integrating the client-side interface with Java business logic or data on the server. Server-side event handlers are developed in Java, make use of the server-side component model, and are executed by the Backbase JSF Server Runtime.

The following figure demonstrates how the JSF Edition frees developers from explicitly having to write client-server communication code by transparently synchronizing events and state. The Backbase Client Runtime notifies the JSF Edition Server Runtime about events. The JSF Edition Server Runtime will execute the corresponding server-side event handler – a method of a Java backing bean – if present. In the Java event handler code, the developer has full access to the client-side state by accessing the server-side control tree.

The JSF Edition Synchronization Mechanism

The server-side control tree is a server-side representation of the client-side state. It is updated constantly by the Backbase Client Runtime and the Backbase JSF Server Runtime through delta communication. Delta communication works two ways. To be able to take action based on the current client-side state, the client sends its state to the server on every event. Changes to the server-side control tree are also communicated back to the client. This allows the server-side developer to modify the client-side UI by modifying the server-side control tree directly from within a Java event handler.

JSF Extension

The JSF lifecycle corresponds to the various stages of processing a request to generate a response. Within the application lifecycle, a hierarchy of server objects and UI components, named server UI components, is instantiated and assembled into a component tree. The processing of component tree dictates the markup that forms the response. The JSF lifecycle dictates when each component can save and restore its state, interact with other components, perform its main processing logic, and render markup to the output stream. As shown in the figure, the JSF Edition extends the JSF lifecycle to support AJAX-enabled widgets implementing client-server communication via deltas:

Request Processing Lifecycle

For further information on these and other features of the JSF Edition, please refer to the Technical Overview.