On Feb 15, 2007, at 4:01 PM, [EMAIL PROTECTED] wrote:
"Wesley W. Terpstra" <[EMAIL PROTECTED]> wrote:
The approach I'd much prefer is to register a trigger to update
the GUI...
Note that the trigger runs on the client-side of the process that
makes the change - not on the client side of the process that is
implementing the GUI.
Yes, I'm aware of this limitation. There will only be one database
user: the application itself.
You might implement something like [UndoRedo] then have your GUI
process poll only changes table. The changes table will normally
be empty, except after some other process makes a change. So when
the changes table is non-empty, that is the GUI process's cue to
redraw its screen based on the latest database content.
You are assuming I intend to track changes from another application.
I do not. I already know when a change happens; I made it. So, I
don't need a log to tell me when to refresh.
My goals are:
1. simplify reasoning about the application (this program will be
bloated and grotesque in short order, so I want to be responsible for
as little cross-component interaction as possible)
2. avoid the cost of refreshing big tree widgets with thousands of
entries (polling doesn't give me a 'diff')
You suggestion helps with #2, but so would putting triggers on the
base tables as Michael suggested. His suggestion doesn't completely
address concern #1, but it is certainly a step in the right direction
(it's not too hard to reason about which base tables can affect the
view if you have the query).
As an example: in an instant messenger a new text message arrives.
The application puts it into the message log. The chat window
automatically updates with the new text. The statistics window about
total # of messages updates. Possibly other things happen. The point
is I don't want to have to think about the 'possible other things'.
If the program gets fat, I'll screw this up.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------