Monday 28 March 2011

.NET FRAMEWORK AND ITS ARCHITECTURE


.NET FRAMEWORK AND ITS ARCHITECTURE:

Before going to explore what .Net Framework is? We need to understand actually what the framework is? Framework as define on dictionary.reference.com/ that:

“Framework is a skeletal structure designed to support or enclose something.”

In general, a framework is a supporting structure for building the desired projects by using the tools and resources provided by the framework. In computer science framework is a set functions or classes and by using these functions or classes we can build our complex applications.

.Net Framework support the designing of next generation applications from as simple as Console Application to as complex as windows form Application, web application, windows phone 7 applications and etc. It provides the flexibility for the programmer to design his code in more than 30 languages. In .Net Framework one can create an application or library in one of the language supported by .Net Framework and can use it on program written on another language. .Net Framework is basically consists of two major components 1) Common Language Runtime (CLR) 2) Frame Class Library (FCL). This is also illustrated in the figure bellow:



Common Language Runtime in .Net Framework is responsible of the execution of .Net code and it provides several useful services such as memory management, thread management, Exception handling, Garbage Collection, Security and etc. The code compiled from C sharp compiler or other language compiler is in Microsoft Intermediate language which is not understandable to operating system, So CLR runs the Just in Time Compiler (JIT) to convert the MSIL to machine native language which can be executed. So in other word CLR communicates with the OS for execution of .Net code. In this way our program does not need to communicate with OS.

Framework Class Library in .Net Framework contains a huge collection useful and reusable classes which we can use them in our project to build complex applications very easily. In other word FCL gives us flexibility to implement the functions in just single line which needs a large number of Line of Code (LOC) for the implementation in the previous or other languages. As shown in the figure FCL is also divided in major chunks such Base Class Library (BCL), ADO.Net, Web Services and etc. BCL contains all those libraries that are common to all languages which can be used in .Net Framework. ADO.Net contains the libraries related to accessing the databases. Web Services contains the libraries related to the development of web based applications.

Common Language Specification is agreement among languages those are support by .Net Framework that every language must contain some common subset which is defined in CLS. You can also create your own language and make it supported by .Net Framework by including those common subsets. CLS provides the basic rules that are requires for language integration.

1 comment: