references:
'Design Patterns',Gamma,Helm,Johnson&Vlissides,'Thinking
in Java',
Bruce Eckels, 'Just Java' ,P.Linden,
'Operating Systems', Tanenbaum & Woodhull
The Co-evolution of PCs, GUIs, Languages & Object-Oriented Thinking
The following is an
attempt to link the developments that
were taking place
in computing that lead to the creation of
the environment in which
the Java language was
born.
Evolution of the Machine
Just for a
landmark, Tanenbaum and Woodhull note the first
true digital
computer was
designed by Charles Babbage
(1792 - 1871). Babbage spent most of his
life trying to
make it work. It never worked right because of it's entirely
mechanical
design. From
the same source, Babbage hired
the daughter of the British poet, Lord
Byron, Ada
Lovelace,
to create a form of software that would be used to direct
the
machine.
// perhaps a
scroll like those that controlled player pianos.
By the mid-forties,
giant computers that filled rooms were
built using
vacuum tube
technology. Despite their size,
they were slower than today's cheapest
computers.
In
these days, the machines were programmed in absolute
machine language.
A
programmer would sign in to use the
computer and actually bring his or her own
plug-board to
manipulate the machine. At this point in time, the idea
of
programming
languages didn't exist yet.
// ~
late 1940s
By the mid 1950s
computers were reliable enough to be
manufactured and
sold but only
to universities, governments
and large corperations who could afford their
multimillion dollar
price
tags. To run a 'job'
as they were called then, a
programmer
would first write the program by hand on paper in Fortran
or
Assembler,
then punch the program onto punch cards. The
cards would then
be handed to an operator working in the
input
room.
If the Fortran compiler was needed,
the operator would
go to a cabinet and take out
a tray of punch cards holding
the Fortran
compiler and read it into the machine. An
inexpensive
machine could be used (IBM 1401)
to read
the cards which would copy the results
to tape. The tape
would be read by an
expensive computer (like an IBM 7094)
which would
output to tape. The tape then
would be carried
over to another 1401 and output
would be sent to the printer.
Stages In Running a Program in the Early
Days of Computing
1 ) Programmer
prepares punch cards -give to operator->
2 ) Operator loads tray of cards that are the Fortran compiler -->
3 ) Reads cards to tape on an IBM 1401 - operator
transfers tape->
4 ) The tape is read by an IBM 7094 -->
5 ) Writes output to tape - operator
transfers tape->
6 ) Tape output is read by IBM 1401 -->
7 ) Output sent to printer
//
things have improved!
1960s and Unix
By the 1960s the first computer designed to run
both
commercial and scientific computers
were invented,
the IBM 360. It was built using
integrated circuits (ICs).
An enormous
and extremely complex operating system
was designed
to coordinate it's activities, OS/360.
Later MIT, Bell Labs and GE embarked on the
development
of the computer utility
designed to support hundreds of
simultaneous
time sharing users. The system was called
MULTICS (Multiplexed
Information and Computing Service).
The designers envisioned
a huge machine providing
computing power to everyone
in Boston. Eventually Multics
ran
on dozens of sites and had enormous influence
on
subsequent operating systems.
At this time the
mini-computer was becoming popular
starting with the
DEC PDP-1. At
$120,000 a machine,
they 'sold like hot cakes',
(using the words of Tanenbaum
& Woodhull. )
Ken Thompson, who had worked on MULTICS, set
out to
write a stripped down, one
user version of MULTICS to run
on a PDP-7. This
would later become the UNIX operating
system.
The beginnings of Graphical User Interfaces
The most famous
location associated with the beginnings
of graphical
user interfaces was
the Xerox Research Center
at Palo Alto California (PARC). In fact,
many computer
scientists
were experimenting with graphical user interfaces
at this time.
One of the oldest references to
a graphical system is a
PhD thesis written by
I.E.
Sutherland in 1963 called
'Sketchpad:
A
Man-Machine Graphical Communication
System.'.
J.
Raskin in his 1967
thesis argued
that computers should
be all-graphic, creating characters graphically
and in various
fonts so
'What You See on screen Is What You Get in print.
(WYSIWYG). His thesis, "The
Quickdraw System"
would
provide the moniker for Apple's Macintosh GUI drawing
toolbox.
Personal Computer Advances Made GUIs Viable
From the debut of
the IBM PC in ~ 1982, the power of
the PC is increased
steadily in processing
speed memory
capacity. Using graphical user interfaces would probably
have stayed an academic
exercise, without the great
strides the PC computer technology. PCs
made the wide
scale use
of graphical user interfaces feasible and now
what we consider to be
the norm.
Evolution of Computer Languages
It should be said
that the limits of early computers put
many constraints
on the pioneer writers
of computer
languages. In the early, pre-language days of computers
it was necessary to
optimize all the memory the system
had to offer. It is telling that
the Y2K bug ( of year 2000 )
derived
from early designers saving two bytes of memory
in describing the year
in the computer's clock.
There was
a need to emphasis the efficient use of memory and
processor ability.
Advances in memory
and CPU technology gradually
allowed designers to
take coding to
higher language levels,
gradually changing the focus from how the machine
sees
things to
how people see things. Eventually, computer
progress allowed developers
to take a graphical
approach
to interfacing man to machine. Continuing advances and
economies
in hardware
allowed graphical user interfaces
to move from the academic to wide
scale, commercial
use.
The focus on graphical user interfaces in turn helped
to alter how
computer languages were
evolving.
Writing graphical
components led to the observation that
problems
were recurring that
begged for better solutions.
For instance, many similar
graphical components were
being re-created over and over again. A model that allowed
code to
be easily reused was needed.
Another
observation, was that various graphical components
might differ
in the detail of their
appearance but essentially
were the same device.A button is very much
like a checkbox
for
instance.
Rather than
reworking a new but similar component,
a way
of extending
the general characteristics of one control to
another would be
helpful. The
components of new GUIs
were perfect candidates for the new object-oriented
design
approach that appeared at this time. The object-oriented
thinking was connected to the evoluting state of the art in
computers and computer languages.
//
these ideas are also developed further in design patterns
The Growth of Abstraction
Bruce Eckel in his
text 'Thinking in Java' describes the
'progress of
abstraction'. Assembly
language he states is
a small abstraction of the underlying machine.
Command
languages like
FORTRAN, BASIC, PASCAL and
C are
abstractions of Assembly. These higher level
languages
provide great advantages over Assembly but still required
the programmer to adapt
problems to the way the computer
worked rather than being free to
consider the problem
free
of this restriction, as a human thinks. An effort was required
to map the
problem from the human problem domain to the
machine domain. The whole
process led to
a lot of error
prone code that was difficult to write, read to maintain.
//
mapping from the human domain to the
// machine domain was an error-prone process
Modelling the Problem
The next step in
language evolution was to focus
the syntax
of the language to modeling the problem.
Mapping to the
machine could be done behind the scenes. Early languages
like LISP ,
APL and
PROLOG
used
themes to model the
world into programs.
Lisp was based on
the premise that
all problems could be
described as lists, APL that all
problems could be described
in terms of
algorithms.
PROLOG modeled problems as
chains of decisions.
While all were good approaches, each
was inherently limited
in what type of problem
they were suited
to solve.
Modelling in Objects
The object-oriented
approach takes abstraction to a higher
degree of abstraction providing
a means for describing
problem almost entirely in terms of the problem itself.
The connection
back to the computer is
done through
the definition of objects. Objects serve to interface
the
world perception to the
machine, where real world
characteristics and behavior map to computer
language
states and
operations.
Simula-67 and
Smalltalk
Alan Kay, an Apple distinguished Fellow, and OO
pioneer
stated that Simula-67 was
the first OO
language. It's name
self-describes that it was developed circa 1967. The
first
successful object-oriented language was
Smalltalk enjoying
widespread
popularity and is one of the languages on which
Java's
based.
Eckel uses Alan Kay's summary to describe
the five basic characteristics
of Smalltalk.
1. Everything is an
object
2. A program is a group of objects messaging each other.
3. Each object can be made up of other objects.
4. Every object has a type. Each object is a class instance
where class
is synonymous with type.
C++
About the time
SmallTalk was released in 1980, Bjarne
Stroustrup,
working at the AT&T
Bell Labs began adding
object-oriented extensions to the C language.
He designed
C++ so
that it could be translated to run to be compiled on
a C compiler.
By the late 80s and early
1990s, C++ was in
popular use. Java was, in large measure,
built on C++,
using the same
C style syntax but removing elements that
have proven to be error prone
or problematic.
( Ken Thompson was the inventor of Unix. He also
wrote the 'B' programming language, the precursor of
Dennis Ritchie's C language. )
Model View Controller Architecture
In Smalltalk-80 the Model/View/Controller
pattern was
used to build the user
interfaces. The Model is the
application
object, the View, it's
screen
representation and
the Controller
supplied the interactive aspects of the design. Decoupling
these parts of a
component was new at the time and added
a great deal of flexibility
to the GUI.
For instance
in a music program, midi data (representing
pitch, volume, note time
length, type of voice)
can be
represented in different views, one perhaps as a piano
scroll
another as a musical score.
The same data is used
to produce different views. Another example might
be
data for a chart
where a number of variables represent
percentages. The percentage
data can be represented
in
a bar graph or as a pie diagram or simply in a table. Again
one
set of data is represented in
different views.
This model has been
widely copied. Microsoft uses an
almost identical
system except adding
a Document
object. The
Swing components, derivatives of Netscape's
Internet Foundation
classes have also been modeled
using Smalltalk's Model View Controller
Architecture.
Design Patterns
" Clients should be able to create
a window without committing to a
concrete implementation Only the window implementation
should
depend on the platform on which the application runs.
Therefore the
client
code should instantiate windows without mentioning specific
platforms."
quote from 'Design
Patterns', Gamma,Helm,
Johnson&Vlissides,
discussion of the Bridge Pattern
This quote is from the widely referenced text,
'Design
Patterns'. This quote is in step
with Java's approach
which on a grand scale treats
each platform as an concrete
implementation
of an abstract Java Virtual Machine, or
JVM.
The Design Patterns book was published in 1995.
It is
a way of thinking in objects at the
framework level. The
book describes a methodology
for abstracting and identify
often used,
programming and framework patterns. The
book
describes a set procedure for cataloging
these patterns
to facilitate their reuse. Included are 23 such patterns that
recur
regularly in programming. These patterns are
frequently
referenced in Java literature.
The Design Patterns text provides a great snap
shot of
the culmination of object-oriented
thought prevalent during
the time the Java language
was written. (It would still have
been
called Oak then). In fact many of the patterns
and
nomenclature found in the Design Patterns
text are evident
in the Java API as it exists
at present. (Java wasn't released
yet at the time the
Gamma, Helm, Johnson, & Vlissides
book was
published. The authors of Design Patterns used
SmallTalk
and C++ to example their patterns.)
Conclusion: Java In Context
The landmark
releases of SmallTalk in 1980 and the
IBM PC in 1982 marked
the beginning
of a partnership
of machine, object-oriented thinking and graphical
user
interfaces. This trend
by 1990 had grown into the
mainstream of computing language thinking.
Add the
release and
popularization of the C++ programming
language and you have a picture
of the historical and
intellectual context from which James Gosling would
be writing Java.
Gosling's finished
product, Java, is a product of it's time.
It inherits
many of the best ideas of
object-oriented thinking
that have co-evolved in partnership with graphical
user
interfaces and
computer hardware. The Java Swing API
is an applied example of a Graphical
User Interface
based
on the Model View Controller architecture which originated
in
Smalltalk. The design
patterns illustrated by Gamma and
company are evident in many places
in the Java libraries.
Java builds on Bjarne Stroustrups extension of the C
language, C++.
Java is clearly a work tied to the times
in which it
was created.
In 1991 a group of
Sun engineers led by James Gosling
and Patrick Naughton
set out to create
a small computer
language for consumer devices. Because CPU's built by
different manufacturer's might be used in such a device
Gosling and the team wanted the language to be 'platform
independent'.
The project
was code named
Green. They resurrected
USCD
Pascal, pioneered by Niklaus Wirth.
This language
generated
intermediate code for a hypothetical machine,
often called a Virtual
Machine, (hence the JVM or
Java
Virtual Machine). The intermediate code could be used on
any machine
that deployed the
interpreter. There was an
architectural advantage to using this sort of layering as
both the intermediate code and
the interpreter could be
kept
quite small.
Because the Sun
people were from a C/Unix background,
they based their language
on C++. Gosling at first called
the language 'Oak', but having discovered
another computer
programming language was named
'Oak' the name was
changed to 'Java'.
//
probably relates to the coffee a steaming cup
// of coffee is a symbol used for Java at Sun
The Green project
developed a 'smart' remote control
which to their disappointment control no one seemed to
want at the time.
The group dissolved in
1994.
// "
out of the ashes . . . "
Meanwhile
Meanwhile, in 1994,
Mosaic was the most popular browser,
a non-commercial
browser
developed at the University of
Illinois. (Mosaic was partly written
by Marc Andressen
for $6.85
an hour while he was an undergraduate student.
He later co-founded Netscape.)
Gosling realized
they the Java code they developed could
be adapted to building a browser so they decided to create
one. The original
was built by Patrick Naughton and Jonathan
Payne and evolved into the
' HotJava ' browser. Partly to
provide something to show, the browser was given the ability
to interpret the intermediary
bytecode of applets
written in
Java. The demo of applets being displayed in the 'HotJava'
browser at 'SunWorld' of
1995 is thought to have been the
'flash point' which started the popular movement to adopt
Java that has led us to where Java is today.
Breakthrough Point
The breakthough in
Java's use is attributed to Netscape'
adoption of
Java in their 1996 version
2.0 browser. The
technology was licenced by IBM, Symantec, Inprise
and
Microsoft. Release of
Java proceeded from version 1.x to
1.1.x to the release of 1.2.x in
1998. By 2000 there were
three releases of the the JDK, Enterprise, Standard and
Micro, in JKK version 1.3. At this time,
2008
the standard
JDK is in version 6.
The Design text also references work by OO pioneers
like
James Raumbaugh and Grady Booch
whose object modeling
techniques, along with
those of Ivar Jacobson, provide the
basis for the
Unified Modeling Language (UML)
being a
administered by the Object
Management Group (OMG).
UML is a language independent, visual
modeling language
which takes object-oriented thinking in new directions.