-
Fiction: Java is a programming language.
Fact: Java is not simply a programming language,
but a development and execution environment consisting of
- a Java Virtual Machine
(JVM)
- a programming language
(Java)
- a Java Development Kit of tools and utilities
(JDK)
- a set of Application Program Interfaces
(API),
or "class libraries"
-
Fiction: Java is good mostly for writing applets for Web pages.
Fact: Java is superb for developing
- traditional stand-alone applications (desktop to mainframe),
- course-grained parallel processing applications (multi-threading),
- network-based distributed applications
(RMI),
- one to n-tier database applications
(JDBC),
- embedded hardware-control applications
(Embedded Java),
- networked small appliance applications
(Personal Java),
- reusable software components
(Java Beans),
- server-side utilities
(Servlets),
- client-side Web page programs
(Applets).
-
Fiction: Java is hard to learn.
Fact: Java is relatively easy to learn because
- JVM bytecode is transparent to most users, so one need not be
concerned with JVM machine code or assembly language.
- The core language syntax eliminates pointers, memory management issues,
records and structures, I/O, tasking, and other difficult-to-learn
syntax. A summary of the syntax
occupies only three standard typewritten pages.
- The JDK toolset requires learning only three or four frequently-used
commands. All other tools may be learned when and if the need arises.
- The API library is large, extremely powerful, and ever-expanding. But,
like the JDK, only a very small subset needs to be learned initially.
-
Fiction: Java is not secure enough for my job.
Fact: The Java environment programming language is the only
general-purpose language with security built in from the ground-up
five different ways:
- at compile-time, with compiler checks for things such as
strong data typing,
proper variable and method usage, exception compliance, and
proper use of flow control;
- at load time, when a 4-pass source code verifier ensures bytecode
(object code) has not been altered accidentally or deliberately;
- at run-time, with execution checks for strong data typing,
array bounds, null references, and a host of other run-time
exceptions;
- via a Security Manager which (in version 1.2) can be used to
selectively allow or deny access to specified system resources;
- via deliberate efforts to break Java security by a group of
enlisted experts, whose (rare) successes lead to immediate fixes.
-
Fiction: Java is too slow.
Fact: The Java environment is inherently fast, and past
inefficiencies are being eliminated in stages:
- Just-In-Time (JIT) Java run-time compilers will execute Java
bytecode 4x to 5x slower than C (by way of comparison, OO C++
code is roughly 2x slower than C).
- The Java "HotSpot" interpreter-profiler-compiler will execute
Java bytecode up to 1.5x slower than C (matching or exceeding
C++ speed).
- Java chips that execute JVM bytecode in silicon eliminate any
interpreter and execute at full machine speed, in principle equaling
compiled C speed.
- Future JVMs that support multiple CPU architectures will allow
multi-threaded Java applications to run at parallel processing speeds,
vastly outperforming compiled C (which has no standard support for
parallel processing).
Ballpark Speed Comparison:
| Language | Relative Speed |
Java Multi- CPU JVM | under 1.0 sec. |
| C | 1.0 sec. |
| Java Chip | 1.0 sec. |
Java "HotSpot" Interpreter | 1.5 sec. |
| C++ | 2.0 sec. |
| Java 1.2 JIT | 4-5 sec. |
Java 1.0 Interpreter | 10-20 sec. |
Interpreted BASIC | 100-200 sec. |
-
Fiction: Java is over-hyped.
Fact: Over-hyped or under-hyped, the issue is really about
meeting expectations. Java surpassed my expectations because its
benefits exceed those of previous languages or development environments:
- Portable - Java bytecode (compiled binary) is fully portable
across different platforms - no need to recompile for a new CPU;
- Simple - relatively easy to learn as difficult syntax was dumped
overboard at the outset (does require knowledge of OO, however);
- Object-Oriented - equates to ease of maintenance of developed
and released code;
- Reusable - maintainability enhances reusability, which is
further supported by standards such as
Java Beans;
- Secure - five different mechanisms provide unprecedented security
and safety from malicious users, bugs, and accidents;
- Robust - strong compile-time and run-time error checking, security
mechanisms, and widespread reuse-based code shakedown all combine
to reduce the number of bugs;
- Dynamically-Loaded - program units are loaded on-demand when
actually executed, not all at once up front, enabling large
applications to be designed to load quickly and execute in small
amounts of memory;
- Multi-Threaded - course-grained parallel processing
(multi-threading) is built-in from the ground up;
- Inherently Fast - due to parallel processing capability and
innovative interpreter-compiler design;
- Powerful - the large and indefinitely-expandable API suite
allows a simple, small core syntax access to virtually unlimited
capability via library calls;
- These benefits apply to our code built using the Java environment,
as well as to the environment itself (which is written mostly in
Java).
-
Fiction: Java will eliminate C and C++.
Fact: A vast amount of code has been developed using the older
languages - code which is now critical to many aspects of society.
These languages will endure to maintain this 'legacy' code. For
entirely new development, however, it is difficult to justify
using a development environment other than Java, once the advantages
of Java are fully understood. This is especially true of C++ because,
evolutionarily, the Java environment programming language is a simplified
and improved version of C++. As is often said, "Java is C++ done right."
-
Fiction: Java will be the next dominant programming language.
Fact: Java's reusability, especially the
Java Beans standard
for reusable software components, provide a practical solution to
software reuse problems that have dogged researchers for well over 10
years (L was one of those researchers).
|
L's Prediction
As the software industry
embraces Java Beans, a critical mass of reusable Java Bean components
will be constructed. Developers will then be able to build new applications
using graphical "drag-and-drop" tools to interconnect Bean components
rather than write code a line at a time as in the past. The resulting
productivity increase can easily exceed 100:1; applications that
used to take months or years to develop using a 3rd generation language
(3GL) like C or Java can be built in hours or days using 4th generation
(4GL) builder tools and libraries of Java Bean components. This
huge reduction in development effort and cost will cause new 4GL
Bean technology be used for new development whenever possible.
|
Nearly 30 Bean-centric builder tools exist now. They require only the
Java Bean libraries to trigger a quantum industry-wide leap into the next
generation of high-productivity software development. This leap will
make the Java language (but not the Java environment) transparent to
most developers, much as assembly language is now.