Click to return to the Essentials home page    
Web Workshop  |  Essentials

For Starters: #6. Java? ActiveX? Getting to Know All About Both of You


Mary Haggard
Program Manager
Microsoft Corporation

May 23, 1997

The following article was originally published in Site Builder Magazine (now known as MSDN Online Voices).

All of us remember the first time we visited a World Wide Web site where we did something besides read text and click hyperlinks. Remember seeing a gray screen, and having your browser status bar say "Java Applet initializing?" How when it finally came in, it really wasn't that great? Or the first time the ActiveX authentication screen popped up on your browser?

Those were the good old days. Now you're wiser (and older), and you understand that when you go to an interactive Web site, chances are you'll interact with a component written as either ActiveX™ or Java™. This time, we're going to talk about what ActiveX and Java are, some of the pros and cons of each, and the tools available to develop in each.

ActiveX

Just when you had read the last page of Kraig Brockschmidt's opus on object programming, Inside OLE, Microsoft went and changed the way we think about objects. We stopped talking about OLE and suddenly started using terms like "ActiveX" and "components." You thought you learned the basics for nothing, right?

Wrong. ActiveX technology from Microsoft uses the Component Object Model (COM) and Distributed COM (DCOM) standards, allowing you to build and use components that enable interactive content for the World Wide Web. ActiveX objects and components are self-contained code that can be built to execute on both client and server machines. If you understand COM and DCOM, you understand ActiveX. Through ActiveX, Web sites use multimedia effects, interactive objects, and sophisticated applications to create an interactive user experience.

Server-side components used by Active Server Pages (ASP) technology are automation servers with no user interface. You can create your own automation servers with most of the tools used to create ActiveX controls. When activated, automation servers generate an HTML stream that is returned to the client's browser. Automation servers can automate access to a database, perform complex queries, and deal with data values for use by script code. Using Active Server Pages is an easy way to talk to server-side components via high-level script language. Nancy Cluts introduces experienced developers to the technology in An ASP You Can Grasp, and the MSDN Online Web Workshop has a great article on the how and why of developing server-side components.

I always try to make things simpler for you, but the truth is that both ActiveX and Java have great benefits and tradeoffs. You should consider these when making decisions on which technology to use.

Here's some thoughts on ActiveX:

Pros

Cons

Java

Java applets also provide interactive functionality within a Web site. In very simple terms, an applet is a scaled-down version of a full Java application, and it runs inside a Java virtual machine (VM) that is implemented as part of a Web browser. The Java language is object-oriented and facilitates quick development. Many vendors provide great tools to develop Java applets and applications.

These days, anyone who tackles Java pros and cons opens themselves up. I decided to keep this list pretty short and sweet -- and as non-controversial as possible.

Pros

Cons

Tools for Developing Components

The following information introduces you to the tools available from Microsoft for component and Java development. Use the links provided to learn more.

Visual Basic

Visual Basic and the Control Creation Edition can create controls from scratch, can write directly to the Win32 API, and can build composite controls - combining multiple controls into one package.Visual Basic 5.0 offers design-time debugging and opens the door to ActiveX development for millions of Visual Basic programmers. Note that the Visual Basic 5.0 run-time library is required for controls developed in Visual Basic, but the controlsize is amazingly small. The Visual Basic Non-MSDN Online link site has more information.

MFC

The Microsoft Foundation Classes (MFC) also offer a quick way for the C++ developer to create controls. MFC is one of the development tools within Microsoft Visual C++ Non-MSDN Online link. Control developers need stay within the realm of MFC, as development work outside of those parameters can be challenging.

Visual J++

Microsoft offers the Visual J++ version 1.1 Non-MSDN Online link professional development tool for Java. It includes a fast Java compiler, integrated debugging, an integrated development environment (IDE), and a collection of integrated components to create, test, tune, and deploy Java code on multiple platforms.

Microsoft SDK for Java.

The Microsoft software development kit (SDK) for Java Non-MSDN Online link, version 2.0, gives developers tools, class libraries, sample code, and full documentation for creating Java applications. This new version adds the latest edition of the Java VM for Windows, a preview release for developers of the AFC GUI Libraries, a Script Debugger for debugging Java in the context of complex Web pages, Windows NT Service support, and CAB file tools for rapid and secure delivery of Java applications.

ActiveX Template Library

These C++ templates allow for development of ActiveX controls and other types of components, including Windows NT service objects. ATL development requires at least Visual C++ version 4.2b, and can be downloaded from the Visual C++ Non-MSDN Online link Web site. It provides minimal wizard support, small size and fast execution, self-sufficient controls. To use ATL, you must have an understanding of OLE and COM.

ActiveX SDK

The Microsoft ActiveX SDK includes a variety of technologies introduced by Microsoft to facilitate development of Internet applications and content, including tools and information to aid in the development of ActiveX controls.

Online Resources

Until next time …

Since taking early retirement as commander of the Starship Enterprise and joining Microsoft, Mary Haggard has worked her way through the ranks to her lifelong goal, being Program Manager for the MSDN Online Web publishing team. Mary once worked in a paper mill, so she knows pulp when she sees it.
For technical how-to questions, check in with the Web Men Talking, MSDN Online's answer pair.



Back to topBack to top

Did you find this material useful? Gripes? Compliments? Suggestions for other articles? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.