CLR Hosting (1)-Scalable Architecture and CLR Hosting

Source: Internet
Author: User

CLR Hosting (1) -- Scalable Architecture and CLR Hosting

1. Scalable Architecture

There are many different definitions for the Scalable Architecture, from a network cluster system to a small software with only a few components interacting, you can have different understandings and definitions of the scalable system. Similarly, when talking about CLR Hosting, it is impossible to ignore the Extensible system structure ). an important purpose of Net CLR is to obtain a highly customizable and scalable system.

In the context of this series of articles, an application system that defines an extension model and dynamically loads a specific "extension body" to any running process. This definition needs to be expanded.

First, an application has a scalable system, which must define and implement an internal Model system, namely the Object Model system. The objects mentioned here are not the C ++ or C # Language objects involved in program coding. They refer to component objects at a higher level, it may be a binary level (Physical Instruction space) Component Object (such as a COM component), or it may be supported by the IL code and Metadata (Logical space. net Assembly, a high-level component object, is generally implemented by one or more language-level objects. The model system mentioned here refers to the component objects inside these applications, A hierarchy is formed based on the specific relationships within the application. With the definition and constraints of this hierarchy, the application organizes these component objects and opens and exposes them, form an externally accessible Object Model for "extensions" (such as Addins, Extension Modules, scripts) or other external clients. A typical example of the object model system is MS Office applications, such as Excel internal applications, workbooks, Worksheet, Range, and other objects and their relational models, there are also VBA or COM Addin access to them.

Second, an application has a scalable system and must have dynamic characteristics. Dynamic features are the key to a scalable application. They have three meanings. First, you can control the loading of the Extended parts of the application (such as Addins, Extension Modules, and scripts) through configuration or other methods. Secondly, this application dynamically loads the Extended parts into the process according to the user's configuration or other solutions during runtime. Third, these extensions are not developed and created together with the application itself, but after the application is released, high-end users develop and release applications separately for specific needs, customization, or expansion purposes.

Third, if an application has a scalable system, it generally needs design considerations in terms of "expansion points. Although this is not necessary, a good extension design can make the vitality of a Scalable Application system more persistent. An extension point refers to a design factor, that is, it determines the layers at which an application can be expanded or customized, and determines the forms of extensions that an application supports. The following are the extension forms supported by the common extension point design. Generally, an application does not have to support all extension forms.

1) Addins is a scale-up and custom solution with relatively single tasks and many host constraints. However, it is entirely possible to implement very powerful functions.

2) Extension Modules (Extensions) is a solution with few host constraints. It is usually used in the design to complete several task units in a complete aspect.

3) Scripts is a script, which is a powerful extension and customization solution. Through scripts, you can fully access the built-in object model of the Host application (call the interface methods of the objects in the host and respond to their events ), it can also be designed to implement the extension components in the form of Gadgets specific to the Host application in the script mode.

4) Code Behind Document uses script technology in essence, but it emphasizes the unification of design and application. The main function of the Host application is fully or partially carried on the script code, so that the "extension customization mode" and "entity function implementation mode" are highly consistent. Script code becomes an indispensable part of the main function of the application.

The above three aspects describe the definition and understanding of the Extensible system in the context of this series of articles, and reach a consensus with the readers to facilitate future discussions. However, this is not our focus. Our focus is on a way to implement a scalable system.


2. DDH environment and CLR Hosting

There are only two ways to implement a scalable architecture. One is a fully custom design implementation, and the other is an existing available Hostable environment ). The latter has obvious advantages. Even if you select the former method and fully customize the design implementation, when the application system is perfected to a certain extent and the system structure design is excellent to a certain extent, this is also equivalent to a customized environment that is not necessarily complete. It can be seen that the two methods are not completely contradictory.

When a DDH is deployed in an available DDH environment, it is equivalent to directly standing at a high starting point. Generally, due to its special application requirements, a DDH environment requires more considerations in terms of general scope, structure rationality, and customization, therefore, its system rationality is trustworthy. In addition, when your application is stored in such an environment, it must be designed to adapt to the characteristics or requirements of some of its systems. The result of this reverse effect is, it improves the overall design level of your application. It can be seen that this method has obvious benefits for implementing a scalable system. If you are designing a highly scalable and custom application, it is recommended to choose an existing available ha environment.

Which of the following common accessible environments are available for us on the MS technology platform? List it.

1) The Active Script Engine, such as VBScript or JScript Script Engine, uses this Engine to obtain support for the Script, allowing the application to support customization and expansion.

2) vba apc is generally used to store data in the Visual Basic for Application environment. This is a mature and sleep environment for MS On the Win32 platform, and is also the most common. MS's own Office system, AutoDesk's AutoCAD, Intellution's iFix, and Kingsoft's WPSOffice development edition are all implemented as its host.

3). Net CLR this is the latest sticky Environment Technology in MS. It provides more powerful scalability and customization capabilities for applications on the MS Win32/64 platform or. Net platform in Managed Code mode. It is the only main content of this series of articles.

It is worth mentioning that I did not list Trident (IE Browser core) and ASP. NET above. From the perspective of the DDH environment, Trident (MSHTML) is actually a DDH environment with Active Script Engine, it is used in browser programs, mail clients, game clients, and other applications. ASP. NET is a local device. net CLR, which is used by IIS or other systems to support ASP. NET Web Application and ASP.. NET Web Service.

In the list of common DDH environments above, you can see. Net CLR, and you will be able to know the position of. Net CLR Hosting in the entire Hosting large background knowledge system. So, as the latest generation of MS, the. Net CLR can be used in addition to ASP. NET. So far, are there other host applications?

Ms SQL Server 2005 and IE6/7 are examples that can be taken immediately.

So far, no non-MS product has been installed in this environment. However, we can imagine that this situation may change soon .. Net CLR core technology is gradually stable. The way and trend of applying. Net CLR in MS will directly affect the attitude of the outside world. On the Win32 platform, a large number of applications are faced with problems. net, it is almost impossible to port or rewrite the management environment in a large area ,. net CLR Hosting will be the most smooth method. Till now,. Net CLR Hosting is a new application topic. Whether it is desktop application development, server software development, or embedded environment development, CLR Hosting will play its role. Isn't this an opportunity for us who have the honor to go through this stage of technological development?

If the answer is yes, what are we waiting?

As the first article in the series, this article describes the background knowledge of Hosting, points out the position of CLR Hosting in this knowledge system, and prepares for subsequent articles. In addition, the Hosting-related vocabulary is listed and briefly annotated below to facilitate readers to read and understand the content of this series.

Host CLR -- sleep CLR -- Here Host is a verb, indicating the meaning of the sleep action.

CLR Host -- Here "Host" is a noun that indicates a main application system that is located in the CLR. The meaning includes both the Host environment and the resident environment.

Host Envirenment-Host environment-noun phrase, which indicates the environment in which the main program is provided for the Host environment. The meaning does not include the sleep environment itself.

Hostable Envisionment-A noun phrase indicating the environment entity that can be accommodated by the host system.

Hosted Environment -- Hostee -- the same as that in the Environment where the host is installed.

CLR Hosting-CLR sleep-A noun phrase that indicates the sleep process, technology, and concept. The specific meaning depends on the context.

Return to the first article (directory)

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: 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.