It's finally done. With today's Mars release we are able to celebrate the first release of the new GEF4 components, on which we have been intensively working for the last five years. A good opportunity for a small retrospective about our "Mission to Mars" and for some sightseeing "at the landing zone".
Countdown and Liftoff! - The Story behind GEF4The renewal of the GEF API had already been a vision back in 2010, when development of Zest 2.x was started with the goal to revise the Zest 1.x API, which had been kept backwards compatible since 2007. Draw2d and JFace were still unquestioned as underlying rendering technologies, but several refactorings and additions were incorporated (e.g. some new layout algorithms), all in a separate repository and thus in parallel to the maintenance of Zest 1.x. Two completely new features were added in this context as well: support for rendering of tag clouds (Cloudio) as well as Graphviz DOT-support in terms of an Xtext-based editor and a Zest-based viewer (Dot4Zest).
Inspired by how Fabian Steeg, Zoltán Ujhelyi, and Stephan Schwiebert were bringing Zest 2.x forward, I initiated a comparable renewal of Draw2d and GEF (MVC) 3.x, whose API had been kept stable since 2004, in early 2011. As the GEF project team strictly separated between Draw2d/GEF (MVC) and Zest component responsibility at that time, Matthias Wienand and I started with developing a new double-based geometry API pretty much in parallel to the Zest 2.x efforts. Nevertheless, as we finalized the geometry API in 2012, it soon became clear that the next generation GEF API had to be developed in a unified effort. In accordance to the usage of "e4" to depict the 4th generation of the Eclipse platform, we chose the term "GEF4" to refer to that unified effort.
The major goal we identified for this unified approach was to have a self-contained GEF4 with no dependencies on Draw2d, GEF (MVC), or Zest, which could thus be developed in parallel to maintaining the old production components, not affecting any of our adopters directly. One of the first steps we performed conjointly in terms of GEF4 was the migration of the Zest 2.x codebase to the GEF4 namespace, the unification of the related Git repositories and Hudson build jobs, and the adoption of the just finalized GEF4 Geometry component by the migrated Zest 2.x code base.
Having finalized this initial Zest 2.x migration, we now initiated work on a replacement API for Draw2d and GEF (MVC) 3.x, using JavaFX instead of SWT as underlying rendering technology. This lead to two new GEF4 components: GEF4 FX and GEF4 MVC. To already decouple as much of the migrated Zest 2.x code base from Draw2d 3.x as possible, we extracted all newly introduced features, namely Cloudio and Dot4Zest, as well as all rendering-independent parts into new GEF4 components, namely GEF4 Cloudio, GEF4 DOT (the Zest-based DOT-viewer was not extracted at that time, because of dependencies to Zest), GEF4 Graph, and GEF4 Layout.
Mission to Mars: Accomplished!The major goal for the Mars release timeframe - our Mission to Mars - was to finalize GEF4 FX and GEF4 MVC, so that a comparable functionality to that of Draw2d and GEF (MVC) is offered, and to completely rewrite the initially migrated Zest 2.x code base into a GEF4 Zest component that is internally based on GEF4 MVC, GEF4 Graph, and GEF4 Layout, and which uses JavaFX and GEF4 FX for rendering purposes. In other terms, we wanted to achieve that GEF4 is fully self-contained and provides at least the functionality offered by Draw2d, GEF (MVC), and Zest.
And while all GEF4 components are still provided with provisional API, and a little functional gap still remains compared to the current production components (on the other hand several new features are provided in exchange), a fully self-contained GEF4 has been initially released today as part of the GEF 3.10.0 (Mars) release. Mission accomplished!
Sightseeing Mars - What does the first release provide?The spectrum of what is provided with Mars reaches from libraries that may also be used apart from graphical applications (GEF4 Common, GEF4 Geometry) via dedicated graphical application development frameworks (GEF4 FX, GEF4 MVC, GEF4 Graph, GEF4 Layout, GEF4 Zest) to graphical end-user tools (GEF4 DOT, GEF4 Cloudio) that as well include framework parts.
All components (features) are broken down into one or more modules (plug-ins), to clearly separate parts that are rendering-toolkit (i.e. JavaFX) dependent from independent ones, as well as parts that rely on SWT, JFace, or the Eclipse Workbench UI from others. We consistently use the suffix ".FX" to indicate that a module depends on JavaFX technology, and ".UI" to indicate that it depends on SWT, JFace, or the Eclipse Workbench UI. The following are provided with Mars (modules are given in brackets, where appropriate):
GEF4 Geometry provides different abstractions (euclidean, projective, planar) to perform geometric calculations in two-dimensional space. All calculations are performed with double-based precision, where inaccuracies are compensated by imprecise comparisons. Besides the "traditional" abstractions that can usually be found in the context of planar geometries, there is also direct support for Beziér curves of arbitrary degree, poly-Beziérs, and curved polygons. Furthermore conversion operations are provided to convert between planar geometries and respective representations in SWT and JavaFX.
Being the intended replacement for Draw2d 3.x, GEF4 FX provides additions to JavaFX that are useful in the context of graphical applications. Essentially, this comprises implementations of visual anchors, a connection abstraction, and related decorators. Furthermore, GEF4 FX delivers enhanced support for integrating JavaFX with SWT in terms of an own canvas implementation that augments the JavaFX provided FXCanvas with support for forwarding of gesture events (which is still missing in JavaFX 8). It also provides support to integrate SWT widgets (nested below an FXCanvas) into the embedded JavaFX scene graph, so that SWT widgets and JavaFX nodes can be layouted together.
GEF4 MVC is a generic model-view-controller framework that can be used to build up graphical editors and views. It is the intended replacement for GEF (MVC) 3.x and - compared to this - offers a couple of significant advantages. At first, there is a clear separation into core abstractions, JavaFX-dependent aspects, and Eclipse UI-integration related ones. Due to this, GEF4 MVC-based editors or views can be deployed as part of standalone Java applications, and may even be deployed in the web. Second, GEF4 MVC makes intensive use of the IAdaptable-patten provided by GEF4 Common and can be flexibly configured via Guice-based dependency injection. Third, from an end-users viewpoint, GEF4 MVC profits from much nicer visualization capabilities offered by JavaFX and GEF4 FX, and provides long requested features like an infinite canvas approach, direct support for application of rotations and other affine transforms, continuous zoom, and "live-feedback".
GEF4 Graph provides a simple model to represent directed graphs. It is used by GEF4 Zest as underlying data model for visualization as well as by GEF4 DOT as import/export data model. In the mid-term, GEF4 Graph could become the default notation model to be used for graphical editors and views that are based on GEF4 MVC. Currently, it is only used by GEF4 Zest in this role, where it is adapted to GEF4 Layout for automatic layouting.
GEF4 Layout provides general abstractions to integrate layout algorithms, as well as related implementations (spring, grid, radial, sugiyama, tree, horizontal shift, space tree). It is used by GEF4 Zest for automatic layout of graphs, but can in principle be used by arbitrary graphical applications. Currently, there is no direct support for integrating GEF4 Layout algorithms into GEF4 MVC, but this is an intended extension for the mid-term. Furthermore, its intended to align the provided abstractions with the KIELER framework, so the layout algorithms provided there can also be easily integrated.
GEF4 Zest is a framework for graph visualization and the intended replacement for Zest 1.x. Being written completely from scratch, GEF4 Graph-based data models are visualized using JavaFX and GEF4 FX and - through an integration of GEF4 Layout - also automatically layouted. GEF4 Zest provides a default visualization that can be adjusted through CSS styling. It is internally based on GEF4 MVC, and may thus be used in standalone Java applications or integrated within the Eclipse UI. As part of the Eclipse integration, GEF4 Zest furthermore provides a JFace-API, which allows to visualize a graph based on a dedicated viewer. From an end-users perspective GEF4 Zest supports additional features like hiding/unhiding of nodes as well as semantic zoom.
GEF4 DOT provides an Xtext-based editor for Graphviz .dot files, support for parsing and serializing DOT to/from GEF4 Graph representations, as well as 'DOT Graph' view to visualize .dot files via GEF4 Zest. The view also provides PDF export support based on the Graphviz native executable.
GEF4 Cloudio provides support for rendering tag clouds. This includes a dedicated SWT widget as well as a JFace-based viewer. In addition, GEF4 Cloudio offers a dedicated view, via which end-users can create and export tag clouds based on an input text file. In contrast to the other GEF4 components, GEF4 Cloudio does not support JavaFX-based rendering yet.