GUI backend discussion

Szilveszter Farkas szilveszter.farkas at gmail.com
Fri Jun 16 17:00:20 BST 2006


Hello bzr World,

we had a short discussion about the GUI project on #bzr. Please let me
explain some things before I get to the point.

When I first had the idea to create a GUI for bzr, I thought the bast
way would be to design the UI and just code the needed event handlers
that communicate with bzrlib directly. My proposal for the Google
Summer of Code included this approach.

After I got accepted, we had a discussion going on at #bzr, and an
idea had arisen: we should support more frontends (e.g. GTK and QT),
which could be achieved by providing a solid backend that does
everything. We (my mentor, Mario and I) thought this were a great
idea, and that we should go along this way to make both GNOME and KDE
users happy.

But today, after working on the backend code for a week, I was told,
that I'm not doing things right: the backend is pretty useless, all
the validation and such things should happen in the UI code. I agreed
with them (Jelmer and Robert), but I'm still not sure which way is the
better one.

A short summary about the opportunities:

1. lightweight backend (almost nothing, only some helper functions) +
heavy frontends (each frontend has to validate things for themselves
using bzrlib directly, this may cause large duplications in the code,
the same algorythms for every kind of frontend)

2. solid backend on top of bzrlib providing the functions needed by
the frontends (this causes some duplications with bzrlib code) +
lightweight frontends (the event handlers just need to call the
appropriate functions with the right parameters) - this way we could
provide a convenient "framework" for different IDE plugin developers
(they don't need to learn bzrlib internals, just the olive functions,
that are well-docomented)

I need your help to decide which one is the better way to go.

I'm really thankful for the great help I've received so far from the community.

Best regards,
Szilveszter Farkas (aka. phanatic)




More information about the bazaar mailing list