Java Design Goals
Home ] Up ] Why Java? ] History of Java ] [ Java Design Goals ] Java vs C/C++ ] Applications vs Applets ] Java and the Internet ] Common Java Misconceptions ]

 

 

"The Java Language Environment: A White Paper" by James Gosling and Henry McGilton lists a number of buzzwords as the requirements for Java. They show a table comparing Java with Smalltalk, TCL, Perl, Shells, C and C++ using the following criteria:

Naturally, Java comes off looking good!

Here's what they meant:

Simple

  • Easy programming
  • Without a lot of esoteric training
  • Familiar -- like C++
  • Small:
    • Base interpreter and class support
    • Base standard libraries and thread support

Object-Oriented

  • Focuses design on data (objects) and on interfaces to them.
  • Java's O-O support is essentially similar to that of C++, but simplified.
  • Unlike C++, Java is pure O-O, not hybrid.

Distributed

  • Extensive class library for Internet support:
    • HTTP
    • FTP
    • etc...
  • Greatly simplifies Internet programming!

Robust

  • Intended for writing reliable programs.
  • Early checking for possible problems.
  • More strongly typed than C/C++.
  • Exceptions are used a lot, and enforced.

Secure

  • Essential for networked/distributed environments.
  • Designed to prevent viruses and other outside tampering.

Interpreted

  • Java compiler produces bytecodes
  • Java virtual machine (JVM) executes these bytecodes wherever it runs.
  • Development process can be much faster.
  • Performance tends to suffer, compared with compiled code.
  • Just-in-time (JIT) compilers improve performance considerably.

Dynamic

  • Designed to adapt to an evolving environment.
  • Can add code to a running program!
  • Provides run-time type information.
  • JDK 1.1 adds powerful reflection capabilities.

Portable

  • Primitive data types have the same size and representation on all systems
  • Strings are stored in a standard Unicode format (internationalization)
  • Classes for windows, network access, etc., work across platforms.
  • Original AWT classes produced mediocre look and feel across platforms.
  • JDK 1.1 provides AWT enhancements and additional class libraries which should improve matters greatly.

Architecture Neutral

  • Java compiler produces bytecodes, which are not machine-specific
  • Bytecode instruction set works well with today's machines.
  • Java machines have been built which execute the Java bytecode instruction set as native code.

Multithreaded

  • Ability to "do more than one thing at a time".
  • Can produce better responsiveness and real-time behavior.
  • Thread support built into the language.
  • Some JVM implementations better than others in terms of multithreading.

Exceptions

  • Much better error handling than conventional approaches.
  • Forces the programmer to deal with potential errors and/or abnormal conditions.
  • Exceptions are part of the interface to an object.

High Performance

  • Some current Java implementations are not high performance.
  • Some are better than others (JIT compilers can make a big difference)
  • Situation will improve over time, with competition -- it's already happening.

 

This page was last modified on 02 October, 2007