
                     DUI -- Data Under the Interface
                   (aka DWI -- Data With Interaction)
                   ----------------------------------

This is a fairly simple environment for quickly creating data-driven 
applications, that is, graphical applications that manipulate
and show info from a database.  This environment differs from others in
that it is focused on native GTK/Gnome support through the Glade GUI 
designer, and thus allows you to build user interfaces as elegant as 
you can make them in Glade.

At this point, this system is not feature-rich, but it should be 
adequate for creating basic form-editing and reporting applications.
Multiple SQL databases are supported through an ODBC driver.  If you don't
like accessing Postgres through ODBC, note that it shouldn't be very
hard to add a native Postgres driver, or even a non-SQL database driver.

The actual connection between the database fields and the glade widgets 
is described in an XML-based "DWI" file.  Currently, the only way to create
DWI files is by hand.  Unfortunately, this can be a fairly long and 
laborious process itself, especially when creating something a bit
more sophisticated.  In the future, we hope to have an extension to Glade,
or possibly an extension to a database-browsing tool that will allow you
to graphically make such connections.

Note that the design of the XML format is sufficiently generic that it 
is not directly tied to Glade.  It is envisioned that it could be used
to create data-driven web pages.  That is, Glade is currently the only
GUI driver, but other drivers for other GUI's should be possible.

==================================
A basic example, with more-or-less complete documentation, can be found in 
the "testbasic.dui" example.  This file describes the database-to-interface 
coupling is in an XML format.   It can be run with the "dwi-run" interpreter:

$  ./dwi-run testbasic.dui

Note, however, you will need to setup the database first.  If you're using 
Postgres, then run the following Postgres commands:

createdb testbasic
cat testbasic.sql |psql testbasic

You will also need to setup odbc to access this database.

==================================

The testwidgets.dui example demonstrates how to use over a dozen
different widgets, including menus, combo-boxes, sliders, etc. 

==================================

DWI is currently for gnome-1.4 only.  A port to gnome-2.0 will come someday.

==================================
Compiling & Pre-requisites

DWI requires libglade (of course, it get at the glade widgets).
DWI requires glib-2.0 (in order to bootstrap itself).
(actually, not yet)

==================================

A pre-alpha attempt at building a graphical editor for DWI can be found
in glade/connector.*  It doesn't do much, yet.

==================================
Theoretical comments:
---------------------
Note that the DWI design is fundamentally "declarative"; i.e. it works like
a declarative language (e.g. Mercury).  The nature of the interface is 
declared in the XML file.  The "run-dwi" evaluator reads in this static
file, sets up structures that correspond to the XML declaration.  Then
the evaluator goes into the main loop, and signals and events make 
everything happens according to the pre-determined definitions in the
XML file.   There is no run-time interpretation. There is no 'just-in-time'
compilation.  It just runs along the fixed paths,  where each path had
been pre-defined in the XML file, and each run-through is initiated by 
the user clicking or typing in the GUI.


Linas Vepstas
March 2002


