Common language Infrastructure and its components – Programmerbay https://programmerbay.com A Tech Bay for Tech Savvy Sat, 14 Sep 2019 16:16:09 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://programmerbay.com/wp-content/uploads/2019/09/cropped-without-transparent-32x32.jpg Common language Infrastructure and its components – Programmerbay https://programmerbay.com 32 32 Common language Infrastructure and its components https://programmerbay.com/common-language-infrastructure-and-its-components/ https://programmerbay.com/common-language-infrastructure-and-its-components/#respond Sat, 14 Sep 2019 16:16:03 +0000 https://programmerbay.com/?p=5076 Common language infrastructure(CLI) is Microsoft’s defined guidelines which is approved by ISO and ECMA that explain and at the same time ensure codes of various high-level languages can be executed on any operating systems to achieve platform independent feature in .NET supported languages.

cli

That’s the reason why C# or .Net Framework languages are independent from computer hardware, however, the .NET design is not.  Mono( software that is used for developing a cross-platform application) helped some extent by providing support on Linux and other OSs.

CLI just not only provides the environment to execute your code independently but also allows the communication among two distinct and completely different programming language which helps the developers from the headache of rewriting the code.

So, CLI has the following components that work together:-

Common type System: 

The one which is responsible for providing the framework to use two or more languages together. It defines how types are declared and managed in a source code of any .NET language in the CLR( common language runtime where your bytecode or portable execution file turned into machine code). It also provides the OOPs model which enables  implementation of various high-level languages. It defines rules that must be followed, so that ,objects of different language can communicate with each other and provides the primitive data type libraries.

Informative stuff related CTS:

  1. Types in .NET:  In .NET, a type can be value type (represent actual value ) and reference type(similar to pointer). .NET framework supports these types Classes, Structures, Enumeration, Interfaces, and Delegates.
  2. Type Definition: It includes attribute(variable), types name, visibility, and base type.
  3. Type Members: We have attributes and to make them behave, we have type Members such as field, methods, constructors and more.
  4. Characteristics of type members:  Type members (methods ) can have various characteristics such as abstract, private, family and more). It’s not important that all the characteristics should belong to each and every type members.

Common Language specification

It is a subset of Common type system.CLI represents some commonality among the languages, these commonalities are used to achieve interoperability as its libraries developed in such a way that every language can directly use it.

Metadata(data about data)

It gives information about the program structure which includes classes and its members, embedded with intermediate language( instruction generated by the compiler in .NET).

Virtual Execution System

A runtime system which executes managed code( code generated in .NET).

]]>
https://programmerbay.com/common-language-infrastructure-and-its-components/feed/ 0