On Mon, 26 Nov 2001 23:29, Ulrich Mayring wrote: > Peter Donald wrote: > > I have a kinda different view. IMHO all GUI apps should be designed to be > > passive - only respond to events. Whether the initiater of these events > > is a user, a database or whatever should be irrelevent. > > > > Unfortunately this is rarely the case - most GUI apps put their logic > > inside their event handlers (ug) rather than separating it into separate > > logic components. Because of this the view code becomes so interwoven > > with the logic most people assume it has to be this way ;( > > I believe you're saying that instead of responding to XML data the GUI > could also respond to events and that would be an equivalent model of a > data-driven application. I think that is correct in specific cases, but > consider the content of events and XML data. An event is something like > "Button 3 pressed" or "Pull-down menu 1, item 4 activated" - an > inherently layout-oriented process.
Not how I model it ;) My events (maybe the term action would be better) usually consist of things such as * list people in crew X * remove person 2 from crew X * create task X * create task X with params 1, 2 and 3 * create crew template X from crew 2 * dispath crew 1 to task 3 ... I try to separate my domain events/actions/whatever completely from my presentation layer. GUI events only serve as glue and I usually just extract all the parameters from them and delegate to the "real" event. > If I write XML that encodes these > events, then that's just a matter of putting angle brackets around the > events. In that case there is a conceptual equivalency between events > and XML data. However, I think that XML data makes it possible to use a > semantically richer event content that is not layout-oriented, but > data-oriented. Then, every time I change the data model, the GUI would > adapt automatically. agreed. -- Cheers, Pete -------------------------------------------------- "An intellectual is someone who has been educated beyond their intelligence." -------------------------------------------------- -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>