.NET CLI(Common Language Infrastructure)
The Common Language Infrastructure (CLI) is an open specification developed by Microsoft that describes the executable code and runtime environment that allows multiple high-level languages to be used on different computer platforms without being rewritten for specific architectures.
The source code in
compatible programming languages are compiled into CIL (Common
Intermediate Language), a language independent of the machine and the
processor, which is executed by virtual execution system (VES) of the
own framework of the machine (.NET etc.)
For any language on the CLI,
it must comply with two specifications:
CTS (Common Type System). A set of types and operation on types.
· CLS (Common Language
Specification). A set of rules allowing different languages to use the same
libraries
CTS
Common Type System (CTS)
describes the datatypes that can be used by managed code. CTS defines
how these types are declared, used and managed in the runtime. It facilitates
cross-language integration, type safety, and high-performance code execution.
The rules defined in CTS can be used to define your own classes and
values
CTS deals with the data
type. So here we have several languages and each and every language has its own
data type and one language data type cannot be understandable by other
languages but .NET Framework language can understand all the data types
Explanation
C# has an int data type
and VB.NET has Integer data type. Hence a variable declared as an int in C# and
Integer in VB.NET, finally after compilation, uses the same structure Int32
from CTS.
CLS
CLS stands for Common
Language Specification and it is a subset of CTS. It defines a set of
rules and restrictions that every language must follow which runs under the
.NET framework. The languages which follow these set of rules are said to be CLS
Compliant. In simple words,
CLS enables cross-language
integration or Interoperability.
Example
if we talk about C# and VB.NET then, in C# every statement must have to end with a semicolon. it is also called a statement Terminator, but in VB.NET each statement should not end with a semicolon(;).
Explanation of the above
Example
So these syntax rules
which you have to follow from language to language differ but CLR can
understand all the language Syntax because in .NET each language is converted
into MSIL code after compilation and the MSIL code is language
specification of CLR.
VES
Virtual Exectution System(VES) is an runtime system of the common language infrastructure which provides an environment to execute the managed code. It provides direct support for a set of buil-in data types.The purpose of the VES is to provide the support required to execute the CIL instructions set to the machine code(native code).
Metadata, in the Common
Language Infrastructure (CLI), refers to certain data structures
embedded within the Common Intermediate Language code that describes the
high-level structure of the code.
.NET Runtime Versions
.NET Framework
· The starting version of
.NET Framework is 1.0, released on 2002-04-15
· The latest version of
.NET Framework is 4.8.1, released on 2022-08-09
more details are below
.NET Core
· The starting of .NET core is 1.0,
released on 2019-06-27
· The latest verion of .NET Core is 8.0
Preview version
· The latest version of .NET core is 7.0,
released on 203-04-11
1.
Base and user-defined data types
2.
Support for exception handling
3.
Input/output and stream operations
4.
Access of data
5.
Supporting of creating web services/rest services
6.
Supportin of creating web – client application
7.
Supporting of creating windows-based UI applications
CoreFx
A set of framework libraries, which provide
base or primitive data types, app composition and fundamental utilities.While
.NET core shares a subset of .NETFramework API’s, it comes with its own API s
that is not part of .NET Framework.
There is a mix of
platform specific and platform -neutral libraries in .NET Core.
Comments
Post a Comment