|
Active X OverviewActive X is primarily a plugin wrapper that may or may not involve COM support. The code contained within an Active X control is language-independent; it can be written in Java, C/C++, VB, etc.Active X is not an alternative to Java -- rather, it is an alternative to the plethora of plugin APIs that are now proliferating the Web client/server arena. Under the covers, Active X is a collection of separate technologies, classes, APIs that facilitate distribution, validation and extensibility of Internet applications. Such technolgies include Dynamic Link Libraries (DLL), Distributed Common Object Model (DCOM), digital signing, and various other system services. From a web administrator's perspective, Active X provides a way to add new features to their web server and to their web pages. From a user's perspective, Active X is a way to extend and enhance their Internet Explorer web browser to access the new features.
How it WorksWhen an ActiveX-aware web browser encounters a web page that includes an unfamiliar feature, it looks for a URL reference to the software necessary to access the new feature. It can then locate/download/install/register that software from the Internet -- and presto, your web browser has just gotten smarter.Making this possible requires the synergism of several existing technologies:
Using Active X ControlsThe easiest way to use an Active X control is to simply browse the Web using a properly enabled, ActiveX-aware web browser. As the browser encounters unfamiliar web features, it seeks out and installs the software.Since client-side Active X controls are COM-compliant OCXs, you can also use and Active X control by simply dragging its icon onto an appropriate, OCX-enabled application. Active X controls not only provide methods to render and play new data formats, but they can modify the "owner" application's menus and toolbars, to provide feature-specific user interfaces. You can also use Active X controls when developing new software. The features supported in the Active X control can be called directly by other software using Visual Basic or Visual C++.
Creating Active X ControlsThe best way start creating Active X controls is to get the Active X Software Development Kit (SKD) from Microsoft, and the Active X Internet Suite from NetManage.Being familiar with C++, Microsoft Foundation Classes (MFC), OLE and COM are recommended, although using Microsoft's Active X Template Library (ATL) simplifies the OLE requirements. Creating an Active X control is essentially a matter of creating a Dynamic Link Library (DLL) with certain exported methods/APIs. COM defines how objects are used/re-used and manages multiple interfaces that may be used to access the object.
HTML <OBJECT> TagsHTML has traditionally used a different tag for embedding different kinds of data, one for images, one for playing sounds, a different one for running Java applets.The <OBJECT> tag is intended to consolidate all embedded objects into a single tag; it is also the tag used to embed ActiveX controls in a web page. The following is an example of an <OBJECT> tag.
CLASSID is an applet-specific URL that identifies the type and identifier of the applet. ID is the target name for that instance of the applet on that web page. CODEBASE identifies the URL of where the applet code can be found. CODETYPE is the MIME type of the object. DATA is any inline data that is to be passed to the applet - typically a URL to data; PARAMETER tags are the preferred mechanism for extended inline data. STANDBY is used by browsers as standby messages to users. The remaining fields are the same as those used in IMG tags.
|