IBM developerWorks: Creating KParts Components

Following the first introduction to KParts on IBM developerWorks, David Faure now goes on to show developers how to create KParts components (free registration) in the first part of this tutorial series. You'll get an introduction to the core KParts concepts of read-only and read-write parts and network transparency. You'll learn how to create a read-only component, and then modify it to be a read-write component. You'll also learn how to deploy the component so that Konqueror can use it.

Note from David: This tutorial also demonstrates how KDE3 simplifies component programming, so check it out even if you are familiar with KParts in KDE2. ;-) Registration is required, but that's fairly quick to get through, and you can then save the whole tutorial as a .zip and read it offline.

Dot Categories: 

Comments

by fault (not verified)

nice!

by Justin Hibbits (not verified)

Yeah, I know I've bashed kde on more than a few occasions, but kparts is probably the best thing yet. And, David, great job on all your tutorials!

And, for a little more gratitude, here's some opinions as to how one might extend the kparts area..... (feel free to flame me if you think these are stupid ideas :P )

1) Extend the xml so that instead of using the kparts framework, use the XML to define a language-independent model for using kparts. IIRC, kparts uses a "KPartsManager" or the like, which may or may not depend on dcop (can't recall :P ). So, if you were to use a form of dcop to coordinate/manage kparts, you can use sockets/sharedmem and a C structure in order to allow say, GNOME apps or other apps to use kparts. That way, one can mix and match parts from different interfaces and still get a clean app.

2) There isn't a #2 (or 3 or 4) :P

Just an idea :)

Justin Hibbits

by David Faure (not verified)

I believe this is what XParts is all about.
Alt-F2, ggl:XPart ;)

by Justin Hibbits (not verified)

yeah, I know XParts is similar, but what I'm thinking of is the opposite (embedding kparts in OTHER apps, not just kde apps). maybe I confused you :P

(Yes, I know the title is kinda lame, but, couldn't think of a better one :P )

Justin Hibbits

by ac (not verified)

Why not use the right tool for the right job? Use XParts when you want to embed KDE components in OTHER apps or OTHER app-components into KDE.

Use KParts when you want to embed KDE components within KDE components.

Simple.

by Fredrik C (not verified)

Why do they these big companies SUN/IBM insist on requiring registration.
Do they want people to read it or just collect statistics?

by somekool (not verified)

KDE tutorial should be found on KDE web sites.

by ac (not verified)

I felt like skimming the document, but was put of by the registration. Sure, if I really _needed_ the doc I could register... but I feel I shouldn't have to.

by dc (not verified)

You just need to give a username and password, it doesn't care to verify the email address.

by Neil Stevens (not verified)

Lame is that this KDE documentation is being withheld from KDE developers.

by Neil Stevens (not verified)

So, can someone who trusts javascript grab a copy of that and stick it on developer.kde.org please?

by Mark (not verified)

Either you are paranoid or you are extremely lazy.

Either way, this is lame.

by Bryan Feeney (not verified)

...this whole don't-make-me-register thing is pretty ridiculous. I registered with IBM a year ago, and got nothing from them. In fact, I think they have an opt-IN policy with regard to spam.

Jeez lads, its well worth it, and it's not like they're asking for a pint of blood or anything.