Components Of .net Framework:
DOTNET Framework contains the following Components
1. CLR (Common Language Runtime)
i) CLS (Common Language Specification)
ii) CTS (Common Type System)
iii) GC (Garbage Collector)
IV) JIT (Just In Time) Compiler
2. BCL (Base Class Libraries) of FCL (Frame Work Class Libraries)
1. CLR (Common Language Runtime)
i) CLS (Common Language Specification)
ii) CTS (Common Type System)
iii) GC (Garbage Collector)
IV) JIT (Just In Time) Compiler
2. BCL (Base Class Libraries) of FCL (Frame Work Class Libraries)
- CLS:
CLS is responsible to provide Language interoperability
This is achieved in 2 ways 1)Managed code 2)Unmanaged code
Language interoperability :
Provides code execution support that has been written in other programming Language is known as Language interoperability
Language interoperability is achieved using managed and unmanaged. - Managed Code:
Code for which MSIL is generated after Language compiler compilation is directly executed by the CLR known as managed code.
The code execution process is known as managed code execution
CLR will provide all the facilities and features of .NET to the managed code execution like Language interoperability, Automatic memory Management, Common Data type system, exception handling mechanism, code access security etc.
The code execution process is known as managed code execution
CLR will provide all the facilities and features of .NET to the managed code execution like Language interoperability, Automatic memory Management, Common Data type system, exception handling mechanism, code access security etc.
- Unmanaged Code:
Code that has written before development of .Net for which MSIL is not available is not executed by the CLR directly rather CLR redirects the code to os for execution which is known as unmanaged code
The code execution process is known as Unmanaged code execution
CLR doesn’t provide all the facilities and features of .NET to the managed code execution like Language interoperability, Automatic memory Management, Common Data type system, exception handling mechanism, code access security etc.
Examples for Unmanaged code are COM components, win32APIs etc.
Always managed code execution is faster and unmanaged code execution is slow.
The code execution process is known as Unmanaged code execution
CLR doesn’t provide all the facilities and features of .NET to the managed code execution like Language interoperability, Automatic memory Management, Common Data type system, exception handling mechanism, code access security etc.
Examples for Unmanaged code are COM components, win32APIs etc.
Always managed code execution is faster and unmanaged code execution is slow.
- What is CLS?
Language Specification :Every programming Language will have some syntactical rules used to write the code which is known as Language specification.
As we know that in managed code execution process .Net supports many programming Language.
Every programLanguage has its own specification.
One programming Language cannot understand other programming Language specification
But CLR is able to execute all programming Language code this because,CLR cannot understand any programming Language specification rather CLR has its own Languagespecification (syntactical rules) for its MSIL.
One programming Language cannot understand other programming Language specification
But CLR is able to execute all programming Language code this because,CLR cannot understand any programming Language specification rather CLR has its own Languagespecification (syntactical rules) for its MSIL.
Any Language compiler should follow thisLanguage specification of CLR at the time of compilation and should generate MSIL, CLR’s JIT Compiler will generate native code from MSIL and CLR will execute it.
This Language specification of CLR is common to all programming Language’s of managed code execution of .NET and is known as CLS(Common Language Specification).
- CTS:
Every programming Language has its own data types
One programming Language cannot understand other programming Language data types
But CLR will execute all programming Language’s data types , this is possible because CLR will contain its own data types ,which is common to all the programming Languages
At the time of compilation all Language specific data types are converted in to CLR’s Data type
This data type system of CLR which is common to all programming Language’s of .net is known as common type system.
This common type system is divided into two categories
1. Value types
2. Reference types
Value types
- The data types which store the data directly into their memory locations is known as value types
Referenced types:
- The data types which do not store the data directly into their memory locations rather refers to the other memory locations is known as reference types
Diff between value types and reference types
Boxing:Boxing is the process of converting a variable from value type to reference type
Unboxing:Unboxing is the process of converting a variable from reference type to value type
Sources : Wikipedi and MSDN
Sources : Wikipedi and MSDN
No comments:
Post a Comment