Newby questions

Christian Robottom Reis kiko at async.com.br
Tue Oct 28 12:55:40 BRDT 2003


On Tue, Oct 28, 2003 at 10:49:30AM +0000, Alessandro Bottoni wrote:
> I have to say that you did a huge and wonderful job, guys! Kiwi looks 
> fantastic! Congratulations!

Thanks, it's appreciated.

> 1) I'm thinking to use Kiwi to develop a GUI for a PGSQL database. Of course, 
> I will need a Kiwi Model (and maybe a Kiwi Proxy) for accessing my PGSQL DB 
> (through the Python's DB Abstraction Layer).

Well, you don't *need* to use the Model unless you want notifications
replicated from your domain object to the interfaces. IOW, the Model is
what does the model -> view update, which really makes sense when:

    - You are doing concurrent writes to the same object and want to
      make sure the UI is up to date.

    - You have multiple views rendering the same object.

The Model has something of a performance penalty because of all the
setattr() code, but I that can be improved by selectively activating
that code.

> Can I simply derive a new class from Kiwi.Framework.Model and write my own 
> "load" and "save" methods into it for reading/writing from/to my database? 
> Does this approach could break any magic of Kiwi? Have I to take into account 
> any other element to be on the safe side? Can I use the PickledModel class as 
> an example?

Well, if you really want to use a an SQL database, I would recommend
looking into Ian Bicking's SQLObject, which offers a complete
object-relational mapper for PostgreSQL. You can then use Model as a
mixin for SQLObject -- I have a co-worker here that uses that in one of
our projects, and it works well -- and very fast.

> 2) Most likely, someone else have faced this problem already. Do you know of 
> any existing RDBMS (open source) application that uses Kiwi for building its 
> user interface? Is there any sample code or any documentation around  
> regarding this kind of data-centric applications?

Apart from the app I said (which unfortunately is a client project) I
*think* Andreas has something with SQLObject implemented as well.
Unfortunately, I don't know of any OSS projects that depend on Kiwi and
use an SQL database today -- in part, it's because we don't support GTK2
yet, and most OSS projects are intent on following the bleeding edge.

It's been on my TODO for a while now, I've just been too damned busy!

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331


More information about the Kiwi mailing list