Sprotty project releases version 1.0: web-based visualization tool now “entering maturity”

Sprotty project releases version 1.0: web-based visualization tool now “entering maturity”
Code

The Eclipse Sprotty project, a framework for rendering diagrams using SVG (Scaleable Vector Graphics), has reached version 1.0, a landmark described by its co-founder Miro Spönemann as concluding the incubation phase and entering maturity.

Sprotty was started by Spönemann along with Jan Köhnlein in 2017, arising out of their work at TypeFox, an open source developer tools company perhaps best known for originating the Gitpod cloud development platform.

The framework can be used in any web application or integrated into extensions for IDEs such as Eclipse or Visual Studio Code. It is not just a model rendering framework, but includes the ability to respond to user interactions, which can then in turn modify the model. Sprotty can also be integrated with web frameworks such as React, Angular and Vue.js. It has both a client framework and an optional server piece, which transforms data into a Sprotty diagramming model and supports Sprotty’s protocol.

Sprotty though is not designed for graphical editing. “The decision to restrict the core functionality of Sprotty to read-only visualization was deliberate, as we felt this would help minimize its complexity and keep it manageable,” Spönemann said in his release post. “More importantly, both Jan and I regard text as a much stronger format for editing than graphics.”

A state machine visualised with Sprotty
A state machine visualised with Sprotty (image from this example)

It is nevertheless possible to use Sprotty as a component in a graphical editing application and this has been done by two other projects, Eclipse GLSP (Graphical Language Server Platform) and Eclipse Sirius Web.  

The evolution of the Sprotty project tells a story. It began by working with the older Eclipse Graphical Modeling Framework (GMF) yet “that experience was not always pleasant. Working with GMF had left us especially frustrated about the state of graphical modeling tools,” wrote Spönemann.

The project began by using Java for the server part but switched to Node.js, influenced by the technology of cloud IDEs. It now uses TypeScript throughout. The developers are determined though to switch eventually from the CommonJS module system currently used to ECMAScript modules.

Spönemann insisted that Sprotty has an “established and growing community” and represents a “safe choice for companies that want to develop web-based diagramming applications.” There is one cautionary note though. “The overall framework is still hard to comprehend for many developers. This is due to the conceptual dependencies between the framework features, and it reflects the fact that a graphical tool with rich user interaction is a complex system in itself,” he said. 

The project is open source and can be found on GitHub, licensed under Eclipse Public License 2.0 which is “commercially-friendly.” It is therefore free to use, and despite the complexities, no doubt easier than developing a custom diagramming solution.