Components of the CLI


It is most important at the beginning to understand the basic elements of the CLI and how they are related. These elements are

  • Common Language Infrastructure (CLI)

  • Common Type System (CTS)

  • Common Language Specification (CLS)

  • Virtual Execution System (VES), which executes managed code and lies between the code and the native operating system

Figure 1-1 shows how these elements are related. Together, these aspects of the CLI form a unifying specification for designing, developing, deploying, and executing distributed components and applications.

Figure 1-1. Relationship of the CLI, the CTS, and the CLS

graphics/01fig01.gif

Each programming language that complies with the CLI uses a subset of the Common Type System that is appropriate for that language. Language-based tools communicate with each other and with the Virtual Execution System using metadata to define and reference the types used to construct the application. When a constructor is called to create an instance of an object, the VES uses the metadata to create instances of types, and to provide data type information to other parts of the infrastructure (remoting services, assembly downloading, security, etc.).

Languages and programming environments that do target the CLI there are currently more than 20, and the list is growing produce what is called managed code and managed data. The key to these is metadata information associated with the code and data that describes the data, identifies the locations of references to objects, and gives the VES enough information to handle most of the overhead associated with older programming models. This overhead includes handling exceptions and security, and providing information to tools that can ensure memory safety. It may also include running on remote systems by creating proxies for the programmer, as well as managing object lifetime (called garbage collection).

Among the things the CLI specifies are the following:

  • The Common Type System

  • The Common Language Specification for publicly available calls

  • Metadata

  • Portable file format for managed code

  • The Common Intermediate Language (CIL) instruction set

  • Basic requirements of a Virtual Execution System

  • A programming framework built on top of all of this

The CLI also bridges the managed and unmanaged worlds. The CLI describes how, in the same program, managed modules can be run with unmanaged modules compiled in native code (machine code, specific to a given system). This interoperation is also crucial to describing how modules can communicate though the VES with the underlying operating systems.



The Common Language Infrastructure Annotated Standard (Microsoft. NET Development Series)
The Common Language Infrastructure Annotated Standard (Microsoft. NET Development Series)
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 121

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net