MVC and Morphic (was: HandMorph mega mail)

Lex Spoon lex at cc.gatech.edu
Sat Mar 25 14:44:46 UTC 2000


"Stephen Pair" <spair at advantive.com> wrote:

> I agree with the ideal of keeping the domain object pure, but using MVC or
> MVP to do it is not ideal.  And, lumping domain and display stuff into one
> big Morph isn't good either.
> 

Can you explain why you don't think M-V works that well, and why roles
would be more appropriate?  I don't normally think of most graphics as
merely being "roles" of their model (even when they *have* a model).  I
think of them more as wrappers.  "Here is a View of X", not "here is X
as-a View".  A RectangleMorph is not just a certain way of looking at a
Rectangle; it is a full-fledged graphic object, which reflects some of
the properties of its model.  Furthermore, there are plenty of ways I
might have a view of a rectangle; simply asking a rectangle to give me
"yourself as-a View" wouldn't work that well.  You'd have to be more
specific.

The only awkwardness I've seen in M-V is that the model must report
every change that some viewer might possibly be interested in, and the
change is typically reported with a simple symbol.  But this just a
matter of the way changes are reported, not a deep attack against
model-view in general.  My vote is to see efforts to put something more
meaningful in the argument to #changed:, and thus make a natural
approach to GUI development even more natural.




Lex





More information about the Squeak-dev mailing list