.Net Architecture and .Net Framework basics
- Common Language Runtime (CLR)
The heart of the .Net Framework. It is also called the .Net runtime. It resides above the operating system and handles all .Net applications. It handles garbage collection, Code Access Security (CAS) etc.
- Microsoft Intermediate Language (MSIL) Code
When we compile our .Net code then it is not directly converted to native/binary code; it is first converted into intermediate code known as MSIL code which is then interpreted by the CLR. MSIL is independent of hardware and the operating system. Cross language relationships are possible since MSIL is the same for all .Net languages. MSIL is further converted into native code.
- Just in Time Compilers (JIT)
It compiles IL code into native executable code (exe or dlls). Once code is converted to IL then it can be called again by JIT instead of recompiling that code.
- Framework class library
The .Net Framework provides a huge class library called FCL for common tasks. It contains thousands of classes to access Windows APIs and common functions like string manipulations, Data structures, stream, IO, thread, security etc.
- Common Language Specification (CLS)
What makes a language to be .Net compliant? Answer is CLS. Microsoft has defined some specifications that each .Net language has to follow. For e.g.: no pointer, no multiple inheritances etc.
- Common Type System (CTS)
CTS defines some basic data types that IL can understand. Each .Net compliant language should map its data types to these standard data types. This makes it possible for two .Net compliant languages to communicate by ing/receiving parameters to and from each other. For example CTS defines Int32 for C# int and VB integer data types.
- The .Net Framework
Is a combination of CLR, FCL, ADO.Net and XML classes, Web/Window applications and Web services.