18-12-2012, 06:20 PM
Core Java™ 2: Volume I–Fundamentals
Core Java.pdf (Size: 8.07 MB / Downloads: 242)
An Introduction to Java
• Java as a Programming Tool
• Advantages of Java
• The Java “White Paper” Buzzwords
• Java and the Internet
• A Short History of Java
• Common Misconceptions about Java
For a long time, to open a computer magazine that did not have a feature article on Java
seemed impossible. Even mainstream newspapers and magazines like The New York Times,
The Washington Post, and Business Week have run numerous articles on Java. It gets better
(or worse, depending on your perspective): can you remember the last time National Public
Radio ran a 10-minute story on a computer language? Or a $100,000,000 venture capital fund
was set up solely for products produced using a specific computer language? CNN, CNBC,
you name the mass medium, it seems everyone was, and to a certain extent still is, talking
about how Java will do this or Java will do that.
However, we decided to write this book for serious programmers, and because Java is a
serious programming language, there's a lot to tell. So, rather than immediately getting caught
up in an analysis of the Java hype and trying to deal with the limited (if still interesting) truth
behind the hype, we will write in some detail about Java as a programming language
(including, of course, the features added for its use on the Internet that started the hype). After
that, we will try to separate current fact from fancy by explaining what Java can and cannot
do.
In the early days of Java, there was a huge disconnect between the hype and the actual
abilities of Java. As Java is maturing, the technology is becoming a lot more stable and
reliable, and expectations are coming down to reasonable levels. As we write this, Java is
being increasingly used for “middleware” to communicate between clients and server
resources such as databases. While not glitzy, this is an important area where Java, primarily
due to its portability and multithreading and networking capabilities, can add real value. Java
is making great inroads in embedded systems, where it is well positioned to become
a standard for hand-held devices, Internet kiosks, car computers, and so on. However, early
attempts to rewrite familiar PC programs in Java were not encouraging—the applications
were underpowered and slow. With the current version of Java, some of these problems have
been overcome, but still, users don't generally care what programming language was used to
write their applications. We think that the benefits of Java will come from new kinds of
devices and applications, not from rewriting existing ones.
Java as a Programming Tool
As a computer language, Java's hype is overdone: Java is certainly a good programming
language. There is no doubt that it is one of the better languages available to serious
programmers. We think it could potentially have been a great programming language, but it is
probably too late for that. Once a language is out in the field, the ugly reality of compatibility
with existing code sets in. Moreover, even in cases where changes are possible without
breaking existing code, it is hard for the creators of a language as acclaimed as Java to sit
back and say, “Well, maybe we were wrong about X, and Y would be better.”
Advantages of Java
One obvious advantage is a runtime environment that provides platform independence: you
can use the same code on Windows, Solaris, Linux, Macintosh, and so on. This is certainly
necessary when programs are downloaded over the Internet to run on a variety of platforms.
Another programming advantage is that Java has a syntax similar to that of C++, making it
easy for C and C++ programmers to learn. Then again, Visual Basic programmers will
probably find the syntax annoying.