[GnomeMeeting-devel-list] Refactoring the addressbook code



Hi,

I am not satisfied with the addressbook code.

The main problem is that the separation backend-frontend isn't good enough :
- it's not the addition of an addressbook or contact which triggers
showing it in the window... both actions are done sequentially.
Typically it means that in the future, the dbus component would have to
both create things in the backend, and cope with the ui (!).
- I had a bug that when I removed all local addressbooks, adding one
again was broken, because there were no more addressbooks groups. The
fix was easy : create what's needed ! But... if adding an addressbook
now works (no more warnings, it _is_ there), it isn't shown in the ui before a restart !

I would really like to see parts of it rewritten for 2.2, with the
following hard constraints :
1) no loss of feature ;
2) the eds/avahi/whatever code must move as little as possible (so their
respective contributors could still recognize their code and work on it);
3) backend and frontend must be really separated, so that another
frontend (the dbus component) could appear and work without requiring to
further modify things.

Notice that the point (2) means that we will respect whatever format was
used to store things in the configuration, and hence we won't break
user's configuration -- which is important for a 2.x release.

I'm not sure of what to do yet, but I think it should be possible to do
interesting things by just rewriting :
- lib/gmcontacts/gmcontacts.cpp ;
- lib/gmcontacts/gmcontacts.h ;
- src/gui/addressbook.cpp.

The reason is that going from frontend to backend, things are layered
like this (as far as I can tell) :
src/gui/addressbook.cpp
  lib/gmcontact/gmcontacts.cpp
    lib/gmcontact/gmcontacts-remote.cpp
       lib/gmcontact/gmcontacts-avahi.cpp
       lib/gmcontact/gmcontacts-ldap.cpp
    lib/gmcontact/gmcontacts-eds.cpp
    lib/gmcontact/gmcontacts-gmconf.cpp

Does that look sane ?

Snark



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]