home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / object / 5005 < prev    next >
Encoding:
Text File  |  1993-01-23  |  2.5 KB  |  47 lines

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!src.honeywell.com!analysis!campbell
  3. From: campbell@src.honeywell.com (Terry Campbell)
  4. Subject: Re: The difference between smalltalk/v and smalltalk/80
  5. In-Reply-To: gt0054b@prism.gatech.edu's message of Tue, 19 Jan 1993 02: 03:51 GMT
  6. Message-ID: <CAMPBELL.93Jan22131710@analysis.src.honeywell.com>
  7. Originator: campbell@analysis.src.honeywell.com
  8. Sender: news@src.honeywell.com (News interface)
  9. Nntp-Posting-Host: analysis.src.honeywell.com
  10. Organization: Honeywell Systems & Research Center, Mpls. MN, USA.
  11. References: <1993Jan13.104536.61893@qut.edu.au>
  12.     <1993Jan15.115634.62092@qut.edu.au> <1993Jan15.120050.62093@qut.edu.au>
  13.     <1993Jan19.020351.5860@cc.gatech.edu>
  14. Date: Fri, 22 Jan 1993 19:17:10 GMT
  15. Lines: 30
  16.  
  17.  
  18. In article <1993Jan19.020351.5860@cc.gatech.edu> gt0054b@prism.gatech.edu (E. J. Lee) writes:
  19.  
  20. > MVC takes the approach that there are THREE parts of an application, an
  21. > application domain part, the "model", a purely graphical part, the
  22. > "view" and a purely interactive part, the "controller".  In general,
  23. > views and controllers come in tightly linked pairs.  For instance, the
  24. > standard text editor comes with a controller specifically designed for
  25. > text editing.  Likewise SelectionInListViews have their own specific
  26. > controllers, etc.  A model will create one or more views on itself to
  27. > interpret user actions in terms of its application domain.  When a view
  28. > "opens" itself, it will create an instance of its specific controller to
  29. > handle its user input.
  30.  
  31.  
  32. >> The thing that confuses me most is the separation of view and controller.
  33. >> What would be an example of a view with multiple controllers or vice-
  34. >> versa?
  35.  
  36. I had occasion to use this paradigm in a graphical editing application I
  37. developed.  I used the typical tool pane with icons to select the drawing
  38. tools I was interested in and a graphPane for drawing.  Each tool button
  39. selected a mini-controller that interpreted user gestures in the context of
  40. the selected tool.  Thus, a line tool acted differently to clicks and drags
  41. etc, than a box tool.  Alternative ways of doing this of course include
  42. keeping a state for the application and using case statements (or dynamically
  43. dispatching via. perform:).  I found the seperation of gesture handling into
  44. multiple controllers sharing the same view to be useful as it allowed me to
  45. group related bahavior into classes.
  46.  
  47.