From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,64c3c2eecb97862b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada From: Preben Randhol Subject: Re: GUI in one package or several child packages? References: Organization: PVV User-Agent: slrn/0.9.8.1 (Debian) NNTP-Posting-Host: 31.80-202-208.nextgentel.com X-Original-NNTP-Posting-Host: 31.80-202-208.nextgentel.com Message-ID: <420b96a9$1@news.broadpark.no> Date: 10 Feb 2005 18:15:21 +0100 X-Trace: news.broadpark.no 1108055721 31.80-202-208.nextgentel.com (10 Feb 2005 18:15:21 +0100) Path: g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!nntp.gblx.net!nntp3.phx1!news.broadpark.no Xref: g2news1.google.com comp.lang.ada:8227 Date: 2005-02-10T18:15:21+01:00 List-Id: On 2005-02-10, Jacob Sparre Andersen 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