The Choosel framework has been restructured into a more modular architecture that facilitates extensibility and reuse. The new visualization component architecture allows developers to use Choosel visualization components in regular GWT applications, to develop their own Choosel visualization components, and to extend the Choosel visualization workbench. This blog post outlines the architecture, describes its usage scenarios and explains how to update existing Choosel applications.
Visualization Component Architecture Overview (enlarge diagram)
The Choosel visualization component architecture separates the core functionality (which is required to use Choosel visualizations in GWT) from the workbench functionality. The visualizations are extracted into separate visualization modules. The architecture consists of three main components:
- Core module: The choosel.core module contains the core functionality that is required by Choosel visualizations. This includes the resource (i.e. data) framework, the management of visualization states (e.g. data, highlighting, selection), the visualization component API, and also more general services such as logging (which wraps gwt-log). The choosel.core module needs to be inherited by any GWT module that uses Choosel, whether it is a visualization component, a GWT application or a Choosel workbench.
- Visualization modules: Visualization modules provide one or more visualization components that implement the Choosel visualization component API. They can wrap around other libraries, e.g. GWT modules, JavaScript visualization toolkits, or Flash widgets. Choosel provides several visualization modules (map, timeline, text, chart, and graph) that can be used right away.
- Workbench module: The choosel.workbench module provides the persistence and sharing facilities as well as the visualization workspace.
This separation of concerns makes reusing and extending Choosel easier. It enables three ways to leverage Choosel in your own projects:
- Developing your own visualization components: You can implement visualization components that adher to the Choosel visualization component API. These visualization components can then be used by yourself and others to take advantage of Choosel features such as view synchronization, selections, highlighting, and details on demand.
- Using Choosel visualization components in your GWT application: You can use one or several Choosel visualization components as widgets in your GWT application to visualize your data.
- Creating a Choosel-based workbench: You can extend the whole Choosel framework to develop your own visualization workbench, for example for a specific application domain.
Please note that while the modularization itself is complete, the visualization component API is still under development. We plan to release a first stable version in the next few months.To set up a new Choosel project, please take a look at the development setup. If you are already working on a Choosel-based application, you can update it to use the modular Choosel architecture:
- Check out the different Choosel modules (see development setup)
- Change the dependencies of your Eclipse project (Right click on project --> Properties --> Java Build Path --> Projects) to reference the new Choosel modules, but not the old one (choosel)
- Organize the imports of your .java files (Right click on source folder --> Source --> Organize Imports; then for each class that has problems in the Java editor)
- Fix the static imports (if there are unresolved constants or methods: compare with previous version, insert old static imports and change choosel.client to choosel.core.client)
- Add the visualization configuration file (see ChooselExampleWorkbenchViewContentDisplaysConfigurationProvider for an example)
- Update the client module (see ChooselExampleClientModule for an example)
- Change the .gwt.xml file of your project (see choosel.example.workbench for an example module file)
- Update the servlet references in the web.xml (change choosel.server to choosel.workbench.server)
- Remove old launch config, copy launch config from choosel.example.workbench and adjust it to your project.
You should be able to run your modular Choosel application now. If there are still problems, feel free to complain on the
Choosel mailing list :-)