[Glade-devel] Source code generation

On Fri, 17 Nov 2006 02:00:08 +0100
Oliver <oliver at are-b.org> wrote:

Hi, I just found your post about glade2c via a google search. 
(http://www.mail-archive.com/glade-devel at lists.ximian.com/msg01254.html)

And I must say, I whole heartedly agree with you. I have come to
dislike libglade as to my feeling it just seems very very slow. (I
don't think it's cool when you see the UI being build/resized infront
of your nose everything you open/change a window. It looks ... slow
and cheap to me.

But I never really criticised libglade, I think it's great. And I don't
believe a window created by libglade is a bit slower (to resize and
such) than one generated directly by code. It's probably slightly
slower to create the window, but not slow enough for it to be an issue.

For me this is pretty much the same thing as comparing and compiled and
interpreted languages. I don't have anything against either approach,
it's pretty much a matter of taste if you ask me. If some people want
to use libglade, that's fine, but if some people want to generate code
they should have that choice too IMHO.

I also don't see what the big deal is with generated code. Keep the 
sources of ANY programming stuff completely separated from your GUI.
I mean, what would you wanna do in the generated anyway. You fire up 
glade and do the modifications, and regenerate the code if needed to
be. Since callback functions are named in glade, that can't be an
issue. Data that needs to be passed along, also put down in glade.
And if not for all that, maybe the whole glade/generated code thing
can be used as a template. You build your GUI how you think it should
look like, generate the code (that's compilable/runable so that you
can atleast test your GUI and then copy the appropriate parts. So
yes, I fully support your idea on glade2c and if you need help
testing it or what not, I'll be more than happy to.

The thing seems to be that people copy and paste from the generated
code instead of just compiling the generated files as they are. Which
of course is a bigger burden for them than just make a few calls to
libglade (especially when the glade file is changed and all the
changes need to be copied to the right places). But if the generated
code is compiled as it is, the amount of work and code to write should
be pretty much the same in either case (at least according to my

I intend to make glade2c able to generate template code (exactly a as
glade 2 does). It will probably be possible to fire up glade, create
a GUI and than run glade2c and make to get a test-application, without
needing to write a single line of code. But to do that it will probably
be easier to have a libglade based application that can display any GUI
(also faster if you include the compile time in the calculation).

But I don't really understand why anybody would want to copy and paste
from the generated code. Is it because the generated code isn't optimal
in some way? What could be done better? That is really something I need
to look into.

You are more than welcome to test it as soon as I get something working
(it was slightly more complicated than I thought, and I also have less
free time than I thought I would have).

(I'm not sure I understood everything you wrote correctly so you might
need to clarify a few things for me.)

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