Rocs KF5 Progress

Main message: The Rocs frameworks branch is finally merged into the master branch (but too late for Applications 14.12 release). It has tons of changes, not only porting ones but rather refactorings and technology changes.

And now in Details: The work on the Rocs frameworks port was quite a bumpy road. Back in early spring this year, I started with an initial porting afford to KF5/Qt5, but soon it turned out that there was a chance of combining this porting with a long outstanding code refactoring of the application’s core. Before I am going into details, here some numbers of this port:

  • 835 files changed
  • 36924 insertions(+), 62342 deletions(-)
  • 379 commits

Having these numbers in mind, I also made the decision to take some more time for stabilizing the code base until the spring release and not to rush into the Applications 14.12 release. However, most work is already switched to polishing the remaining glitches and fixing the bugs that were undoubtedly introduced with these big changes. And for my personal usage, I can say, that the current master branch version is already quite usable on a daily base.

Rocs Qt5/KF5 Port

The big refactorings in a nutshell:

  1. Proper project support.
    We have a long history of at first only operating on a loose set of graph and script files, then introduced projects to (optionally) organize these files. Now the core of each Rocs session is a project, which on the one hand makes the workflow much simpler and on the other hand simplifies the code base quite a lot (now there is only one place in code that cares about project files and sessions).
  2. A scene graph based visual graph editor.
    Rocs in the 1.x versions used a graphics view for providing a visual editor for graphs. But this part in particular was a “grown” code base, containing some of the oldest code in Rocs (~7 years). With having QtQuick as a kind of successor technology for our use case, I started a complete rewrite of the editor in QtQuick. The graph editor is already usable but still contains many glitches and some features are missing, compared to the old one. This will probably be the main area of work until the spring release in 2015.
  3. A leaner graph model with better scripting API.
    One part of Rocs that is of most importance to me, as someone who uses the application to actually do research and test graph algorithms, is the graph model. Rocs has an internal representation of a graph theoretical graph, consisting of nodes, edges, dynamic properties at these elements, and a set of basic graph operations. Due to history, the graph model was never completely covered by unit tests and further, over the years, gained many (and some of them hacky) extensions: elements received types, graphs gained the option to represent different data structures, several versions of different scripting APIs were introduced… So, during this port, the graph model was completely rewritten from scratch, but with all the lessons learned over the years. And as a plus, following a test driven approach, every operation is unit tested! Having the experience of working on the model for some years, it was also possible to make it much leaner and only provide API and functionality that is actually used somewhere in the application. Together with the visual editor the graph model forms the new (but internal for now) graphtheory library.

During the next month, I will try to talk in more details about each of these points, as I think for each of them there are interesting things to tell, and that not only for Rocs developers 🙂