1、 英文原文 Application of ActiveX Technology in the Remote Dynamic Monitoring System Xiaohui Mo and Yi Zhang Abstract. For the purpose of implementing industry remote Dynamic monitor based on the web in the MIS, the structure of system is the thin client model as Browser/Server, the html files which embr
2、aced ActiveX controls are downloaded on the client, the method of ActiveX control is called to access data port, and the remote data on the client are transferred by the way of ADO.In the paper, an application example is given according to the working experience, which introduces how to apply the te
3、chnology of ActiveX and ADO to B/S system structure. It is proved by practice that efficient and secure internet application software can be developed by adopting this system structure. Keywords: B/S, ActiveX, ADO, Dynamic Monitor System. 1 Introduction With the rapidly development of internet/intra
4、net technology, the network environment is constantly updated, and the browser technology is becoming more perfect, it is imperative to build remote dynamic monitoring system based on B/S.The purpose of research and development for the system is to require it to breakthrough the current closed situa
5、tion of the general monitoring system, and browse the dynamic situation with browser on intranet everywhere, and make the level of automation, operation management, economic and human investment and other aspects of enterprise in the higher cost performance. Recent years, with the functional require
6、ments improving of internet/intranet, many new technologies emergence to expand internet capabilities, it makes possible for those assumptions, the ActiveX technology based on the Component Object Model (COM) and Windows 32-bit application program interface (Win32API) is especially eye-catching. In
7、the paper, we discuss an application method of ActiveX technology in the development of dynamic remote monitoring system in a steel plant for readers to learn. 2 Key Technologies of System Development 2.1 ActiveX Technology ActiveX is the technology that Microsoft provide the majority of developers
8、to integrate the computer desktop environment and internet, and its substantial resources together 2-3. As a technology for internet application development, ActiveX is widely used in Web servers and clients in all aspects. ActiveX control technology is the core technology of ActiveX which will be u
9、sed to compile some interface program or complex program block(contains lots of graphics, images, etc.) in accordance with requirements of ActiveX control. The program is ActiveX control. In fact, ActiveX control is a program which accord the specification of ActiveX control. These programs usually
10、are stored on the server with exe,dll,ocx suffix. they can run on the server for other programs call, and also can be automatically downloaded to the client to run, thereby they can enhance the browsing speed. 2.2 ADO Technology ADO (ActiveX Data Objects) is the database access component of ActiveX
11、which is the latest product of Microsoft for database realease on the inernet, it can shield complexity of remote data access with high speed. There are seven separate objects and four collections in ADO model. These objects of ADO greatly simplify the complexity of database access, and make databas
12、e access easier. ADO supports VBScript, JavaScript and other scripting language with remote data service characteristics, especially for database access on the internet/intranet environment. It is particularly important for the monitoring system with B/S structure. 3 Application of ActiveX Technolog
13、y in System 3.1 Use ActiveX Control to Achieve Web Dynamic Display In Web pages of the system, we need to show curves, bar graphs, components and other graphics. The status of those graphics can be changed by real-time data. It is difficult to achieve dynamic graphics display by ASP and other pure W
14、eb technology, but ActiveX control technology is very suitable for internet/intranet applications . First, ActiveX control can be developed in multiple languages, such as VC, Delphi,VB and so on. ActiveX controls developed by these high-level languages are embedded in Web pages, they not only increa
15、se the flexibility of Web page development, more importantly, greatly expand Web features. they make some functions only achieved by high-level language to be realized easily in the Web pages. Secondly, after the ActiveX control on internet/intranet is automatically downloaded to the local, it will
16、become the local computers resources for future use.it can divorce from the Web server to be executed by IE as an independent process. So we arrange the database access and the graphical display capabilities to the ActiveX controls to implement. Web server only needs to embed ActiveX controls in HTM
17、L pages for IE browser download. After the control is downloaded to the client computer, the control will connect the network database to read real-time data and generate graphics based on the data5-6. Because the refresh timer function is added in the control, so the dynamic graphical display can b
18、e realized. Controls use ADO to access database. Because ADO can use connection string to connect database, so we only define connection string in design. ADO control is downloaded to the local computer without database configuration with more versatility. So it is more suitable to access database f
19、or distributed users on the intranet. Because the graphical display and refresh function run locally, Intranet only transport the real-time data, so this way reduces network data traffic, and ActiveX can provide better graphical user interface, and allows the realization of dynamic graphics for bett
20、er result . In addition to graphics, we also use this way to do various operations in the database such as query, modify and so on. this way is much faster rate than the ASP. 3.2 Example of ActiveX Control Development in Delphi As an excellent development tool, Delphi provides a powerful component d
21、evelopment technology, ActiveX controls can be easily compiled by it. ActiveX controls can be developed in two ways: First, make a single VCL (Visual Component Library) control in delphi directly into ActiveX control. Secondly, package multiple VCL to constitute functional complex ActiveX control by
22、 ActiveForm. ActiveX controls compiled by ActiveForm are very convenient, you can put in visual controls or non-visual controls in ActiveForm. We can use controls to compile more complex programs, and then add properties, methods, and events to the ActiveX type library. These properties, methods, an
23、d events associated with properties,methods, and events of ActiveForm allow users to operate their controls on the ActiveForm. ActiveX compiled into ActiveX controls with OCX Suffix can be easily embedded in Web pages. Figure 1 is ActiveX TrendControl which use to display field data trend and bar gr
24、aphs in the system. it reads real-time data of database on the server through ADO,and then convert the data to display with trend curve and bar graphs7-8. It can display four data at the same time. As it involves complex graphs, we use ActiveForm to develop it. ActiveForm of the TrendControl include
25、s the following main Delphi controls: ADOTable is used to access table on the database server by ADO mode. DBEdit shows data accessed by the TADOTable. DataSource shows data source interface between TADOTable and TDBEdit. Image is used to draw trend curve. Guage is used to display bar graphs. Timer is used to produce dynamic effects.