From: Chris Gehlker Date: 2002-01-23T14:05:29+09:00 Subject: Re: OOP UI Design On 1/22/02 6:37 PM, "Thomas Hurst" wrote: > * Bryan Murphy (bryan@terralab.com) wrote: > >> MVC seperation of content, logic, and presentation > > http://www.javaworld.com/javaworld/jw-07-1999/jw-07-toolbox.html > > "Non-object-oriented approach #1: Model-View-Controller" > > "This extract-data-then-shove-it-elsewhere approach requires you to know > way too much about how the model-level objects are implemented. A system > based on that approach cannot be called object- oriented: there's just > too much data flowing around for the system to be maintainable." > > Anyone have comments? How do you impliment your user interfaces to > objects? Ho Hum. Yet another young Turk who knows a whole bunch more about OO programming than Alan Kay who both coined the term 'Object Oriented' and first formally described the MVC pattern. Kay must have been drinking cleaning solvents when he said that they were intimately related. Holub doesn't seem to really understand MVC (Frame is not a Controller) and he confuses limitations in current Java tools with flaws in the MVC approach. The most foolish 'rule' he proposes is that "all objects must implement their own UI." I strive for "The fundamental logic of the program must know *nothing* about the UI" This gives me freedom to change the UI at will without breaking the program. It also allows me to make the program accessible to scripting as well as to the user sitting at the terminal. He asks the right question, 'what if I want to change the interface from mouse/keyboard to pen based or voice recognition?', without facing the obvious conclusion that if "all objects must implement their own UI", he just broke them all. If he had used MVC he wouldn't need to modify his model at all, he could grab off the shelf pen or voice recognition code, and just re-write his controller. His application would also still respond to the same scripts. For a criticism of MVC that I find flawed but much more compelling, look at some of the folks writing about Morphic. -- The secret of life is honesty and fair dealing. If you can fake that, you've got it made. -Groucho Marx