Re: high level application frameworkl
- From: Daniel Kasak <dkasak nusconsulting com au>
- To: Dirk Koopman <djk tobit co uk>, GTK2-Perl List <gtk-perl-list gnome org>
- Subject: Re: high level application frameworkl
- Date: Wed, 26 Jul 2006 08:43:22 +1000
Dirk Koopman wrote:
On Tue, 2006-07-25 at 09:37 +1000, Daniel Kasak wrote:
Dirk Koopman wrote:
For many years (about 26) I have used an "application framework" of my
own devising (in various incarnations) for separating "business
logic" [ugh] and data manipulation, completely, from visual
representation on "curses" based terminals.
It allows programmers to say things like: take these data fields
Gtk2::Ex::DBI ... links to ...
Who says there is any SQL (or ISAM or files) involved?
The bit about 'take these data fields' said to me that you'd be storing
stuff in a database. If you're not, then apologies ...
then tell me if these values are
entered or those keys are pressed;
Either connect to the 'changed' signal of each widget and do things
while the user is inputting data, or pull all the values at once when
the data entry is complete and the user hits 'apply'. With Gtk2::Ex::DBI
you can do all this by defining a 'before_apply' callback which is run
before the record is applied.
And at this point it all goes pear shaped, because we are thinking the
wrong way up. Also I want fine grained control *during* the form and I
don't wish to get into the minutia of gtk style callbacks (under the
hood things will be calling back like billy-ho) but for the programmer
this must all be seamless (and very, very easy).
This is pretty strange logic. If the programmer doesn't tie everything
together, then who exactly is going to do it? If you want fine-grained
control over things, then that will require you to write some code, yes.
The point is to do it once, correctly, and reuse the code.
The programmer thinks in terms of the field (or data if you will); he
isn't interested, nor does he know, that it will indeed be implemented
with the sort of callback you describe.
The Gtk part is the widget set
that *implements* the data model and programming abstraction that I am
trying to describe.
Gtk isn't implementing any data model in a hurry. It's a widget toolkit,
and knows *very* little about data. Your data model should be provided
solely by *you*. You can build custom widgets to do validation on data
as the user enters it, but again, this is provided by *you*. Gtk is for
building the GUI. Only. What you seem to be more interested in is
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au
] [Thread Prev