Infotech. ActiveX. Engine Design Ideas

Source: Internet
Author: User
In the company's development process, ActiveX solutions were proposed and adopted by the company's senior management. Today, ActiveX engines are being researched and developed;
The test is passed and deployed successfully.

ActiveX Engine is an ActiveX form that runs on an html page;

Implementation principle:


Main functions:
The Client browser only needs to install two required assemblies. It is responsible for calling and loading the Assembly from the webservices background to the local device;

Requirements:
UserControl is used in Assembly, so its Owner can use exe packaging as the standard Winform. If it is run through Activex engine, it can also be used as an RIA application;

Difficulties:
1. solved: The AppDomain method is used to disassemble each Assembly to avoid conflicts between the current domain and the Assembly version. However, it is difficult to add UserControl to the Controls of the current domain, however, I solved the problem. The method is quite different and can be implemented directly using an unmanaged api.
2. Solved: the entire process of remote assembly-related assembly is transparent, using intelligent search, packaging, compression, and transmission to client activex engine.
3. unsolved: During script interaction, the parameter type deformation of the method remains unsolved. in C #, for example, the parameter is object [] Params. so how should we pass it in javascript? (Currently, we have adopted a very stupid method)

Use Case:
Assembly: Test1.dll

Class UserControlTest: UserControl {
...
}

HTML: Test.htm
<Object classid = "..."/>
<Script type = text/javascript> core1.LoadAssembly ("Test1.dll", "UserControlTest"); </script>

Core1 is an ActiveX. Engine instance. It provides the loading method and interacts with Current UserControl. Reflection is used for this part.

ActiveX. Engine is used in some complicated and low-level modules of B/s, such as serial communication/advanced charts.

The origin of this idea:
Http://chinasf.cnblogs.com/archive/2006/06/11/WINCTS.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.