GUI backend discussion

Robert Collins robertc at robertcollins.net
Fri Jun 16 17:08:35 BST 2006


On Fri, 2006-06-16 at 18:00 +0200, Szilveszter Farkas wrote:
> 
> 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 think the problem here is in trying to decide a-priori.

I suggest instead that you start with all the code at the 'best place
for it' - if  you are writing a commit message collector, put that near
your commit ui logic.

But be willing/ready to *move* it to be somewhere more reusable when
someone else writes a different gui UI that needs the same logic.

The problem is that you cant tell what bits of the logic are going to be
reusable until you are actually writing the second thing that needs it.

I do suggest that you look very closely at bzrlib.builtins and change
that as needed to make the code *it* has, as the original UI, to make
that code reusable by you.

Now, when you are reusing some code within olive, if its code that is
likely useful for other things written on bzrlib, send in a patch to put
it in bzr :).

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060617/0a8b42f6/attachment.pgp 


More information about the bazaar mailing list