Difference between revisions of "Projects/KDELibsModifications"

Jump to: navigation, search
(Add page about more modularization in libraries)
 
(Redirect to communitybase)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== KDELibs Rearchitecture ==
+
This page has been moved to [http://community.kde.org/KDE_Core/Modularization communitybase]
 
+
=== Background ===
+
 
+
Several directions of Qt development and growth present opportunities to make technology created by the KDE community available to more platforms and to more developers of Qt based applications.
+
 
+
* The advancement of Qt to more and more varied hardware
+
* The use of Qt as the basis of MeeGo
+
* The use of Qt as the basis of other platforms in the future
+
* The use of Qt as the basis of other computer workspaces and interfaces in the future (http://mdzlog.alcor.net/2010/10/20/ubuntu-and-qt/)
+
* The increased use of Qt in environments such as Industrial Embedded (the machines in your kitchen and house)
+
* The increased use of Qt in creating Free and NonFree applications on desktop and mobile environments
+
 
+
This availability raises questions for Qt developers in those situations
+
 
+
* What can I use to create a primary widget-based workspace interface for my device? The answer should be libplasma.
+
* How do I initialize some hardware or software asynchronously and report progress? The answer should be KJob.
+
* What can I use for asynchronous access to IMAP servers? The answer should be KIMAP and KJob.
+
* Are there classes available for advanced model-view, or rich text editing? Yes, in Kdeui/itemviews
+
 
+
If GNOME ever switches to Qt, but wants to keep their own platformy bits like configuration format etc, where will they get Qt based libraries to create functionality for their Qt based platform?
+
 
+
=== The problem ===
+
 
+
One reason kde libraries are not currently the answer to the issues that Qt developers face is that 'platform parts' of kdelibs are introduced early instead of late in the module. For example the use of kdecore introduces requirements for things like KGlobal, KStandardDirs, KComponentData, KLocale, KConfig. While all useful for a workspace and application suite like KDE provides, none of those should be needed to use an asynchronous job API or itemviews library. Many for many Qt applications, QSettings and QObject::tr are sufficient because the application is deployed by the software vendor with specific hardware in a limited number of languages for example.
+
 
+
The bundling of the functional libraries of kdelibs and the platform integration pieces of kdelibs makes encouraging the use by third parties of the libraries but not the platform (where the KDE platform is irrelevant) difficult, not least from a point of view of communicating it clearly.
+
 
+
Discussion on k-c-d: http://thread.gmane.org/gmane.comp.kde.devel.core/67458
+
 
+
=== An option ===
+
 
+
One way of making the functional libraries of KDElibs more easily available is to split the kdelibs module into two modules named KLibs and KPlatform here for clarity. KLibs would be a 3 tier module:
+
 
+
==== Tier 0: Interfaces. ====
+
Some low level modules need access to platform specific data. For example, KLocale uses KStandardDirs to locate gettext translation catalogs. This makes KLocale dependent on the KDE platformy bits. An alternative design is to introduce an interface to get the paths, and implement it trivially on the Qt level, and with KDE integration at the platform level.
+
 
+
The interfaces tier would contain all the interfaces needed (probably few) to access platform specific 'simple types' like strings, urls etc.
+
 
+
It is possible that very pervasive classes in the current KDE4 would need to be in this tier (such as KDateTime), but that would be highly undesirable.
+
 
+
==== Tier 1: Independent libraries ====
+
 
+
Libraries such as KJob, KLocale (in theory at least), KItemViews, KConfig etc which can (be made to) exist standalone and depend only whatever dependencies give them their functionality (eg gettext) belong in Tier 1. Tier 1 libraries can not depend on each other, but can use the Tier 0 interfaces. The Tier 1 module is not QtCore only, but individual libraries might be.
+
 
+
==== Tier 2: Dependent libraries ====
+
 
+
Libraries such as KIMAP, KMIME, KMBox, libakonadi-kde can have hard dependencies on Tier 1 libraries (such as KJob) and on other Tier 2 libraries (KIMAP can use KMIME). Dependencies on platformy libraries from Tier 1 such as KConfig should be discouraged where using Tier 0 interfaces produces the same effect.
+
 
+
==== Platforms ====
+
 
+
KPlatform depends on many but not all of the libraries in the Tiers of KLibs. It implements the interfaces from Tier 0 in terms of the platformy stuff, KConfig, KStandardDirs, KStandardAction etc and contains classes like KComponentData, which all 'applications from the KDE community' use.
+
 
+
Pieces like KDED, KLauncher, KDEinit, KSyCoCa etc are also here.
+
 
+
It should be possible for an integrator similar to MeeGo which defines their own configuration system etc and implement the interfaces to create their own coherent platform and use the functional libraries.
+
 
+
=== Definitions ===
+
 
+
With increasing modularity of kde libraries, we can more easily communicate what the benefits are and what is available. Today, kdelibs could be described as 'A platform and set of integrated libraries to support the development of applications written by the KDE community'.
+
 
+
A more modular architecture could be described as 'KLibs, a set of Free Software functional libraries for Qt based applications' and 'KPlatform, an integrated set of libraries for applications written by the KDE community'.
+
 
+
=== Tasks ===
+
 
+
{| cellspacing="0" cellpadding="5" border="1" class="sortable" style="border: 1px solid gray; border-collapse: collapse; text-align: left; width: 100%;"
+
|- style="background: rgb(236, 236, 236) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; white-space: nowrap;"
+
! Status
+
! Object
+
! Change description
+
! Responsible
+
{{FeatureTodo|kdelibs|Split platformy code from functional libraries||}}
+
{{FeatureTodo|kdelibs|Merge kdesupport(which is all functional libraries) into kdelibs||}}
+
{{FeatureTodo|kdelibs|Remove K-Classes where Q-Classes are available and sufficient||}}
+
{{FeatureTodo|kdelibs|Consider refactoring K-Classes where Q-Classes are available but insufficient. Rather than subclasses and wrappers (which other libraries must use, increasing interdependence), it may be possible to redesign to use Builder pattern in some cases. Eg http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKRichTextEdit.html does not really need to be a subclass of QTextEdit.||}}
+
{{FeatureTodo|kdelibs|Consider splitting kdecore and kdeui into smaller non-platformy libraries. Additional library loading may be detrimental on some platforms.||}}
+
{{FeatureTodo|kdelibs|Consider contributing to Qt parts of kdelibs that are eligable and would be better to have there.||}}
+
{{FeatureTodo|kdepimlibs|Merge kdepimlibs non-platformy bits into kdelibs. Be more explicit about dependencies. Eg, KIMAP and libakonadi do not depend on all of kdecore, but mostly just kjob.||}}
+
{{FeatureTodo|kdepimlibs|Turn the remaining bits of kdepimlibs into pim platformy stuff only (depending on the kde platformy stuff)||}}
+
|}
+

Latest revision as of 22:58, 14 February 2011

This page has been moved to communitybase


This page was last modified on 14 February 2011, at 22:58. This page has been accessed 2,140 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal