The Microsoft .net framework is a complete software package that can be installed on the computer running on the Microsoft windows operating system. The component that make the .net platform are collectively called .net framework.
Dot net framework supports multiple programming or it is a neutral language environment for developing application. Interoperability features can be achieved in dot net framework.
The Dot net framework is a managed, typesafe environment for developing and executing application. The DotNet framework manages all aspects of program execution like memory management, allocation of memory for the storage of data and instruction, granting and denying permission for the application as well as reallocation of memory which is not needed.
THE DOT NET FRAMEWORK CONSIST OF 2 MAIN COMPONENTS
1) CLR (COMMON LANGUAGE RUNTIME)
2) CLASS LIBRARIES
1.CLR (COMMON LANGUAGE RUNTIME)
CLR is the execution engine for dot net framework or it is called the heart of dot net framework. It provided the working environment which the program executes and provides core services like compilation, memory management thread management and garbage collection.
The various components of CLR are:
COMMON TYPE SYSTEM(subset of CLR) |
MSIL(Microsoft intermediate language) |
Execution support function |
Class loader |
Memory management |
Garbage collector |
WORKING OF CLR
When the dot net code is compiled the output of the compiler is not an executable code but a file that is special type of code called MSIL (Microsoft intermediate language), it’s the responsibility of CLR, source code can be converted into MSIL with the help of CLR.and MSIL can be converted into executable code with the help of JIT (just in time) compiler. The JIT compiler converts MSIL into a native code into a demand basis as each part of the program needed.
WORKING OF THE CLR
CTS (COMMON TYPE SYSTEM)
CTS are a subset of CLR.Interoperability features is achieved by CTS.CTS describes how types are declared used and managed.
cross language support is managed by CTS for e.g. in VB we have “integer “and in C++ we have long, int these data types are not compatible so the interfacing between them is very complicated in order to communicate two different languages Microsoft introduces CTS in dot net frameworks integer data type in vb.net and integer in C++ will convert it into system int32.
CLS (COMMON LANGUAGE SPECIFICATION)
CLS is a specification that defines the rules to support language integration. In this way programs written in any other language can change in .another language this is managed by CLS.
MSIL (MICROSOFT INTERMEDIATE LANGUAGE)
All source code written in any other .net supporting language when compiled are converted into MSIL or in other words MSIL converts the source code into intermediate language and then machine code by JIT compiler.MSIL is also called IL(intermediate language) or CIL (common intermediate language),now a day’s popularly known as MSIL.MSIL is the core of the .net framework.
ILDASM (INTERMEDIATE LANGUAGE DISASSEMBLER)
ILDASM is a tool in which we can see the inner working of the application allowing you to find out where we can optimized our code ILDASM.exe can be open in any one of the portable executable file like,exe(executable file),dll(dynamic link library),.mod(module) , .mdl(memory descriptor list).
The portable executable file contains three main piece of information.
· CIL instruction
· Metadata
· Assembly manifest information
JIT (Just In Time)
JIT is the fastest compiler because only those lines of code can be executed which is needed. First the source code can be converted into MSIL, MSIL is converted into an executable code with the help of JIT compiler.
There are two types of JIT compiler:
- Standard JIT compiler
- econoJIT compiler
Econo JIT compiler compiles fastest than standard JIT compiler, but the code it produces is not the standard as the code which produces by JIT compiler.
2. CLASS LIBRARIES
Class libraries is the second important entity if the dot net framework which is designed to integrate with the CLR.the libraries gives the program access to runtime environment. The libraries consist of prewritten code; more than 1300 classes are built in class libraries.
Database as well as various security aspects can be managed with the help of Class libraries. The main components of the class libraries are threading XML, I/O, XML etc.
Anonymous User
14-May-2019Thanks for sharing the post.
Sunil Singh
12-Jul-2017Keep sharing these types of articles.