Java applets and applications have the ability to run on several different types of computers because they are converted to machine-specific instructions when run. Whether you use the Mac OS, Windows or Unix, your browser downloads the same Java code. This code is handed off to a Java interpreter, or a just-in-time compiler built in to your browser or operating system. The interpreter/compiler enables the same Java code to run on any type of computer.
Java allows software developers, including those programing for the Web, to create cross-platform software.The Java virtual machine implementation is specially designed to isolate the Java program from your files or applications. The virtual machine is not allowed to access files or programs on your computer without your permission. The security built-in to Java is not completely foolproof, but the language was designed from the start with security in mind, and those holes that are discovered are patched fairly quickly.
There are times when you might want a Java applet to communicate with other applications on your computer. Sun is working with several companies to allow Java applets to communicate with component software architectures such as OpenDoc and ActiveX. This collaboration layer is called Java Beans. Sun is now working closely with Apple and IBM to integrate Java with OpenDoc using the Java Beans standard.
OpenDoc was developed by Apple, IBM and several other companies. It is a cross-platform, open, component software architecture, which is both a superset of and competitor to Microsoft's proprietary ActiveX architecture. OpenDoc will allow software from different vendors to work together. It will allow you to use company A's word processor with company B's charting program. Besides the advantage of being an open, cross-platform standard, OpenDoc differs from ActiveX in that OpenDoc applications can load and unload from RAM as needed, while to benefit from the ActiveX architecture you need to have all the necessary applications loaded into RAM at the same time. OpenDoc is available for the Mac and OS/2. Beta versions are currently available for Windows.
The close collaboration between Java and OpenDoc may lead to the merging of the network component standard Java with the desktop component standard OpenDoc. InfoWorld's Michael Vizard dubbed this collaboration "JavaDoc".
It will be interesting to see how Sun can maintain Java's tight security while still allowing it to communicate with the operating system and applications via OpenDoc.
ActiveX:
ActiveX "controls" are Microsoft's answer to Java applets. They consist of binary files which are
not cross-platform. Currently ActiveX is only available for Windows95 and WindowsNT. Microsoft says that
it intends to make ActiveX an open standard for other platforms, and have handed partial control of the
standard to an independent group similar to the independent group responsible for OpenDoc, Component Labs.
However, most analysts are skeptical and believe that Microsoft's new "openess" is just posturing. They
believe that ActiveX will be designed to never work as well on a non-Windows computer as on a Windows computer.
ActiveX controls have full access to your computer's operating system, files and applications. It is possible for users to get ActiveX controls that behave like a virus or Trojan horse. Accessing Web pages with these controls could damage your computer or simply pull files from your hard drive and deliver them to the Web server without your knowing about it. An article in the November issue of Byte Magazine, mentions that Fred McLain has already created an ActiveX control called "Exploder" which will cleanly shutdown your Windows95 PC when accessed via Microsoft Explorer 3.0. According to Byte, "He points out that someone else could just as easily write an ActiveX control that formats your hard drive or does some other equally bad things." Fred has a Web page which discusses "Exploder" and how it was created.
Microsoft plans to add digital signatures to ActiveX code so that its authorship can be verified. However, this mechanism would not prevent rogue developers from creating malicious ActiveX code; it just provides a small measure of accountability. In order to develop ActiveX controls with personal digital signatures a programmer needs to pay VeriSign $400 and pass a background check by Dun and Bradstreet. This requirement limits the development of signed ActiveX controls to professional developers. However, most of the programmers in the research and education community are students who either don't have $400, or whose departments are unlikely to pay that much for a student programmer who may not be with them long term.
Internet Explorer users are faced with their own dilemma: do they allow unsigned ActiveX controls to run and risk getting their hard drive reformatted, or do they limit themselves to only signed ActiveX controls?
To make the situation worse, even though an ActiveX control is signed, that does not mean it won't reformat your hard drive. It just means that VeriSign has a name and a credit card receipt for $400 associated with that ActiveX control. Therefore ActiveX controls, which are signed can still do bad things to your machine, but it is less likely.
ActiveX controls do have the advantage of already being built in to the Windows95 and WindowsNT operating system and several applications. This will allow ActiveX controls to work with your Windows programs. ActiveX controls also have the disadvantage of being larger since ActiveX was not originally designed for network distribution.
Java vs. ActiveX:
Java currently has a tremendous advantage since it is cross-platform, secure and optimized for the net.
Both Netscape and Explorer support Java. Java's disadvantages are its newness and its having
fewer currently available applications and applets. The Java development tools are in their infancy and not as well
developed as those for ActiveX. In addition, fewer developers have experience with Java than with Microsoft's
older ActiveX standard. ActiveX controls have the disadvantages of being large and working only directly with
Explorer 3.0 and Windows95 or WindowsNT. ActiveX also has serious security problems that will be difficult to fix.
In bringing ActiveX to the net, Microsoft simply adapted its existing desktop component architecture (OLE) for networks. Java, on the other hand, is a component architecture that was designed for the net and, through cooperation with the OpenDoc will move to the desktop. Which standard will dominate depends on how well each group can convince developers to adopt its standard and how willing Microsoft is to allow ActiveX to become a real, open, cross-platform standard rather than a proprietary standard limited to Windows95 and WindowsNT.
Articles and Reviews:
Inter@ctive Week [7/22/96]: Battle Brewing: ActiveX Vs. Java
PC Week Labs: Net programming is a tangled Web
Web Week [9.23.96]: Sun, Apple Team on Technology Initiative
InfoWorld [5.1.96]: Observers revel in cross-platform benefits of Java
Java Info Sites:
Sun: Sun's Java: Programming for the Internet
Java User Resource Network
Infinite Data Sources' The Java Developer
Presenting Java Information Sources
JavaWorld Magazine
ActiveX Info Sites:
ActiveX.Com
Fred McLain's Page Describing "Exploder" and ActiveX security