Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers

ArticlesJava and ActiveX


September 1997 / Cover Story / ActiveX Demystified / Java and ActiveX
David S. Linthicum

The debate rages on: Java versus ActiveX. To understand the debate, though, it's important to remember that both "Java" and "ActiveX" are labels applied to a broad range of technologies.

ActiveX controls and JavaBeans are definitely competitors, however, and developers must make a choice when creating a component. But they 're not mutually exclusive: Each is suited to particular situations.

Both ActiveX controls and Java applets and Beans support the "download once run many times" architecture. In the case of Java applets, the Java virtual machine (JVM) interprets the bytecode and controls access to system resources. The JVM removes the applets from the details of the host OS, and thus applets can run on any platform that supports the JVM. Most do. ActiveX controls, by contrast, have to register themselves with the Windows registry and execute as native Windows applications.

The trade-off is portability versus native look and performance. Any version of Java code is cross-platform as long as the JVM supports that platform. But Java's performance is less than stellar, and by default the security subsystem of Java does not allow access to native features such as file I/O and devices. Thus, Java is the best bet for those shops that have to support a hodgepodge of operating systems and processors and don't mind having to write an application around the security features.

While Java is the jack-of-all-trades, ActiveX is the master of one: Win32. ActiveX controls function exactly like native Windows applications and thus have access to all native features such as print queues, file I/O, and even memory. For security, ActiveX depends on Microsoft's Authenticode system (see the sidebar "ActiveX Security"). The use of the native features of Windows means that ActiveX controls run at native speed, typically faster than their Java counterparts. Moreover, most popular client/server tools, such as Visual Basic, Delphi, and PowerBuilder, now support ActiveX control development using the native languages of the tools. Finally, many Windows tools and applications can make use of ActiveX controls, so they aren't confined to your browser.

Which is for you? Consider them both for their strengths and their weaknesses. It's okay to leverage ActiveX controls for homogenous Windows applications, while Java is a finer fit for cross-platform situations. It's better than force-fitting applications in the name of a standard, or worse, a religious crusade.


Up to the Cover Story section contentsGo to previous article: Java and ActiveXGo to next article: Tools for Building Controls
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network