A BRIEF HISTORY OF OOP
Tel: (312) 4602020 / 5345 Faks: (312) 460 20 37
History of Object
Almost all major concepts of OOP, such as
objects, classes, and inheritance
hierarchies, were developed in the 1960s
language, by Norwegian Computing
In the 1970s, Alan Kay developed
language at Xerox PARC (the Palo Alto
targeted to be understandable to people
with no prior training in computer use
demonstrated by experiments conducted
using children as programmers
Bjarne Stroustrup at Bell Labs who had
learned Simula during his Ph.D. studies
developed C++ as an extension of C
Later many other OOP languages were
developed: Eiffel, Objective
Object Pascal, etc.
Since 1986 (first OOPSLA conference)
OOP is a mainstream player in the PL
domain the rather than a revolutionary one.
Why Java ?
ill explore the OOP in the context of
Java programming language.
OOP has been a hot topic for over a decade
Java has recently become the commonly
perceived embodiment of object
Java Programming Language
Java is a general purpose programming
language that can be used to create almost
any type of computer program.
Especially, it can be used to create
programs intended for execution across the
The History of Java
It was named
in 1991 at Sun Microsystems.
A computer scientist, James Gosling, developed
Oak for use in embedded consumer electronic
applications, such as VCRs.
This development purpose has determined many
of the characteristics of the language.
are key features.
The processors that run in embedded systems are
very small and has very little memory. A program
must be able to be translated into a very concise
Embedded systems should almost never fail.
Java has these features.
Pointers and goto statement were
handling is enforced to handle
the unexpected in a graceful fashion
Unfortunately, Java (or Oak) as a language
for embedded consumer electronics
at that time!
Evolution of World Wide Web
World Wide Web was developed in the
early 1990s by a small group of scientists
at a research lab in Switzerland.
As a mean of quickly communicating
research results to a physically far
set of colleagues.
To understand how Java fits into the
WWW, one must understand about the
concepts of clients and servers and the
The Internet is a classic example of a
A person using the Internet works at his or her
own computer, which runs an Internet
application, such as a
. This is called
The client application communicates over the
Internet with another computer. For example, a
Web browser might request the information on a
Web page stored on a distant computer.
This computer is the
The client computer then determines how to
display this information to the user.
In the past these programs are executed on the
server computer. The client transmitted a
request, and the server responded by executing a
program and transmitting the result.
Several performance problems occur
There exists a delay between the moment when the
client asks that a program be executed and the time
the results are returned.
Server programs often deal with many clients at
once, reducing performance.
side computing, rather than
executing the program on the server side
and transmitting the result, the server will
to the client.
The client will execute the program locally.
Program run on a less heavily loaded system
Only delay is the time to transmit the
user interactions take place
Bytecode Interpreter and Just
In Time Compilers
Client many not know what type of machine the
server is using.
The traditional concept of computer programs being
translated into machine code for a specific machine
will not work.
Java is translated into a device
This Bytecode is like a machine language for an
imaginary machine, a Java
specific machine, or
Virtual Machine (JVM)
Each computer that runs Java programs then
processes these bytecodes into a form that works
correctly on the current system.
Interpreters vs. JIT Compilers
The easiest scheme is to have an
that reads and executes
bytecodes one by one.
A better performance can be obtained by
This system takes the Java bytecodes and
translates them into the machine code
native to the client system.
These programs then run as fast as any
compiled program created specifically for
the client computer.
A program running on the client side could
have full access to the client computer
There is potential for such a program to do
significant damage, such as erasing files from
a hard drive.
Java programs use a
provided by the client.
It limits the actions that can be performed by the
Java program provided by the server.
For example, no access to the file system or access to
other machines across the Internet.
Specialization of Interfaces
The sequences of commands needed to
perform graphical operations varies greatly
from one machine to another.
The solution to this problem requires a
careful coordination between the client and
Portions of a Java program originating on
one machine, and other parts coming from
The server program is structured in terms
of generic classes, such as Window and
are the same regardless of
the type of system on which the Java
program is run.
When executed, these components create
The peer component originates on the client
system and is not part of the server
Thus, a button running on a PC will create a
, while the same program
running on a Macintoch will create a
The White Paper Description
Java is a simple,
“A buzzyword heavy description”
Java is Simple
Simpler than C++:
Far fewer special cases.
No confusing features such as overloaded
operators, independent functions, global
variables, goto statement, structures, or
Augmented with a larger library of
level development tools.
A Remark on Pointers
In many languages, there is a distinction
pointer to a value
Values are static, fixed
Pointers are dynamic quantities filled at run
There are important reasons why object
language should make heavy use of pointers.
Java does so, but implicitly. Everything is internally
Elimination of this construct removes common
errors, making it easier to construct reliable and
Java has no functions and no variables that
can exist outside of class boundaries.
Thus, all Java programs must be built out of
C++ and Object Pascal (Delphi) combine OO
features on top of an existing, non
Programmers can continue working in old,
By forcing all programs into an object
oriented structure, benefits of OO are
realized. (encapsulation, reusability)
Java is Network Savvy
The language provides a rich set of tools
for programming across a network.
The Java standard library provides classes
for describing universal resource locators
(URLs) and for execution in controlled
environments such as a World Wide Web
Java is Interpreted
Java was designed for a multicomputer execution
Any type of computer could be used as a Java
Java programs were compiled into bytecodes ,
could be stored on any type of machine. An
interpreter would read the bytecodes and execute
Interpreters are much slower in execution.
) compiler is a system that
independent bytecode and
translates them into actual machine instructions.
Java is Robust
The Java language and associated libraries
are designed to be
in the presence
of hardware and software errors.
The use of
Programmers are forced into thinking about
potential source of errors.
Java has an
It detects and recovers memory that is no
longer being used by the current running
Java is Secure
level Security System
Eliminating pointers remove the most common errors.
The Java language insists that array index values are
cheked before the are referenced.
All variables must be assigned values before being
Bytecodes are checked for common errors.
Such as they do not access classes incorrectly, overflow
or underflow the operand stack, or use illegal data
Java programs are restricted in the type of operations
they can perform.
When they execute a program brought over the network,
their local computers are safe from tampering.
Java is Architecture Neutral
Java bytecodes work with all machines.
A Java program is the same whether it runs
on a PC. a Macintosh, or a Unix system.
C++ libraries differ from one platform to
Thus, it is difficult to move programs
designed for the PC onto a Macintosh.
Java hides these application
details under a layer of abstraction in the
standard Java library.
Java is Portable
Java programs are portable because the
Java library hides architecture
concepts and bytecodes are the same for
The exact same program can be compiled
on one system, then executed on many
different types of systems.
Java is High
time compilers allow platform
dependent Java programs to be executed
with nearly the same run
as conventional compiled languages.
Java is Multithreaded
Java is one of the first languages to be
designed for multiple threads of execution
running in one program.
It is easy to set up multitasking.
The coordination of these parallel processes
is also relatively simple.
Java is Dynamic
Because Java programs move across the
Internet and execute on the user’s local
computer, they permit a degree of dynamic
behaviors impossible in older style systems.