Re: [gtk-list] Re: Gtk-Perl CVS 19991031 GtkGLArea.pm missing



Bart Schuller wrote:
> 
[...]
> And not even all of those. There's libglade too.
> 
> Dermot, could you tell me why I would want to use your module instead of
> libglade? Speed can't be the issue here.
Hi, I will assume that this is not just a rhetorical question.

I am not really the person to ask about this, it would be better to get
the opinions of someone who has tried both packages in real life.

I tried out the libglade perl bindings for the first time a few days ago 
so it would be silly of me to try to compare the two projects. I know 
how the code that my module generates works but I have not tried to build 
a complete app with the libglade bindings. I am certainly going to try
libglade more and steal any useful ideas though :-)

I began my module because, at the time, there was no way to work with 
Glade files using perl. Since then the libglade bindings have appeared 
and, to be honest, libguide looks like a very good solution.

While my module _can_ show a Glade UI and connect signals to do something
useful during the build phase, this is really a by-product of generating
the Gtk-Perl source code and is not its purpose. I would guess that 
libglade would be faster and more efficient if you want to show a UI  
directly from the .glade file. 

Glade-Perl generates Gtk-Perl OO classes (perl modules) that construct
toplevel form/dialogs and give you methods to access the forms and widgets 
on them. It also generates a subclass with skeleton signal handler subs. 
You can copy and edit this subclass to do something useful, the 
default behaviour of the skeleton subs is to show the signal handler
args in a message box.

It is possible to show any number of copies of each form/dialog at once
and to construct and handle signals for them independently as well as
access any widget on any instance of any form (I'm sure that this is
possible with libglade as well). Libglade is already used (eg by gnumeric) 
to display dialogs but I haven't tried a complex app with it yet.

As far as I can see, there is very little real difference between libglade
and the Glade-Perl generated UI classes except that Glade-Perl generates
perl source code that you can cut-and-paste or edit (if you want to) and
Glade-Perl generated code doesn't need the libglade libraries and bindings
to run.

I suppose that your decision is whether you want to work with perl source 
or you would rather ignore the Gtk-Perl UI construction code. I think that
the OO approach of Glade-Perl generated code is also different to the 
default behaviour of libglade so personal taste in coding styles would 
come into it.

I like the control that pure perl code gives me but I would be interested 
to know what other people think. If you have used both packages please 
jump in and give your opinions, even if they are negative.

In the end, I reckon, it depends whether you prefer chocolate or vanilla.

Regards, Dermot



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