ActiveX
1. The origin of ActiveX
ActiveX was originally just a trademark name. The technologies it covers are not isolated. Most of them All have a certain relationship with the Internet and the Web. More importantly, the overall technology of ActiveX is built by Microsoft's COM (Component Object Model). But don't make the mistake of thinking that ActiveX defines all COM-based technologies. COM is associated with Microsoft Office and Windows and everything Microsoft does now, but obviously those products are not members of the ActiveX family.
ActiveX grew up from Microsoft's compound document technology - OLE. The initial version of OLE was only aimed at compound documents, but in the subsequent version OLE2, COM was imported. COM was born in response to the needs of OLE designers. The basic starting point is to allow a piece of software to provide services to another piece of software through a common mechanism. Therefore, the first user of COM was OLE2. In fact, there is not much relationship between COM and compound documents. Later, COM began to be widely used as a technology completely unrelated to compound documents. As a result, Microsoft began to "get involved" in common platform technology. But COM is not a product, it needs a brand name. Unfortunately, marketing experts chose "OLE" as the brand name. As a result, technologies using COM began to be labeled OLE. Of course, most of these techniques have nothing to do with compound documents. It will take considerable effort and time for Microsoft to explain to people: "OLE is not just about compound documents!"
So, in the spring of 1996, Microsoft changed its mind and chose ActiveX as its new brand name. ActiveX refers to a loosely defined collection of COM-based technologies, while OLE still refers only to compound documents. Of course, the most important core is COM.
It is a very novel idea to make the object model completely independent of the programming language. From the objects of C++ and Java, we can understand something. But what exactly is the so-called COM object? For ease of understanding, COM can be regarded as some kind of (software) packaging technology, that is, it can be regarded as making different parts of the software combine into interactive objects according to a certain object-oriented form. process and a set of supporting libraries. COM objects can be written in any language such as C++, Java, and VB, and can be implemented in the form of DLLs or executable files that work as different processes. Clients that use COM objects do not need to care about what language the object is written in, nor whether it is executed as a DLL or another process. From the client's perspective, there is no difference.
Such a general processing technique is very useful. For example, two applications that are coordinated and run by users can implement their different job parts as interactions between COM objects (of course, current OLE compound documents can also do this). Code downloaded from a Web server for execution in the browser can be viewed by the browser as a COM object. That said, COM technology is also a standard way of packaging downloadable code (ActiveX controls perform this function).
Even the method for the application to interact with the native OS can be specified using COM (most of the new APIs used by Windows and Windows NT are defined as COM objects). Although COM originated from compound documents, it can be effectively applied to many software problems.
2. ActiveX Kingdom
The Active platform is Microsoft's world view. The basic idea is to use ActiveX controls to build an automated mechanism ranging from user interaction and COM-adapted transaction processing monitors to Web servers. Active platform consists of two parts: Active Server and Active Client.
Active Server is actually the middle layer. Use components or Active Server Pages to provide a place for business logic and main application processing. ActiveServer's technology, its core is NT Server, Microsoft transaction processing server, data management services, directory services, Web services and network services.
Transaction processing server combines traditional TP monitoring functions such as thread generation and database multiplexing with Microsoft's component-based programming model. Other components of the Active platform such as data management services use OLE DB and ODBC to access data sources such as DB2, Oracle, SQL Server, etc. Directory service provides a directory service layer around DCOM (Distributed COM), so that remote objects can search for each other on the network. Web services are built around the Internet information server, which provides a scripting mechanism for Web application development on the server. The network service is built around DCOM, allowing it to connect to controls through the network using synchronous MS-RPC as an intermediary.
Active Client is a cross-platform. Even though Microsoft's technology is exclusively owned, it also hopes to open this technology to multiple OSs. The specific implementation plan is to use a scripting engine. This script engine is composed of standard HTML and the Java Virtual Machine (JVM) with Microsoft characteristics, Microsoft's VBScript and JScript. Active Client is integrated into Microsoft's IE 3.0 and 4.0. Through ActiveX, it can become part of the user's C/S application.
From the perspective of enterprise users who all use Windows, the Active platform can provide a solid and scalable server application development platform. ActiveServer also uses some common tools and technologies in high-end products such as TP monitors. Therefore, small workgroup and intranet applications will not exceed the capabilities of Active Server. Although the target machine of the Active platform is a heterogeneous machine environment, it cannot drive the client due to its excessive reliance on IE. Although Explorer is also available on some non-Windows platforms, the best support and the latest version of Explorer are on Windows s.
3. Progress of ActiveX
1. Expansion to distributed computing
The initial version of COM assumed that the COM object and its client were running on the same machine (Can be in the same process or in different processes), DCOM is an important member of the ActiveX family. Later, it became available in Windows 95 as well. DCOM has not made any changes to the way the client creates COM objects and interacts with them.
The client uses exactly the same code and can access local and remote objects. But on many occasions, customers want to use a small number of DCOM attachments. DCOM is equipped with a distributed security and confidentiality mechanism to provide authentication and data encryption. In Windows NT 5.0 to be released in 1998, security protocols such as Kerberos will be added to DCOM. DCOM has been able to utilize simple directory services such as domain name services to search for COM objects on other machines. NT 5.0 will add support for Active Directory. Active Directory is based on Domain Name Service and Lightweight Directory Access Protocol.
DCOM’s strong rival has previously been CORBA (Common Object Request Broker Architecture) of OMG (Object Management Group). It is incorporated into products such as Iona's Orbix and Visigenic's VisiBroker.
Not long ago, another technology that supports distributed objects-Java's remote method invocation was introduced. Whether it is C ORBA or DCOM, it can communicate between objects written in multiple languages. RMI is different, it is limited to communication between objects implemented in Java. Obviously, this is a constraint. But RMI is very simple to use. In addition, RMI developers can use Java to design protocol specifications. Therefore, the functions of language can be integrated.
It is relatively simple to write a DCOM server that only handles two or three clients. However, it is quite difficult to build a DCOM server that can efficiently handle hundreds or thousands of clients.
To facilitate writing scalable DCOM servers, Microsoft released the Transaction Server (MTS). While MTS supports transaction processing, it also provides services such as automatic generation of clues and reuse of smart objects. MTS makes making scalable servers quite easy. Even for applications that do not require transaction processing, there are benefits to using MTS. In fact, Microsoft encourages people to use VB to write MTS applications. This is different from the traditional method of developing business servers. All MTS applications are written as more than one COM object and must be implemented as a DLL. Normally, MTS is not visible to clients. The client just needs to create and use COM objects as usual.
2. Standardization of components
The method of component-based application development is the same as that of assembling electronic devices. Applications can be built using pre-made component parts. Desktop, COM-based components are called ActiveX controls. The so-called ActiveX control is nothing more than a COM object that complies with certain standards and interacts with the client.
For example, ActiveX controls must expose methods through Automation (that is, using dispinterfaces). With this standardized interaction, the same control can be used in multiple different contexts. "Behind the scenes" of this standard interface, ActiveX controls can do almost anything. Now, many software companies can provide controls that implement various functions.
ActiveX controls are written as DDL, and for this purpose, they must be loaded into a container. The prototype container of ActiveX control is VB. In addition, there are a variety of containers to choose from. Currently, a very important control container is Microsoft's Web browser
The contents of what are now called ActiveX controls are necessary to implement many methods. They have been moved from the machine's local hard disk to containers such as VB. There seems to be no big difference between controls of several hundred KB and several MB. But when it comes to loading the control into a Web browser, it's likely to be over a slow phone line. Now, the size of the control is a very critical issue. Once the control exceeds a certain limit, the download time will be extended. Therefore, Microsoft stipulates that only absolutely necessary functions can be performed in ActiveX controls.
OpenDoc, promoted by Apple and IBM, was once the main competitor of ActiveX controls. At present, the sponsoring companies of OpenDoc have officially announced the suspension of funding. Most companies that are fighting against Microsoft instead support JavaBeans (a component structure based on Java). ActiveX controls are basically bundled with Windows and distributed as binary machine code, but JavaBeans is different in that it can be executed anywhere. This of course comes at a cost. It's obvious that it's impossible to completely and completely exploit a local environment without sacrificing portability. When writing components that can be downloaded from the public Internet, JavaBeans should be preferred.
The desktop component market continues to grow rapidly. Most of them are built with ActiveX controls (Java Beans are still a minority at present). But standardization of server components lags behind. On the desktop, programming environments such as Web browsers, VB, and PowerBuilder are powerful as containers.
But what about server containers? As a component container on the server, a transaction server is a better choice.
Microsoft's competitors are doing everything possible to prevent MTS and NT from dominating the market. They are speeding up the development of server component standards, the most promising of which is Enterprise JavaBeans. It is an extension of JavaBeans and defines the transaction server interface. Supporters of Enterprise JavaBeans hope that independent software vendors will write server components not as COM components, but as Beans.
4. ActiveX construction tools
With the promotion of ActiveX controls, the number of development tools for ActiveX controls is increasing day by day. Since ActiveX does not depend on language, traditional development tools can basically build and equip ActiveX controls. The most commonly used ones are Delphi, PowerBuilder, Visual Basic, Visual C++, Visual J++, etc.
1. Basic overview
The methods of developing ActiveX controls with 3GL are: ①MFC (Microsoft Foundation Class, Microsoft basic class), ②ATL (ActiveX Template Library, ActiveX template library), ③BaseCtrl Framework etc. MFC is the most classic. Using MFC, developers can not care about the interface, but focus on the actions of the object. The disadvantage is that the size of the control is large and the DLL must exist at the same time as the container during execution. ATL can generate code using templates. That is, libraries and DLLs do not need to be launched with the control. In ATL, classes need to be derived from several basic classes that exist as templates. AT L also has disadvantages, that is, it is difficult to handle the interface, and the necessary interfaces in the application must be made separately. In addition, ATL does not support Class Wizard. Unfortunately, there is no wizard to automatically synchronize the Object Description Language (Object Description Language) and interface definition language files with user code. BaseCtrl is a simple library. Very similar to ATL, but without templates. In fact, Microsoft does not support BaseCtrl because it is too simple. In BaseCtrl, there are several universal controls (Skeleton Control). BaseCtrl provides an easy-to-understand ActiveX development model, but it is not simple compared to ATL, and its flexibility is not as good as ATL. At present, BaseCt rl is a "bitter" choice for ActiveX control developers.
2. Development tools
The original tool that can create ActiveX controls is Microsoft's Visual C++. It provides ActiveX developers with the most controls. Visual J++ can also create ActiveX controls.
The two tools (JBuilder and IntraBuilder) launched by Borland are also very eye-catching. However, only Delphi 3.0 and C++ Builder can create ActiveX components using Borl and tools. Borland calls Delphi's ActiveX development function Active Inside. It converts any Delphi Window into ActiveX form. Active Inside comes with new controls on the web. Delphi can link controls to COM and DCOM.
PowerBuilder 5.0 is a client/server development tool adapted for ActiveX development. PowerBuilder can configure the Data Window (the core part of PowerBuilder application development) as an ActiveX control.
This enables current PowerBuilder developers to use certain familiar features such as the PowerScript programming language.
The one with the best tools for making ActivX controls is undoubtedly Microsoft. For example, with Visual Basic 5.0, developers can use the visual programming environment and the native Visual Basic for Application language to develop controls.
5. The future of ActiveX
Indeed, the world of Windows and Windows NT is the best environment for ActiveX technology. But no matter how hard Microsoft tries to promote its OS, it cannot make all enterprises become Windows-only. Therefore, Microsoft must try to make COM, DCOM and part of the ActiveX family available on other OSs. Now, in Macin tosh, ActiveX is already supported, which also includes support for ActiveX controls. Software AG is porting these technologies to multiple Unix and IBM OS/390s. DEC and HP also plan to use these technologies on their own systems, and they also do so by porting Microsoft code.
COM has become an important part of the basic software under Windows 95 and Windows NT environments, but there are still many uncertain factors in its future. For example, can Microsoft continue to develop COM as a multi-platform technology? In order to make NT server suitable for existing enterprises, it is necessary to enable distributed services such as DCOM to be applied on non-Microsoft platforms. It will take a long time to solve these problems. In addition, products based on CORBA and Java's RMI have successfully run in multi-OS environments. The later multi-platform DCOM is introduced, the further ahead CORBA and RMI will be.
What is the competitive prospect between ActiveX controls and JavaBeans? Whether the software runs on a Web browser or elsewhere, in short, component software (ComponentWare) will be the next software Development hot spots. At present, although ActiveX control is temporarily in the lead, due to the self-destruction of OpenDoc, companies competing with Microsoft will form one body to compete with it. Users never want to see "domination of the world". For this reason alone, JavaBeans will also seize a place in this market competition.