O''''Reilly Network For Information About''''s Book part 7 - Pdf 17


2.6. Moving Ahead
We may never again see a perfect storm like the one that ushered in Java. You
shouldn't look for one. Instead, you should learn from the success of Java, and start
to understand the factors that led to its success. Minimally, I believe the next
commercially successful programming language will need to satisfy four major
criteria:
 It will need to establish a significant community. You won't see broad
adoption unless the adopter can achieve relative safety.
 It will need to be portable. Java's virtual machine has raised the bar for
languages that follow.
 Some economic incentive must justify the movement. Currently,
productivity to me looks like the logical economic force, but others may be
lurking out there, like wireless computing or data search.
 It will need demonstrable technical advantages. This is actually the least
important of the major criteria.
I don't think most of us can possibly thoroughly understand the success of Java. It's
easy to overestimate the role of the language and to underestimate the importance
of the JVM and the community. In the next chapter, we'll continue to look at the
crown jewels of Java in more detail, or the foundation for the most successful
programming language ever.

3.1. Language and JVM Design
In 1996, the JVM represented a significant departure from traditional thinking.
Overwhelmingly, organizations exclusively used high-performance compiled

built into Netscape Navigator, proved to be a fantastic launching pad for the Java
platform. It's enabled Java to extend into the realm of mobile devices, application
servers, and countless software products. When all is said and done, popularizing
the idea of the VM may be the most important technical contribution of Java.
Figure 3-1. The JVM took a different approach to performance, security, and
portability; most programming languages use compilers to bind them to individual
machines, but Java simply redefined the machine

Java offers a rich set of interfaces that often delve into operating system territory.
Under the covers,
Java either implements this type of functionality from scratch, or
just calls the native features underneath. Either way, Java developers can count on
a rich, consistent library wherever they are. In almost 10 years of software
development, though I've seen minor annoyances, I've rarely encountered major
problems in porting from one operating system to another. In the end, Sun didn't
invent the VM, but Sun did make the VM popular.
Java portability is not without its problems. Graphical user interfaces pose a
particularly sticky problem: is it important to maintain portability even at the
expense of consistency with the operating system underneath? For example, Swing
components, not operating system components, implement the menus in a Java
GUI. This arrangement causes problems on the Apple platforms, where the menu
for an application traditionally is implemented as a single bar on top of the
desktop, instead of the separate menu per application that you commonly see on
Unix and Windows. Other notable differences, like security and threading, show
up differently on different operating systems. Even filenames can present
problems, where having two classes called Account.txt and account.txt would be
legal on Unix but not on Windows. But for the most part, Java handles portability
very well.
3.1.2. Security
In the age of the Internet, security takes on an entirely new level of importance.

platforms.)
 Java, the language and the JVM, grew up after the Internet, so the inventors
had the benefit of knowing what types of attacks might occur.
 Java has a security manager built in at the lowest level, to enforce security
policy and to control access to low-level system priorities.
 The JVM provides a limited sandbox for a group of Java applications, so a
malicious or buggy application can't do as much damage as, say, a C++
application might.
 Because there's no pointer arithmetic, and because Java has strong runtime
typing, the JVM knows precisely where a reference is pointing. The JVM
can better restrict an application's access to its own memory. Most Java
security attacks try to defeat type safety first.
The relative dearth of Java security breaches represents perhaps the biggest
compliment to Java's founders. It's just a
tough environment for viruses, or adware,
or security attacks. The base operating system makes a much riper target.
3.1.3. Moving Forward
The idea of the virtual machine is here to stay. The intermediate virtual machine
transforms the basic problems of portability, security, and deployment from nearly
unsolvable to routine. If the virtual machine adapts to accept dynamic languages,
the JVM will probably be the deployment platform of choice for the foreseeable
future. If not, a new virtual machine will need to emerge.
But the problem of portability has proven to be a difficult one. Jython , a dynamic
language based on Python but running in the JVM, never quite reached the
expected level of prominence in the Python community, particularly because it
wasn't fas
t enough, and partly because the Python community never embraced it. A
project to implement Ruby on the JVM, called JRuby , has similar difficulties so
far. Still, many analysts predict that the JVM will live long beyond the time that
the last Java developer writes the last, lonely line of code.


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status