-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Apps
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login

-
- News . 
0
votes
click to vote up

Aurélien Gâteau: Dependency diagrams for KDE Frameworks 5


Published Dec 5 2013 via RSS

For a long time we have been missing diagrams for KDE Frameworks, to make it easier to grasp the dependencies of the various frameworks. Since I like working with images I decided to tackle on this.

I did some research and found out CMake comes with a --graphviz option to generate .dot files, which can then be fed to the dot tool from Graphviz to generate pngs, svgs or other formats.

Armed with this, I put together two scripts :

  • kf5dot-prepare runs cmake --graphviz on all frameworks, generating .dot files,

  • kf5dot-generate then massage the .dot files, aggregate them and generate new .dot files which can then be piped to dot for final rendering.

My initial goal was to generate one diagram showing all the frameworks, but this is way too messy, so I ended up extending kf5dot-generate to be more versatile. Right now the output can be customized to generate a diagram of all the dependencies of one framework, to include or not Qt libraries, and to show or hide targets within frameworks.

I also used tred, another tool from Graphviz, to remove unnecessary links. For example if you have this graph definition:

digraph G {
    A -> B -> C # A depends on B, which depends on C
    A -> C # A depends on C
}

You get this output:

Without tred

With tred, the link from A to C is removed, since you can already go from A to C through B:

With tred

This helps making dense diagrams more readable, but it also hides some dependencies. Depending on the reason you are looking at the diagrams, it may or may not be a problem.

Examples

Here is a selection of the generated diagrams. The "simplified" versions have been run through tred.

Some tier 1 frameworks

Mostly useful to check which Qt libraries they use:

KWindowSystem

KWindowSystem

Solid

Solid

Some tier 2 frameworks

KAuth

KAuth

KCompletion

KCompletion

KJobWidgets

KJobWidgets

Some tier 3 frameworks

To reduce clutter I removed the Qt libraries for tier 3 frameworks.

Some of them are readable:

KDESu

KDESu

KIconThemes

KIconThemes

Others are too crowded unless they are simplified:

KIO

KIO

Simplified:

KIO, simplified

KCMUtils

KCMUtils

Simplified:

KCMUtils, simplified

All of KF5

The big, crowded, overall diagram (and this is the simplified version!):

KF5

Useful .dot files

I took some extra care to ensure the generated .dot files are readable enough to be useful even if the resulting diagram is not: the code is correctly indented and relations are placed close to their relevant targets. For example, here is the .dot file for all frameworks: kf5.dot.

Under the hood

The scripts currently live in a git repository: kde:scratch/gateau/kf5dot. kf5dot-prepare is a shell script. kf5dot-generate is written in Python and uses yapgvb, a Python lib to read .dot files.

What's next

In the long term I would like to include these tools in our API documentation generation procedure so that when you browse the API of a framework on api.kde.org you get a diagram of its dependencies.

Flattr this



BackRead original postSend to a friend

Add comment

Add comment
Show all posts




-
 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Apps
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Facebook App
Content RSS   
Events RSS   

Participate
Groups
Forum
Add App
Public API
About GTK-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2007-2014 GTK-Apps.org Team  
All rights reserved. GTK-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.