Java Reference
In-Depth Information
Did You Know?
Operating Systems History and Objects
In 1983 the IBM PC and its “clones” dominated the PC market, and most people
ran an operating system called DOS. DOS uses what we call a “command-line
interface,” in which the user types commands at a prompt. The console window
is a similar interface. To delete a file in DOS, for example, you would give the
command “del” (short for “delete”) followed by the file name:
del data.txt
This interface can be described in simple terms as “verb noun.” In fact, if you
look at a DOS manual, you will find that it is full of verbs. This structure closely
parallels the procedural approach to programming. When we want to accomplish
some task, we issue a command (the verb) and then mention the object of the
action (the noun, the thing we want to affect).
In 1984, Apple Computer released
a new computer called a Macintosh
that used what we call a graphical
user interface, or GUI. The GUI inter-
face uses a graphical “desktop”
metaphor that has become so well
known that people now tend to forget
it is a metaphor. Later, Microsoft
brought this functionality to IBM PCs
with its Windows operating system.
To delete a file on a Macintosh or
on a Windows machine, you locate
the icon for the file and click on it. Then you have several options. You can drag
it to the trash/recycling bin, or you can select a “delete” command from the
menu. Either way, you start with the object you want to delete and then give the
command you want to perform. This is a reversal of the fundamental paradigm:
With a GUI it's “noun verb.” This different method of interaction is the core of
object-oriented programming.
Most modern programs use GUIs because we have learned that people find it
more natural to work this way. We are used to pointing at things, picking up
things, grabbing things. Starting with the object is very natural for us. This
approach has also proved to be a helpful way to structure our programs, enabling
us to divide our programs into different objects that each can do a certain task,
rather than dividing up the central task into subtasks.
 
Search WWH ::




Custom Search