When to write a DataEngine and when not?
Aaron J. Seigo
aseigo at kde.org
Sun Dec 28 01:57:02 CET 2008
On Saturday 27 December 2008, Luca Beltrame wrote:
> Hello Plasma developers,
>
> since I finally got to install the Python bindings for Plasma I wanted to
> start working on a small project. In short, this small applet I have in
> mind would be used as a "search applet" for a specific service provided by
> the National Center for Biotechnology Information (NCBI). The user would
neat.
> Now, I wonder if this warrants the creation of a specific DataEngine or not
> . 90% of the functions to retrieve data are already implemented, what's
> missing (and that I'd write) would be a part to parse the results (they
> come in XML). As far as I understand, DataEngines work with data that is
> either timed or continuous, while in this case it is the user that will
> decide when to search, so they're not very fit for this purpose.
it's not just timed or continuous, though DataEngines make those scenarios
very simple. it's whenever the data might be shared amongst multiple different
widgets or multiple instances of the same widget.
it allows you to put the data management code in one place, and the data
visualization code in another.
obviously the call is up to you, but most trivial engines, such as what you're
describing, are only a few dozen lines of code.
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Software
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20081227/5073b595/attachment.sig
More information about the Plasma-devel
mailing list