What is CLI and CLR ?


CLI  (Common Language Infrastructure) 

  • CLI is a specification defined by European Computer Manufacturers Association (ECMA).
  • This specification is for a virtual machine environment that enables applications written in diverse high-level programming languages to be executed in different system environments without changing or recompiling the original source code.
  • CLI also defines a common set of data types called the Common Type System (CTS) that should be used for programs written in any programming language targeting a CLI implementation.

So, CLI specifies a standard intermediate language for the virtual machine to which the high-level language source code is compiled.

CLR (Common Language Runtime) 

  • The CLR is a standardized environment for the execution of programs written in a wide range of high-level languages including Visual Basic, C#, and C++.
  • The specification of the CLR is now embodied in the European Computer Manufacturers Association (ECMA) standard for the Common Language Infrastructure (CLI), ECMA-335, and also in the equivalent ISO standard, ISO/IEC 23271.
  • So, The CLR is just one implementation of the CLI specification that executes under Microsoft Windows on a PC.
  • With the .NET Framework, intermediate language (defined by CLI) is referred to as Microsoft Intermediate Language (MSIL). Code in the intermediate language is ultimately mapped to machine code by a just-in-time (JIT) compiler when you execute a program.

Finally, 

The CLI is a standard specification; the CLR is Microsoft’s implementation of the CLI.
Code written in the CLI intermediate language can be executed within any other environment that has a CLI implementation.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s