A recent Dot article explained changes in the KDE release cycle that will be happening with the upcoming introduction of Frameworks 5. The changes to KDE's core libraries are enough to warrant a name change from 'Platform' to 'Frameworks'. This article provides some background, an overview of the changes, and the benefits and improvements that can be expected from KDE Frameworks 5 for the entire Qt community. A later article will address Frameworks 5 benefits for KDE developers.
The KDE libraries are currently the common code base for (almost) all KDE applications. They provide high-level functionality like toolbars and menus, spell checking and file access. Currently, 'kdelibs' is distributed as a single set of interconnected libraries. Under the KDE Frameworks efforts, these libraries are being methodically reworked into a set of independent, cross platform modules that will be readily available to all Qt developers.
The KDE Frameworks, designed as drop-in Qt Addons, will enrich Qt as a development environment with functions that simplify, accelerate and reduce the cost of Qt development. For example, KArchive (one of the first Frameworks available) offers support for many popular compression codecs in a self-contained and easy-to-use file archiving library. Just feed it files; there's no need to reinvent an archiving function.
The transition from Platform to Frameworks has been in progress for more than 2 years and is guided by top KDE technical contributors. Previews of the first Frameworks are expected to be released in December 2013.
Introducing Frameworks 5
Frameworks 5 consists of functional components and are structured in categories and tiers, based on their dependencies.
The Frameworks are also separated by respecting core/gui distinctions and the different GUI technologies. So it's not uncommon to find a core, a gui and a widget module relating to a given Framework (e.g KConfigCore vs KConfigGui). This way third parties can use only the parts they need and avoid pulling unwanted dependencies on QtGui.
Show me the code
To give an idea of what is available in Frameworks 5, a cross-section of Frameworks from different tiers is presented below. These are in various stages of completion and many more are under development.
History of KDE Libraries
When KDE began more than 15 years ago, development was application-driven. Libraries were an afterthought, intended to share work, making development easier and faster. Libraries were added based on simple rules. For example, if a particular functionality was used in more than one place, it was put into a shared library. Sometimes the functionality was an addition to existing Qt classes, other times new libraries were developed for functions such as hardware discovery (Solid) or file access (KIO). The libraries had the additional benefit of improving overall functionality, consistency and stability. These overall improvements provided substantial value, so developers were encouraged to create and use more common library components.
For these reasons, it is hard to re-use KDE Platform 4 components outside of KDE applications. With the emergence of mobile platforms, this is an important consideration. On a modern desktop computer, the footprint of the KDE libraries and the runtime components is not very significant, but things are different on mobile or embedded devices. Developers have become more and more interested in using only the useful bits and pieces in their code. They do not want to pull in a lot of other unneeded components that generate their own dependencies, possibly hard to fulfill on a target platform. Splitting up kdelibs into independent modules would greatly improve their standalone utility.
Qt and Frameworks
Frameworks 5 was started in the spring of 2011 at an architectural strategy gathering in Randa, Switzerland. Developers from various KDE areas and projects (including several developers from the GNOME project) spent a week in discussion considering the impacts of the Qt 5 release. KDELIBS classes were pulled apart into pieces destined for upstreaming to Qt, deprecating or refactoring. The result of these efforts was a roadmap to Frameworks 5. Sebastian Kügler's blog post provides further insights about the work involved with Frameworks 5.
Collaboration and Roadmap
KDE Frameworks 5 is currently under development by a team of about 20 developers led by Kévin Ottens and David Faure. About half are supported by the four companies that are actively involved in the development of Frameworks 5.
Work on KDE Frameworks 5 is coordinated at the weekly Tuesday 4 p.m. (CEST; UTC+2) meetings on #kde-devel (freenode IRC). Reports from the meetings are sent to the Frameworks-devel mailing list. The meetings consist of announcements at the beginning, after which participants share what they worked on during the previous week and what they plan to tackle in the upcoming week. Work is planned and documented on the wiki. In addition to IRC, coordination takes place over the kde-Frameworks-devel mailinglist. The mailing list is also a place to inquire about particular KDE functionality that may be available for Qt development.
The project of transitioning to KDE Frameworks 5 is essentially a matter of refactoring a large, mature code base, and work has been in progress for more than two years. A preview release is planned for December 2013, with a final release in the first half of 2014. To give those interested a sense of the expected level of quality, documentation and testing, two Frameworks are planned to be released as 'final' with the December preview release: KArchive and KThreadWeaver. (For developers using Qt 4, KArchive is available as a download from David Faure. It works on Unix-like systems and reportedly on Windows too.)
Current state and code
The current state of Frameworks 5 development is available in the KDE Frameworks repository. The KDE Community wiki has an overview of the functionality offered by the Frameworks. The wiki also has a Frameworks page, which includes a dashboard with the current status of Frameworks 5.0.
Inqlude.org is another resource for Qt developers. Inqlude offers a view from the Frameworks perspective. The goal of this site is to provide a comprehensive cross reference of KDE Frameworks for Qt developers who are looking for ready-made functionality for their applications. The site, currently in Alpha, is scheduled for an overhaul during October. Additional contributors are warmly welcomed.
Article by Howard Chan and Jos Poortvliet, input from core frameworks developers including David Faure, Kévin Ottens and Sebastian Kügler.