[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: message scoring KPart plugin (was Re: 2.2 RELEASE SCHEDULE (proposal) [NOTE: 2.2 != 2.1.1])
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-03-03 15:31:22
[Download RAW message or body]

On Saturday 03 March 2001 14:48, Roberto Alsina wrote:
> On Sat, 3 Mar 2001, Guillaume Laurent wrote:
> 
> > On Saturday 03 March 2001 07:29, Waldo Bastian wrote:
> > 
> > > We aim for the following improvements among others:
> > 
> > I would like to try developping a KPart plugin for message scoring. The 
> > plugin could be used by both KMail and KNode (and Aethera may be). It would 
> > simply affect a score to a message depending on whether some of its headers 
> > match some regexps (or if the author is present in the address book). The 
> > configuration would be available from the control-center.
> > 
> > Can someone confirm that a KPart plugin is indeed the right way to do this ?
> 
> A KPart seems a bit overkill. I did this for KRN and i was not even 50
> lines of code.
> 
> A bit more for the dialog, of course ;-)

Don't confuse parts and plugins. 

A Part is a widget (with extra stuff around it).
A plugin is a small library which provides its functionality via a menu item
that KParts automatically creates for it.

The problem here is accessing the application's data... which is different
from one application to another. When a big level of integration is needed, 
a plugin usually links with the app it applies to, or a "high-enough" library
(like libkonq for konqueror).
But you can't really link your plugin to KMail + KNode + Aethera :)

So the good thing about a plugin is that you can extend ONE application
without touching its code. But the bad thing is that it's not really reuseable
(unless it's completely independent from the application's code, like the
calculator plugin). But that's not the case here.

I think a small library used by the application's code is more adapted here.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today

 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic