Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!bellcore-2!bellcore!roland!sjs From: sjs@roland.ctt.bellcore.com (Stan Switzer) Newsgroups: comp.object Subject: Re: Should Shapes Display Themselves? Message-ID: <26011@bellcore.bellcore.com> Date: 10 Aug 90 13:27:53 GMT References: <1681@dinl.mmc.UUCP> <25966@bellcore.bellcore.com> <10885@crdgw1.crd.ge.com> Sender: news@bellcore.bellcore.com Reply-To: sjs@bellcore.com (Stan Switzer) Organization: Bellcore Lines: 39 > >>QUESTION: Should a `Shape' be able to `draw' itself? > >>The usual answer is ABSOLUTELY....However: what if I add a new terminal > >>type? Or what if I want a textual `view' (using MVC terminology) rather > >>than a graphical `view'? Well, OK then. A shape should be able to display itself. Trouble is, unless you are implementing a drawing editor (aren't there enough already?) you aren't likely to come across an actual "shape" object. You are more far likely to come across an object like "Set_Of_Automobile_Parts". It will probably be necessary to display this object. I propose that it makes a lot of sense to define technology-dependent classes like "Sequence_Displayer" which can display sequences of things (w/ scrolling, etc.) It really doesn't make sense to put display logic in the sequence class (except, *maybe*, a textual display method for debugging purposes). This is a common error in graphical interface systems. People define menu classes as a subclass of "Display_Region" when it should be a subclass of "Sequence" or "Dictionary." Stepstone's ICPak 201 got this right, though it took me quite a while to see it. Anyway, when I originally proposed this thread, I said: > Leaving aside objects which are explicitly intended as display > artifacts (windows, menus, etc.) and considering application domain > objects such as personnel files, tractors, and fishing boats, should > these objects be concerned with how they are displayed or should we > separate the objects (models) from views? I've received a number of interesting email responses so far. I'll summarize in a subsequent note. Also, does somebody have any good references on the Model-View-Controller paradigm? There seems to be a dearth of published information. Thanks, Stan Switzer sjs@bellcore.com