Experiences Creating a SPARK Compliant Widget Set

Christopher T. Lewis

Scalable Vector Graphics (SVG) is a specification for defining two dimensional (2D) vector graphics using an Extensible Markup Language (XML) grammar. The specification allows interactivity via client side scripting and Synchronized Multimedia Integration Language (SMIL) animation, and elements can be easily manipulated through transformations and style-sheets. The interactive nature of the format and ease with which elements can be styled makes it possible to create widgets that are both functional and visually appealing. Consequently, the use of SVG for web application development is gaining popularity and there are a number of notable examples available.

For the most part the developers of SVG enabled web applications have had to create their own widgets from scratch. This has resulted in many interesting variations of the same basic widgets, and required considerable duplicated effort. There have been attempts to create standard SVG widget libraries, for examples see the kevlindev.com widgets, the CGUI widgets, the SVgUI project and the dSVG widgets from the Corel Smart Graphics Studio project. However, even here there has been a great deal of duplicated effort.

In an effort to promote interoperability and thereby decrease duplication, the originators of the SVG Programmers Application Resource Kit (SPARK) began to discuss a framework that would provide guidelines for the construction of SVG based widgets. The first draft of the SPARK SVG-Based User Interface Framework has since been released, though there are only a limited number of rough widgets available to demonstrate the functionality.

This paper presents our experiences in refactoring the CGUI widget set to conform to the SPARK framework. The CGUI library was selected because we are intimately familiar with it, and because its functionality has been proven through use in a number of web applications. We chose to refactor the existing library rather than simply rewriting the widgets so that there would be a clear, well understood transformation process that other developers attempting to adapt their widgets to the SPARK framework could follow. As part of our efforts we also identified a number of small, but practical extensions to the SPARK framework. The transformation process and proposed SPARK extensions will be presented, as will examples which demonstrate interoperability between the SPARK demonstration widgets and SPARK compliant CGUI widgets.