TCBuilder: Thin Client Builder
TCBuilder is a GUI development tool based on Eclipse platform to design, develop and debug swing based rich GUI applications. The application can be deployed seamlessly as web (as a war file) or standalone application. The application and presentation logic run on application server and GUI rendering is done by a presentation engine running in browser as an applet or on user’s desktop as a simple java application. Server based presentation logic and client presentation engine exchange GUI data and events and maintain UI model state on server side. All GUI data and events are available to application logic using generated UI model that provides a swing equivalent very simple and lightweight server side UI component. In Standalone mode, application runs as a simple java application that directly controls presentation engine.
TCBuilder framework consists of three tools:
1. GUI Builder:
The GUI Builder is used to design the GUI using simple drag and drop of GUI components. The component palette contains swing containers, components, menus, custom, and chart components. Selected component can be further customized using property sheet editor by changing its attributes. It stores GUI information in a XML file, and generates main application and UI model classes, which are used by server side logic. The main application class is the starting class for the business logic. The generated UI model classes provide swing equivalent components and are not supposed to be changed. They provide UI object names and, are used to set/get data from GUI and attach UI event listeners. The actual GUI can be viewed using Swing View, or application can be run or debug using eclipse platform. “Direct Connection” communication context run the application in editor the same way it will be run in web mode.
A simple to complex GUI can be designed in few hours. It provides rich features for data presentation and formatting. The custom components (Date Field, Number Field and Form Fields) provide very rich data formatting and masking. Data range for number fields can be also defined to provide client side data validation without writing code. Form fields eliminate the need to assign label for each component separately thus reducing design time significantly. The powerful component alignment feature aligns layouts and resizes components in few clicks of buttons to provide a very decent looking GUI.
GUI Builder View:
2. Thin Client Presentation Engine:
Presentation engine is a generic swing based applet (< 400K size) that renders the GUI, which is provided to it as URL by backend run time engine. This is the only applet required to display the GUI for all the applications. It communicates with backend UI model and hence the business logic using its communication context. It uses HTTP(s) in web based mode or direct connection (a dummy connection) in standalone mode. In standalone mode, it is directly controller by UI application and runs in the same JVM. It exchanges UI events and data with server based UI model using XML format. It is possible to port it to other programming languages,
3. Server UI Model & Run-time support:
An UI application controller servlet is responsible for creation of application instances, session management and forwarding of UI events between presentation engine and application sessions. UI applications are defined in a deployment XML file containing application name, class and GUI (.xui) file. Presentation engine (on behave of clients) provides the name of deployed application to controller, the controller creates application session and provides URL of GUI file (saved as XML file) to presentation engine. Controller manages all the application deployed in its deployment file (xuiapps.xml). Many controllers having different URL mapping can co-exist in same application/web server.
The generated UI model (classes) represents the GUI object tree, which is used by sever based business logic to present data and manipulate GUI. UI model in conjunction with communication context provides UI data and event exchange between presentation engine and business logic. Application can be deployed as war file in any web server or can be run as standalone application. There is no deployment descriptor in standalone mode; the main UI application class defines its main method that is responsible for initializing communication context.
It is possible to replace communication context between presentation engine and server with other communication transport.