Search This Blog

Monday, January 25, 2010

What are the components of dotnet framework?

Hi guys,
In the last article we have discussed about the introduction to the dotnet framework and what exactly the dotnet framework is all about! What the dotnet framework is and what not!

Now we will continue of discussion with the components of the .net framework and we will see a sample program in c#.

Various components of .NET framework are:
  • Common Language Runtime (CLR)
  • Base Class Libraries (BCL)
  • Framework Class Library (FCL, it is the superset of BCL above)
The following picture gives more idea
about the components of the .NET framework

You can observe the picture beside which shows more components like LINQ, ADO.NET entity framework, WPF, WCF,WF,Card Space etc (We will discuss in future posts, don't panic about them now only).

But the essential things are Common Language Runtime and Base Class Library which are the most important part of .NET framework.

CLR (or Common Language Runtime) is the base for the .NET framework on top of which the framework is built. CLR is responsible for the execution of the programs which are written in any of the languages (supported by .NET framework , say e.g., C#, VB.NET etc). CLR provides many features for the programmers which include Security, Memory Management, Exception Handling and many other. The essential feature that CLR provides is that the programmer need not know the hardware configuration of the target (client) machine on which the program needs to execute.. Because CLR takes care about the hardware configuration of the client on which the program runs. This opens the doors of Platform Indepence.
The following pictures gives you the idea about platform independence:


Theoritically .NET framework is Platform Independent, but practically it is not. Because there is no implementation of .NET framework (and CLR) for Unix/Linux operating system developed till now. "MONO" is the project to develop such a framework but it is still in development stages. So, practically speaking .NET framework is not platform independet. In future it may (for sure) become platform independent.


The Base Class Library (BCL) is a standard library available to all languages using the .NET Framework. .NET includes the BCL in order to encapsulate a large number of common functions, such as file reading and writing, graphic rendering, database interaction, and XML document manipulation, which makes the programmer's job easier. It is much larger in scope than standard libraries for most other languages, including C++, and would be comparable in scope to the standard libraries of Java. The BCL is sometimes incorrectly referred to as the Framework Class Library (FCL), which is a superset including the Microsoft.* namespaces. FCL forms the main set with BCL acting as the subset.
The BCL is updated with each version of the .NET Framework.

The following picture gives you clear idea and clears your doubts about FCL and BCL:



You can clearly see the picture here. Observe that the FCL is the superset of BCL.

BCL contains the namespaces like System.IO, System.web etc which are most common for programming needs.

FCL contains BCL+other namespaces includes System.* and Microsoft.* (i.e., all other namespaces required in the .NET framework.
I hope you got some idea about how .NET framework is developed and what are all the components of .NET framework.

Following is a sample C# program:

Program:


// Hello1.cs
public class Hello1
{
public static void Main()
{
System.Console.WriteLine("Hello, World!");
}
}
 
Output: 


Hello, World!
 

Code Discussion

  • Every Main method must be contained inside a class (Hello1 in this case).
  • The System.Console class contains a WriteLine method that can be used to display a string to the console.

3 comments:

  1. It is really a great work and the way in which u r sharing the knowledge is excellent.you explain the architecture of Dotnet in simple way ,how the process are done on dotnet phase.
    Thanks for helping me to understand basic concepts in theory. As a beginner in Dot Net programming your post help me a lot.Thanks for your informative article.
    dot net training institute in velachery | dot net training in chennai

    ReplyDelete
  2. Thanks for sharing such informative guide on .Net technology. This post gives me detailed information about the .net technology. I am working as trainer in leading




    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery





    ReplyDelete

Leave your suggession & comment...