.Net Framework
- .Net Framework is a software required for .Net applications on any machine, which masks the functionalities of an operating system and executes the .Net languages compiled code i.e. CIL code under its control by providing the features like:
- Portability (Platform Independency)
- Security
- Automatic Memory Management
Fig: .NET Framework |
Development of .Net Framework:
- Microsoft has started the development of .Net’s framework in late 90’s originally under the name NGWS (Next Generation Windows Systems).
- To develop the framework, first a set of applications have been prepared known as CLI (Common Language Infrastructure) specifications.
- CLI specifications are open specifications standardized under ISO (International Standards Organisation) and ECMA (European Computer Manufacturer Association), giving a chance for everyone to develop the framework.
- The CLI specifications talks about four important things, like:
b. CTS (Common Type System)
c. BCL (Base Class Library)
d. VES (Virtual Execution System) or CLR (Common Language Runtime)
a. CLS (Common Language Specifications)
It is a set of base class rules, all the .Net languages has to adopt for inter-operating or communicating with each other, most importantly after compilation of any .Net language program, they should give the same output code i.e. CIL code, so that, if any two languages wants to inter-operate with each other, then compiled code mismatch will not occur.
b. CTS (Common Type System)
- According to this, all languages of .Net has to adopt “Uniform Data Type Structure” i.e. similar data type must be same in size under all languages of .Net, so that, if any two languages wants to inter-operate with each other, size problems with data types will not come into picture.
- As most of the .Net languages are extension to some existing languages like Cobol.Net extension to Cobol, VB.Net extension to VB etc.; the data type name will be different from language to language, but even if names are different, similar types will be uniform in size.
- Any data type that is used in any .Net language once after compilation gets converted into IL types as following:
int Int 32
float Single
bool Boolean
VB.Net —> Compiled —> CIL Code
Integer Int 32
Single Single
Boolean Boolean
- In IL format, all data type will be same, so when we want to consume the code of a .Net language from other .Net language, the data type of first language are first converted into IL types and then presented to the second language as its understandable data types only, as following:
Integer (VB.Net) —> Int 32 (IL Types) —> int (C#)
Integer (VB.Net) <— Int 32 (IL Types) <— int (C#)
Note: CLS and CTS are the foundation for Language Interoperability between .Net languages.
c. BCL (Base Class Library)
- A library is a set of reusable functionalities. Each and every programming language have built-in libraries like header files in C, CPP; packages in Java etc.
- Same as above, .Net languages are also provided with built-in libraries known as BCL. The speciality of these libraries are they can be consumed under any .Net language as following:
Fig: Base Class Libraries |
d. VES (Virtual Execution System) or CLR (Common Language Runtime)
- All .Net languages once after compilation will generate the same type of output code known as CIL code and this CIL code what we install on client’s machine for execution.
- To run CIL code on any machine, first the machine should be installed with .Net framework software and inside of that framework we have the VES or CLR which converts CIL code into machine code according to Client’s Platform (Operating + Microprocessor), as following:
Fig: VES or CLR |
- The framework software is available separately for each operating system because framework is not Platform Independent.
No comments:
Post a Comment