Quick and dirty intro to .NET Framework

So…. what is this fuss all about Microsoftʼs .NET Framework? And how can it help the developer create better, more scalable, more reliable and more distributed applications? I hope to answer all this stuff here, soon.
To begin with, a major part of .NET consists of a set of DLLs, (for example System.dll, System.Data.dll, System.Drawing.dll, System.Xml.dll and so forth). These ʽassembliesʼ (to speak in a more .NET way) contain classes that we, developers, will use during development in order to create our fabulous programs! These assemblies encapsulate various I/O calls, thread creation/manipulation, DBMS access etc. and are called BCL (Base Class Libraries). Moreover, .NET consists of the execution engine, which is ofthen referred as CLR (Common Language Runtime). Primarily, the CLR is responsible of low level details such as memory allocation (C programmers, forger the * and & stuff !!) and security checks. Another fundamental block of .NET Framework is the CTS (Common Type System). The CTS strictly describes all possible data types and programming constructs that are permitted in the CLR and how these entities can be represented in .NET metadata format (.NET medatata is, rather abstractly speaking, the way for one .NET assembly to describe its object model to another assembly. Weʼll get to that later).
So, you might think, that you write down C#, you compile it, the result of the compilation is native platform code, so you take it and run it everywhere . Wrong. In .NET, there is really only one language. IL (Intermediate Language). You may see it referred as MSIL (Microsoft Intermediate Language), or CIL (Common Intermediate Language). I prefer to use the name IL, but you have to understand that IL, MSIL and CIL are the one and the same thing. Anyway, as I said, IL is the only .NET language. The other languages, like C#, VB .NET, J# are just .NET aware (full catalog of .NET aware languages is available
here – URL subject to change). What does this mean? It just means that you write down a program in the .NET aware language of your choice, and when you compile it with the appropriate compiler, it is then transformed into platform agnostic IL code and type metadata. When I say platform agnostic, I mean that the output IL code is completely unaware of the operating system that is to be executed.
More specifically, the result of the compilation is a .dll or .exe file called assembly containing

  1. IL code (just as Java source compilation results in bytecode)
  2. Metadata
  3. The assembly manifest ( it contains information about the current version of the assembly, culture information that is to be used for localization, and a list of any assemblies that are referenced and are needed for our assembly to run properly)

A last thing to mention, a .NET assembly can be single-file or multi-file. When it is multi-file, it (as you can easily understand) consists of several files, but one of them MUST be the primary file (called primary module).
This was a ʽquick and dirtyʼ intro to .NET framework.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s