Hi Friends,
Here is the explanation for CLR,CLS and CTS.
Common Language Runtime:
.Net provides environment called as Common Language Runtime to run the applications and provide some services.
Before explaining more about this let me explain where CLR comes into picture in the managed execution process.
Below are the steps involved in Managed execution.
To utilize the benefits of the runtime choose one or more compilers which target the Runtime.
2.Compilers convert your source code into Metadata + MSIL
JIT compiler or nGen.exe compilers converts the MSIL into native code depending on the system configuration after optimization.
Here comes CLR to provide environment to that enables execution to take place and provides services that can be used during the execution process.
As we see in the previous steps before coming to CLR we had MSIL + Metadata, CLR used metadata to locate the classes, layout the instance in memory and resolve method invocations.
It’s the responsibility of the CLR to support applications and components whose objects are across different languages. To fulfill its responsibilities it has CTS (Common Type System) to define how types are declared and used in CLR when I say CLR I mean any language that is targeted to CLR.
CLS (Common Language Specification): CLS has some requirements for CLS compliance. If your code conforms to these required then your code can be called from any other CLS compliant code.
Common Language Specification:
It’s set of rules that are to be followed by all the .Net CLR compliant languages.
It’s basically for interoperability between the .Net CLR compliant languages.
We can develop .Net application which can have components developed multiple languages.
To fully interoperable with different languages used, Objects must expose only common functionalities that are understood by all the languages.
So if the component that you have developed has the CLS compliant code, then it can be used by any other CLS compliant language.
Common Type System: As name itself indicates it defined how types are declared, used and managed in Common Language Runtime .It’s to common language integration support.
It has defined rules for languages that target CLR to ensure objects written in different languages can interact.
Friends,Please leave your feedback.
No comments:
Post a Comment