Programming: KParts Explained
Sep 16, 2001, 23:52 (11 Talkback[s])
(Other stories by Philippe Fremy)
Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame
"When the KDE core-developers realised that Corba was
becoming an unmanagable nightmare, they wrote in a few days a
lightweight and efficient component technology to replace it:
KPart is based on Shared Libraries. This makes the component
appears directely as a C++ object. There is no need to wrap its
features with an IDL language, everything is accessible without
extra effort. So coding a componenent is very close to coding a C++
Object, which you must do anyway for your application. Shared
libraries are also very quick to activate or unload . You don't
even have to issue a fork, the code runs inside your application.
95% of the component specific work is done by the KPart API. so
writing and using component is very easy, as I show in the
examples. Reading the small documentation and the tutorial tells
you everything you need to know for that.
There are two kinds of KPart: components and plugins. Components
provide a widget that you can display, and may extend the
application's menu to add the component's specific actions. A
plugin has no widget. This is usually one menu entry that provides
one new feature. To make this possible, the menus of an application
are defined in a XML file."