Model-View separation in WindowBuilder 
Author Message
 Model-View separation in WindowBuilder

I should address this directly to Eric Clayburg, but I'll take any
reasonable suggestions.   My question is how to implement the classic
model-view dependency using WindowBuilder in VisualAge.  VW has
aspectAdapters and VA has attribute-attribute connections.  Both of these
environments are based on the premise that the model is the "source" and the
view is a "dependent" of the model object.  However, the POSIX/X-Window
standard, which is the basis for the Common Widget architecture, has a
"client-server" premise.  Therefore, callbacks are used to inform the
"application" that high level events have occurred.  I have played with the
WindowBuilder environment enough to know that the "application" is the GUI
class that inherits from the WbApplication hierarchy.   I would like to
maintain the model-view dependency mechanism, but it doesn't seem to "fit"
this framework.  A concrete example:
I have a customer class that has two instance variables: firstName,
lastName.  I have a gui that displays the two instance variables in text
entry widgets.  In the "model-view" world the customer class setters also
publish events, which other objects (typically the gui) can register on as
dependents.  If the instance variables change, the gui reflects the change
through the dependency mechanism.  However, in the "client-server" version,
the setters do not call the #signalEvent:with: methods.  In fact, everything
seems to be "widget-centric".  The "application" (gui) registers for a
callback, the callback method calls the model to update its values, but
there is no dependency.  So if some other object updates my customer's
firstName, there doesn't seem to be a way to force the gui to update the
value on the screen.  Let me go one step further, VA and VW also have
mechanisms so that I can create a customer "value holder" which I can
"connect up" to the gui.  Whenever I change the value of the "customer value
holder" the gui reflects the new customer's information.  I do not see
anything like that in the Common Widget architecture.  I am missing

Gary Owsiany

Wed, 23 Mar 2005 10:58:08 GMT  
 [ 1 post ] 

 Relevant Pages 

1. C++/Views: A Model-View-Controller Library for C++

2. The View menu in WindowBuilder Pro

3. MVP question: multiple views of the same model

4. Looking for implementation info on Composite Model-View-Controller architecture

5. Model View Controller

6. Model View Controller

7. Looking for info about Model-View-Controller paradigm

8. Viewing as wireframe models in CP2.0

9. Model View Controller and Ada 95

10. Model View Presenter GUI pattern?

11. Model-View-Controller

12. The origin of Model-View-Controller


Powered by phpBB® Forum Software