The three keys in dot net are as follows:
- CLR (Common language Runtime).
- CTS (Common Type Specification).
- CLS (Common Language Specification).
Alright now whats the big deal about them?
Well for a start your dot net system depends upon all these three components for proper execution of the code.
CLR (common language runtime): The CLR is also know as the "execution engine" of .NET. It's the CLR that manages the execution of programs. When the .NET program is compiled, the output of the compiler is not an executable file but a file that contains a special type of code called the Microsoft Intermediate Language(MSIL, now called CIL, Common Intermediate Language). This MSIL defines a set of portable instructions that are independent of any specific CPU means that the MSIL code is independent of the computer h/w and OS. It's the job of the CLR to translate this Intermediate code into a executable code when the program is executed making the program to run in any environment (but before you run such program make sure that .net framework is present in that machine else it wont work).
This MSIL is turned into a executable code using a Just In Time complier (JIT) and then finally you see your output so in a nutshell process goes like this:
when .NET programs is executed the compiler creates the MSIL code which is converted into native code by the JIT (JIT will be triggered by theCLR) and hence you see your output.
Also the other advantage is that the programmers need not worry about managing the memory themselves in the code. Instead the CLR will take care of that through a process called Garbage collection. This frees the programmer to concentrate on the logic of the application instead of worrying about memory handling.
what does MSIL really do for you?
First of all you cannot access the MSIL code, the advantage of MSIL is that it makes your code compatible with other programming language which means that I write a program in C#.NET and compile it. The CLR will take your code and put it into this MSIL language so that other languages in the .NET group can understand it.
Lets say you come along and want to write a VB.NET application that works with my C#.NET application. No problem. Your VB.NET application will get translated into MSIL as well and will read the MSIL from my C# application and they can work together.This is the top notch advantage of the .NET framework.Now you can have projects which have parts written in C#, VB.NET even VC++.NET and they can understand one another.
what does MSIL really do for you?
First of all you cannot access the MSIL code, the advantage of MSIL is that it makes your code compatible with other programming language which means that I write a program in C#.NET and compile it. The CLR will take your code and put it into this MSIL language so that other languages in the .NET group can understand it.
Lets say you come along and want to write a VB.NET application that works with my C#.NET application. No problem. Your VB.NET application will get translated into MSIL as well and will read the MSIL from my C# application and they can work together.This is the top notch advantage of the .NET framework.Now you can have projects which have parts written in C#, VB.NET even VC++.NET and they can understand one another.
CTS (Common Type Specification): The common type system defines how types (Data Types, Interface, Pointers, classes, Delegates, etc) are declared, used, and managed in the runtime, and is also an important part of the runtime's support for cross-language integration.
CLS (Common Language Specification): CLS provides set of rules and object oriented programming model to be followed by every .net language.when a language follow these rules and object oriented programming model then only that language was treated as .net language.
The mail purpose of cls is to integrate multiple language into .net. This is a subset of the CTS which all .NET languages are expected to support. The idea is that any program which uses CLS-compliant types can interoperate with any .NET program written in any language. This interoperability is very fine-grained - for example a VB.NET class can inherit from a C# class
i Hope that this post has helped you in understanding the these three keys of Dot net, any comments positive or negative are always welcome because they will help me in my blogging capabilities and will help me to help you.
nice and informative post.more info
ReplyDelete