Anda di halaman 1dari 2

Explain CLI, CIL, CTS, Metadata, CLS, IL and VES in .

NET
CLI - Common Language Infrastructure. Microsoft has a piece of shared source, it
s the public implementation of ECMA Common Language Infrastructure. This shared
code is code-named "Rotor". It has around 3 million lines of code. Those who are
interesed in development of a language that targets the .NET Framework, may ext
ensively make use of this CLI. The following topics are covered in the Shared So
urce CLI :
* The CLI type system
* Component packing & assemblies
* Type Loading & JIT Compilatino
* Managed code & Execution Engine (CLR)
* Description of Garbage Collection process & memory management
* The Platform Adaptation Layer (PAL): a portability layer for Win32, Mac OS X, an
d FreeBSD
Its been written by the Microsoft Team that has developed the .NET Framework.
Note: A compiled managed assembly is comprised of IL, Metadata and Manifest.
CIL Stands for Common Intermediate Language. Its actually a low level human read
able language implementation of CLI. All .NET-aware languages compile the source
oode to an intermediate language called Common Intermediate Language using the
language specific compiler. It is also possible to build .NET assemblies direclt
y using CIL using the ilasm.exe compiler. This compiler is shipped along with th
e .NET Framework 2.0 SDK. CIL is the only language that allows access to each as
pect of the CTS. CIL is the definition of the fundamentals of the .NET framework
.
CTS - stands for Common Type Specification. It is at the core of .NET Framework'
s cross-language integration, type safety, and high-performance code execution.
It defines a common set of types that can be used with many different language s
yntaxes. Each language (C#, VB.NET, Managed C++, and so on) is free to define an
y syntax it wishes, but if that language is built on the CLR, it will use at lea
st some of the types defined by the CTS.
Metadata - is code that describes the compiled IL. A .NET language compiler will
generate the metadata and store this in the assembly containing the CIL. Metada
ta describes all class members and classes that are defined in the assembly, and
the classes and class members that the current assembly will call from another
assembly. The metadata for a method contains the complete description of the met
hod, including the class (and the assembly that contains the class), the return
type and all of the method parameters. When the CLR executes CIL it will check t
o make sure that the metadata of the called method is the same as the metadata t
hat is stored in the calling method. This ensures that a method can only be call
ed with exactly the correct number of parameters and exactly the correct paramet
er types.
CLS - Common Language Specification. A type that is CLS compliant, may be used a
cross any .NET language. CLS is a set of language rules that defines language st
andards for a .NET language and types declared in it. While declaring a new type
, if we make use of the [CLSCompliant] attribute, the type is forced to conform
to the rules of CLS.
IL - Intermediate Language, is the compiled form of the .NET language source cod
e. When .NET source code is compiled by the language specific compiler (say we c
ompile C# code using csc.exe), it is compiled to a .NET binary, which is platfor
m independent, and is called Intermediate Language code. The .NET binary also co
mprises of metadata.
Its important to note here that metadata describes the IL, whereas manifest desc
ribes the assembly.
VES - Virtual Execution System. The Virtual Execution System(VES) provides an en
vironment for executing managed code. It provides direct support for a set of bu
ilt-in data types, defines a hypothetical machine with an associated machine mod
el and state, a set of control flow constructs, and an exception handling model.
To a large extent, the purpose of the VES is to provide the support required to
execute the Common Intermediate Language instruction set.

Anda mungkin juga menyukai