Re: How do you develop you GTK code?



I have found glade to be (mostly) a blessing and
(occasionally) a curse.

My app is 100% in glade, (and it's moderately sized,
about 25,000 lines), and having the gui elements be
loadable on demand is a key point to my app (as it
adapts during runtime).  It allows me to rapdily alter
the gui to improve usability, layout, etc. and ALSO
lowers the barrier to entry for outsiders (i.e. non
programmers) to alter the gui in ways I did not
envision.

It has downfalls,  but if I had to take the choice of
hardcoding my entire gui in code (which I had done at
one time and it became unmanageable and bloated),  or
using glade, and working around it's deficiencies,  I
would take the glade route every time.


--- David Neèas (Yeti) <yeti physics muni cz> wrote:

> On Tue, Apr 17, 2007 at 10:42:08AM -0400, Tristan
> Van Berkom wrote:
> > 
> > If your program is a long term investment and
> undergoes frequent
> > refactoring, then do it now :) you will
> significantly improve your
> > code's legibility, reduce lots of code and as
> such; add value
> > to your product, this is not just my pointed
> opinion - libglade
> > reduces complexity from your code
> 
> It redistributes complexity to other places and to
> relations
> between the code and the other places, if that is
> what you
> mean by `reducing complexity from your code',
> however it
> does not reduce the total.  The typical recommended
> use
> scatters strongly coupled information to distant
> places,
> destroys modularity and discourages refactoring into
> functional (reusable) units such as custom widgets
> and other
> classes. If the interface changes dynamically and/or
> it
> reflects some data structures (unknown at compile
> time),
> adding libglade into that is just a recipe for
> headache.
> 
> > the fact that you can later dynamically change
> > your UI using a designer tool without editing your
> source code is
> > only added sugar.
> 
> Whether this is a featue or bug is yet to be
> determined.
> 
> > Consider that adding a user visible feature to
> your
> > program will become a matter of:
> >    a.) Adding a control widget to your GUI with a
> designer tool and then
> >    b.) Adding a callback function that will
> interface with your core
> >        application code to perform a task, maybe
> also 
> >    c.) Fetching a widget pointer from the libglade
> built hierarchy to
> >        provide the user with feedback from the
> core. 
> 
> The code representing the dynamics of the user
> interface
> forms the bulk of the code, accounts for almost all
> the
> complexity and often shares bits with construction
> code.
> If simplifying construction -- the easy and
> straightforward
> part -- radically simplifies your program, your
> program is
> most likely Hello world.
> 
> c) in its typical use is global variables in
> disguise (a
> flat pool with everything).
> 
> Yeti
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 


-- David J. Andruczyk

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



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