Introduction to .Net Platform(1)
Microsoft .Net commonly pronounced as .NET is a platform for developing managed application.The word "managed" is a key concept.The word "managed" is a key functionality of .Net Platform.In traditional compilation process ,the compiler produced executable binary form.Which can be run on operating system immediately. However, in managed .NET ,the compiler does not produce executable binary format file,rather it produced file in assembly format(Read the detail of about that in later section).
Fig(1)
Fig(1) shows traditional compilation.In which the ,we compile the source code and then the compiler produces executable binary format file.
In .NET the source code is converted in to native code or machine code in two phases.
Phase 1:The compiler of any .NET language converts the source code into Microsoft Intermediate langunage (MSIL) commonly known as IL(Intermediate Language) or Byte Code.
Phase 2:The CLR(Common Language Run Time Environment)converts this byte code which is a assembly file into machine code. (Read the detail of these two phases in later section).
Fig(2)
Fig(2) is a overall diagram of the compilation process in .NET.
".NET supports multiple programming languages i.e C#,C++,VB etc. When you compile a program in .NET environment ,the compiler of corresponding language converts the source code into byte code or IL ,which is a assembly file. Then the CLR(Common Language Runtime) converts this byte code into machine code or native ."
Why bother having extra step of converting source code into machine code?
The key reasons are portability between operating systems, interoperability between languages and execution-management features such as memory management and security.
If the .NET Framework exists for a platform, that platform can run any .NET program. The ability of a program to run without modification across multiple platforms is known as platform independence.Code written once and run every where without modification saves our time and money.
(See the Interoperability feature of .Net in later section)
What is CLR?
1. CLR not just converts MSIL into machine code ,rather it manages memory,security and other features reliving the programmers from these responsibilities. Like in C++,you have to manage memory by your own,this lead to complexity and you need extra capabilities for that.
2.CLR holds information about the storage of data types and objects.(I will explain about data types and objects later for those who are new in programming ).
In Part 2 ,I will write about Language Inter-portability feature of .NET ,Common language specification and other important features of .NET.
really helpful keep it up
ReplyDelete