comp.lang.ada
 help / color / mirror / Atom feed
* GUI in one package or several child packages?
@ 2005-02-10 14:47 Preben Randhol
  2005-02-10 15:21 ` Jacob Sparre Andersen
  0 siblings, 1 reply; 3+ messages in thread
From: Preben Randhol @ 2005-02-10 14:47 UTC (permalink / raw)


Hi

If one use glade to make GtkAda GUI one get all the gui in one package
for the whole program. If we now don't include dialogs etc... but only
look at a case with a main window and a lot of different features: 

   What are the arguments to keep the whole GUI in one package.
   What are the arguments to split it up into child packages belong to
   the different featuers.

Simple example of packages :

      List
      Search
      Edit
      Compare
      Print
      Gui      (Contains all the gui)

      opposed to:

      List
      List.gui
      Search
      Search.gui
      Edit
      Edit.gui
      Compare
      Compare.gui
      Print
      Print.gui
      Gui      (containing the basics)

What I'm thinking mostly of is maintainability and scalability. I guess
people here has experienced from larger projects that has stretched over
some time.

I see advantages and dissadvantages in both, so I'm asking to get some
new ideas...

Preben



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GUI in one package or several child packages?
  2005-02-10 14:47 GUI in one package or several child packages? Preben Randhol
@ 2005-02-10 15:21 ` Jacob Sparre Andersen
  2005-02-10 17:15   ` Preben Randhol
  0 siblings, 1 reply; 3+ messages in thread
From: Jacob Sparre Andersen @ 2005-02-10 15:21 UTC (permalink / raw)


Preben Randhol wrote:

> If one use glade to make GtkAda GUI one get all the gui in one
> package for the whole program. If we now don't include dialogs
> etc... but only look at a case with a main window and a lot of
> different features:
> 
>    What are the arguments to keep the whole GUI in one package.
>    What are the arguments to split it up into child packages belong
>    to the different featuers.

I have made it a habit to use GLADE for prototyping.  Once I have a
part of the GUI looking about right, I try to organise it in sensible
packages.  Things which seem to be reusable are named as child
packages of GtkAda, while more specific parts are kept in packages
related to the project.

I find it hard to see any arguments for keeping the whole GUI in one
package.  As far as I can see, there is nothing that makes the GUI
part of a program sufficiently different from other parts of a
program, to make it sensible to ignore the general rule of separating
code out in units with well-defined (and minimal) interactions with
the remainder of the program.

Jacob
-- 
CHRES(1)                                            CHRES(1)

NAME
       chres - change response strategy

SYNOPSIS
       chres MODE

OPTIONS

       -b, --bitter
              only answers to exactly what was asked

       -f, --friendly
              tells people what they need to know

       -p, --politician
              tells people what they should know



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GUI in one package or several child packages?
  2005-02-10 15:21 ` Jacob Sparre Andersen
@ 2005-02-10 17:15   ` Preben Randhol
  0 siblings, 0 replies; 3+ messages in thread
From: Preben Randhol @ 2005-02-10 17:15 UTC (permalink / raw)


On 2005-02-10, Jacob Sparre Andersen <sparre@nbi.dk> wrote:
> I have made it a habit to use GLADE for prototyping.  Once I have a
> part of the GUI looking about right, I try to organise it in sensible
> packages.  Things which seem to be reusable are named as child
> packages of GtkAda, while more specific parts are kept in packages
> related to the project.

Yes I also have done it this way so far...

> I find it hard to see any arguments for keeping the whole GUI in one
> package.  As far as I can see, there is nothing that makes the GUI
> part of a program sufficiently different from other parts of a
> program, to make it sensible to ignore the general rule of separating
> code out in units with well-defined (and minimal) interactions with
> the remainder of the program.

One drawback is of course the increased dependencies. I mean if going to
a screen for editing you might want to change menus of the main window
while when you go back to another function you want to change them
back...

Another problem is that one end up with:

List.gui
List.gui.callbacks
Edit.gui
Edit.gui.callbacks

etc...

I still think the child package model is better eventhough it generates
more work, but I'm not 100% sure...

Pr:ben



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-10 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-10 14:47 GUI in one package or several child packages? Preben Randhol
2005-02-10 15:21 ` Jacob Sparre Andersen
2005-02-10 17:15   ` Preben Randhol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox