First, the origin of ActiveX
ActiveX is just a trademark name. It covers the technology that is not isolated, most of which are associated with Internet and Web. More importantly, ActiveX's overall technology is built by Microsoft COM (Component Object Model, component object model). But don't mistakenly think that ActiveX is defined all COM-based technologies. COM is associated with Microsoft Office and Windows and Microsoft now do everything, but it is clear that these products are not members in the ActiveX family. ActiveX is growing from Microsoft Composite Document Technology --ole. OLE initially released, just aiming at the composite document, but in subsequent version OLE2, the COM is imported. COM is born with the needs of OLE designers. The basic starting point is to provide a software to another software through a common mechanism. Thus, the first user of COM is OLE2. In fact, there is not much relationship between CoM and composite documents. Later, CoM was widely used as a technology that was completely unrelated to the composite document. In this way, Microsoft began "Dyeing" General Platform Technology. But COM is not a product, it requires a trademark name. Not ingenious, market experts choose "OLE" as a trademark name. So, using COM's techniques began to label OLE. Of course, most of these technologies have no relationship with composite documents. Microsoft wants to explain to people: "OLE is not just a composite document!", This is quite energy and time. So, in the spring of 1996, Microsoft changed his idea and chose ActiveX as a new trademark name. ActiveX refers to a relaxed defined, COM-based technology collection, while OLE still refers only a composite document. Of course, the most important core is still com. Let the object model is completely independent of the programming language, which is a very novel idea. From C and Java objects, we can understand. But what is the so-called COM object? In order to understand, you can think of COM as a certain (software) package technology, that is, regarding it as a different part of the software, in accordance with certain object-oriented forms, combined into interacting Process and a set of support libraries. COM objects can be written in any language such as C , Java, and VB, and can be implemented as a DLL or as a executable of different process work. With the client of the COM object, there is no need to care about the object written in any language, and there is no need to care if it is DLL, or the other process is executed. From the client, there is no difference. Such a general processing skill is very useful. For example, two applications coordinated by the user can be implemented as interactions between COM objects (of course, the current OLE composite document can be done). For the code downloaded from the web server in the browser, the browser can see it as a COM object. That is to say, COM technology is also a standard method for packaged downloadable code (ActiveX control executes this feature). Even the method of interacting with the native OS, or using COM to specify (new API for Windows and Windows NT, most of which is defined as COM object). Although COM originated from a composite document, it is effective in which many software issues can be effectively applied.
Second, ActiveX Kingdom
The Active platform is the worldview of Microsoft. Its basic idea is to use the ActiveX control to construct a mechanism that implements automation from a transaction monitor to the web server interactively and adapts to COM. The Active platform includes two parts: Active Server and Active Client. Active Server is actually an intermediate layer. Use the component or Active server page to provide a place for business logic and primary application processing. ActiveServer's technology, its core is NT Server, Microsoft Transaction Server, Data Management Services, Directory Services, Web Services, and Network Services. The transaction processing server is combined with traditional TP monitoring functions such as thread generation and database multiplexing with Microsoft's component-based programming models. Other components of the ACTIVE platform, including OLE DB and ODBC, access DB2, Oracle, SQL Server, and the like with OLE DB and ODBC. The directory service is around the DCOM (Distributed COM, distributed COM), providing a directory service layer, making remote objects search on the network. Web services are constructed by the Internet Information Server, which is developed for web applications on the server, providing scripting buildings. Network services are constructed by DCOM, which can connect controls by synchronizing MS-RPC. Active Client is a cross platform. Microsoft's technology is even exclusive, but also hopes to open this technology to multiple OS. The specific implementation plan is to use scripting engines. This script engine is made of standard HTML and a Java virtual machine with Microsoft features, and Microsoft's VBScript configured with JScript. The Active Client is assembled into Microsoft IE 3.0 and 4.0. With ActiveX, you can become part of the user's C / S app. From the Qing Dynasty's enterprise users, the Active platform provides rugged, scalability server application development platform. ActiveServer uses common tools and technologies in the TP monitor. Therefore, small working groups and intranet applications do not exceed the ability of Active Server. Although the target machine of the ACTIVE platform is a heterogeneous environment, the client cannot be driven due to excessive IE. Although Explorer has also been introduced on some non-Windows platforms, the best support, the latest version of Explorer is still on Windows. Third, ActiveX progress
1. The initial version of the Distribution Calculated COM assumes that the COM object is running on the same machine (can be within the same process, or within different processes), DCOM is an important member in the ActiveX family. Later, it can also be used in Windows 95. DCOM does not make any changes for the client to make COM objects. The client can access the local and remote objects using the exact same code. But many occasions, customers want to use a few DCOM accessories. DCOM provides a distributed security confidentiality mechanism to provide authentication and data encryption. In Windows NT 5.0 to be released in 1998, you should add security security protocols such as Kerberos to DCOM. DCOM has been able to use a simple directory service such as domain name services to search for COM objects on other machines. NT 5.0 To add support to Active Directory. Active Directory is based on domain name services and light directory access protocols.
The enemy of the DCOM, which has always been the Corba (Common Object Request Broker Architecture) of OMG (Object Management Group). It is assembled into products such as Iona's Orbix and Visigenic Visibroker. Not long ago, another technology -Java remote method call to support the dispersion object is issued. Whether it is CORBA, or DCOM, it can communicate between multiple languages written. The RMI is different, which is limited to communication between the object implemented by Java. Obviously, this is a constraint. But RMI is very simple to use. In addition, RMI developers can design protocol specifications with Java. Therefore, in the function of the language, you can do it. If you write a DCOM server that only processes two or three clients, it is also relatively simple. However, it is quite difficult to construct a DCOM server that is highly efficiently handled for hundreds, thousands of clients. In order to facilitate writing scalable DCOM servers, Microsoft releases a Transaction Server (MTS). MTS also provides services such as automatic generation clues and smart objects while supporting transaction processing. The MTS makes it easy to make the scalable server. Even applications without transaction processing are also beneficial to use MTS. In fact, Microsoft encourages people to write MTS applications with VB. This is different from the traditional techniques of the development business server. All MTS applications are written as more than one COM object and must be implemented in DLL. In general, the client does not see MTS. The client can only be made, and the COM object can be used. 2. Components Standardization Based on components, the method is used, as in assembly of electronic devices, it can be constructed with a manufactured component component. The desktop is called the ActiveX control based on COM-based components. The so-called ActiveX control is just compliance with a certain standard, a COM object interacting with the client. For example, the ActiveX control must be disclosed by Automation (ie, using Dispinterfaces). With this standardized interaction function, you can use the same control in multiple different contexts. On this standard interface, the ActiveX control is almost performed. Many software companies can provide controls that implement various functions. The ActiveX control is written as DDL, for this, must be loaded into a container. The prototype container of the ActiveX control is VB, in addition to this, there are also a variety of containers available. Currently, a very important control container is Microsoft's Web Browser Internet Explorer. Now the contents of the so-called ActiveX control are required to achieve many methods. They have been moved from the local hard drive of the machine to the VB and other containers. There seems to be no big differences for hundreds of KB and a few MB controls. But when loading the control into a web browser, it is likely to pass the phone line with a very slow speed. Now, the control of the control is already a very critical issue. Once you want to perform a control over a certain limit, you will extend the download time. Therefore, Microsoft regulates: In the ActiveX control, you can only perform absolutely necessary features.
OpenDoc, which is implemented by Apple and IBM, is once a major competitor of ActiveX control. Now OpenDOC sponsored enterprises have officially announced the suspension of funding. Most of the company with Microsoft confront, support JavaBeans (based on Java-based component structure). ActiveX controls are basically bundled with Windows, which is distributed in binary machine code, while Javabeans is different, where it can be executed. This is of course expensive. Obviously, as long as the portability is not sacrificed, it is impossible to completely utilize the local environment. To write components that can be downloaded from the public Internet, you should prefer JavaBeans.
The desktop component market is continuous, rapid growth. Most of them are constructed in ActiveX controls (current JavaBeans is still a few). But the standardization of the server component is backward. On the desktop, web browsers, VBs, and PowerBuilders are powerful as the container. But what should the server container? As a component container on the server, the transaction server is a better option.
Microsoft's competitors, do everything possible to prevent MTS and NT from dominate the market. They are playing the assembly criteria on the server on the rapids, with the most promising is Enterprise JavaBeans. It is an expansion of JavaBeans and defines the transaction server interface. Enterprise JavaBeans supporters, I hope that independent software vendors are not written as COM components, but to be written as beans. Fourth, ActiveX's Construction Tools
With the promotion of ActiveX controls, the development tool of ActiveX control is increased day by day. Since ActiveX does not depend on the language, traditional development tools can basically build, equipped with ActiveX controls. The most commonly used Delphi, PowerBuilder, and Visual Basic, Visual C , Visual J , etc.
Basic profile
The method of developing ActiveX controls with 3GL is: 1mfc (Microsoft Foundation Class, Microsoft Foundation Class), 2TL (ActiveX Template Library, ActiveX Template), 3BaseCtrl Framework, etc. MFC is the most classic, using MFC, which allows developers to do not care about the interface, but focus on the action of the object. The disadvantage is that the control is large and the DLL must exist at the same time as the container. ATL can generate code with template. That is, the library and DLL do not need to be launched with the control. In ATL, it is necessary to derive class from several basic classes as templates. ATL also has a disadvantage that the interface is difficult, and the necessary interfaces must be applied. In addition, ATL does not support class wizards. Unfortunately, there is no guide to the object description language and interface definition language file, and automatically synchronize with the user code. Basectrl is a simple library. It is very similar to ATL, but no template. In fact, because BaseCtrl is too simple, Microsoft does not support it. In BaseCtrl, there are several universal controls. BaseCtrl provides an ActiveX development model that is easy to understand, but is not simple compared to ATL, and flexibility is not as ATL. At present, it is a "bitter" choice for ActiveX control developers. 2. Development Tools
The initial tools for making ActiveX controls are Microsoft Visual C . It provides the most controls for ActiveX developers. Visual J can also make an ActiveX control. Borland's two tools (JBuilder and Intrabuilder) are also very eye-catching. However, using Borland's tools can make ActiveX components, only Delphi 3.0 and C Builder. Borland's ActiveX development feature called Delphi, called Active Inside. It is in the form of an ActiveX in the ActiveX. Active Inside is equipped with new controls equipped on the Web. Delphi can link controls to COM and DCOM. PowerBuilder 5.0 is transformed into ActiveX development, client / server development tools. PowerBuilder can be equipped with the core part of the PowerBuilder application development as an ActiveX control. To make the current PowerBuilder developer, you can use some familiar features such as PowerScript programming languages. It has the best tool for making ACTIVX controls and is Microsoft. For example, if you use Visual Basic 5.0, developers can develop controls using visual programming environments and local Visual Basic for Application language.
Five, ActiveX