. NET structure

Source: Internet
Author: User

. NET includes four components:

Vos type System

Meta data

Common Language Specification

Virtual Execution System

Here's a brief description of each of them.

2.1.1, Virtual object system

. NET Cross-language integration comes from the support of the Virtual object System (VOS).

The most important problem in code reuse and application integration among different languages is the compatibility problem between different language type systems. It can be imagined that, although the grammatical structure of different languages is roughly the same, however, the data types are closely related to the various characteristics of the locale itself, it is difficult to imagine that an interpretative language has the same data type as a compiled language, and even the same data types differ in the meaning expressed in different locales. For example, the same is the integer type, in the MSSQL length is 32 bits, but in VB is 16 bits, the date time and string type in this respect the difference is more obvious.

Vos was built to change the situation. It supports both procedural and object-oriented languages, while providing a rich system to accommodate the features of the various languages it supports. It masks the conversion of different language types to the greatest extent, allowing programmers to choose the language they like (of course, the language must be supported.) NET application) is engaged in the development, guaranteed the integration between different languages.

For procedural languages, it describes the type of value and specifies the rules that all values of the type must comply with, and in object-oriented languages it unifies the object model of different programming languages. Each object is uniquely identified in the Vos to distinguish it from other objects.

2.1.2, meta data

Metadata is a salutation to the type description code in Vos. When the compiler converts the source code to intermediate code, it is automatically generated and is included in the binary code file, together with the compiled source. The metadata carries a description of the type information in the source code, which solves some version problem: The type description used by the program is bound to itself.

When the CLR locates and loads a type, the system obtains the type information in the application by reading and parsing the metadata, and after the JIT compiler obtains the loaded type information, translates the intermediate language code into local code, based on which an instance of the type is established according to the program or user requirements. Because of the entire process, the CLR always establishes and manages the types of specific applications based on metadata, thus ensuring type safety.

In addition, metadata has its own role in the invocation of solution, the establishment of runtime context boundaries, and so on. And everything about metadata is made up of. NET is completed in the background.

2.1.3, Common Language Specification

The common Language Specification (Common Language specification,cls) is a collection of CLR-defined language attributes that are used primarily to resolve interoperability issues. If a class is CLS-compliant, other programming languages that also adhere to the CLS specification will be able to use its externally visible items. See section II of this chapter for a detailed description.

2.1.4, virtual execution system

The virtual execution system (Visual Execution system,ves) is the implementation of Vos, which is used to drive the running environment. The generation and use of metadata, the compliance check of common language specification and memory management during application execution are all done by it. Specifically, the VES has mainly completed the following functions:

Load Intermediate Code

Use JIT to convert intermediate code to local code.

Load metadata.

Code management Services-including garbage collectors and exception handling.

Customization and commissioning services.

Threading and environment management.

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.