Wednesday, May 13, 2009

What is .Net Framework

.Net Framework is a platform or collection of tools and languages, used for the development of web based as well as window based applications. .Net framework is mainly comprised of two main components named Base Class Library and Common Langauge Runtime.

1. Base Class Library (BCL): Base class library consists of predefined classes which help in performing various tasks like connectivity with the database, web development, accessing the database,security settings of applications etc. during development of an application. This library of classes is commonly shared by all the languages that are available in the .net framework. Some of these langauges include C#, Visual Basic etc.. Latest version of .Net framework 3.5 supports more than 90 languages.

2. Common Language Runtime (CLR) : This component of .net framework manages the execution of the code written in various langauges . A developer writes his/her code in C# or J#. At compile time , the .net compiler for these languages convert them into Intermediate Language (IL) or Microsoft Intermediate Language (MSIL). At run time , a component of CLR known as JIT Compiler converts this code into its native code that can be understood by the operating system. JIT compiler converts only the required code into native code and not whole of the code.

Apart from this , CLR also perform some important tasks which include :

(a) Memory management : It involves allocating required memory for the execution of a program and deallocating the same after the program is completed.

(b) Thread management : It involves managing execution of two or programs or processes running at the same time.

(c) Garbage Collection : This task is performed by garbage collector. Its job is to get back the memory allocated to the objects that will not be used again by the application .

(d) Exception Handling : Exception handling is a method to control the flow of execution of a program when an error occurs. When an error occurs, an exception is said to be raised.

No comments:

Post a Comment