[ Back to Index of Web Works ] part of George's Web Site

Related Web Works


a Friday feature

by David Wood

[Pour On The Java. Hold The Programming. Click Here. Jamba.]

A Philosophical Turn

While thus far, here at Java Jolt Headquarters, we've concerned ourselves with the practical aspects of working with this new environment, we've decided this week to pause our headlong rush into technological minutiae and turn toward the philosophical. What does this new system, and the language it brings along with it, really mean in the grand scheme of things? What are its implications for Web users and developers? How does it stack up against the Brand X distributed object system?

It's no secret that there's a tremendous amount of hype about Java. How else, in only so many months, could there appear such a tremendous number of books, services, development suites, and yes Java-related Web sites? Naturally, despite the constant roar and hum of electronic dissertation on the subject, there is still a great deal of general misconception about what Java is, what it's good for, and what the competition is.

One of the most common misconceptions, even among better educated people, is that Java and Active X are in competition. This is simply not true. To dispel this rumor, one need only look closely at what the two technologies actually do.

Java, as a whole, is a package released by Sun Microsystems--originally designed for something other than its current role, and only recently adapted for the Web. Java is also the name of a programming language, which you can directly compare to other languages like C++ or Basic. The thing about this language is that most of the Java compilers currently available do not produce machine code for a specific platform or architecture. Instead, they generate machine-generic binary object code, which is designed to run in a special interpreter. And that brings us to the next main feature of the Java package: the Java Virtual Machine (JVM).

One of the stated goals of the Java project was portability (that is, real portability). To this end, the architects of the system followed what's recently become a common approach. In an abstract sense, this is the tendency to break up code into interchangeable modules so that change in one portion of a program can be isolated from requiring a rewrite of the entire thing. The Java Virtual Machine reflects a relatively good separation of the machine-dependent parts of a program from the machine-independent ones. The JVM need only be written once in a given environment, and Java applets or applications need only be written and compiled for the JVM.

Aside from the claim that this works (unjustified claims of portability have been made often before), there are now millions of Internet users participating in the continuous proof that the system actually works relatively well--the designers chose a relatively sensible path through the compromises and arbitrary decisions involved in such an approach.

As far as this programmer has seen, this is the first truly practical system of this type to gain widespread acceptance in the mainstream computing world. This alone would make Java extremely important. Then add the fact that Java (in our humble opinion) is one of the best next-generation languages to hit the scene thus far. Although far from perfect, it shows real progress towards addressing, in an acceptable, efficiency conscious manner, a number of major problems in the current crop of more widely used object oriented languages.

Security, which is really as much a philosophical issue as it is a practical one, is a bonus. We can see in Java a remarkably good attempt (for the first go around, at any rate) at making it difficult for an applet programmer to abuse your machine. The language is not secure, as is evinced by a great deal of good scholarly dissertation on the topic, but it does take a reasonably high amount of effort and knowledge (relatively speaking) to do something untoward beyond taking up a lot of CPU time.

Active X, on the other hand, is not a programming language. It's a system for managing code written in other languages. Nor is it a scripting language. It's designed to encompass existing and future scripting systems. It's a system for distributing and interchanging existing code on the fly. It has no large-scale provision for platform independence; as far as we know, it only runs under some Windows products. This is interesting, to be sure, but it yields the deceptive phrase that "Active X is a superset of Java." Not technically true.

Java is a part of Active X inasmuch as the Active X environment contains a Java Virtual Machine and can effectively deploy Java objects within its own framework. Yet it cannot in any way replace Java functionality; fundamentally, these are two different products with two different goals. If their functionality may appear similar to the end-user, rest assured the similarity is only skin deep.

As a side note, the Active X approach to security is a very different one, fraught with potential pitfalls and problems. But that is another issue for a different column. Until next week.

Past installments of Java Jolt

[http://www.iworld.com/]


[ Back to Index of Web Works | Top ]