What is Dot Net ?
Duh! It’s a Dot in a NET. (I hope it could be that simple)
Dot Net is an incredible infrastructure, an application interface that helps the
programmer to program the logic without even have to worry about the front end
crap. It has built in classes methods and solution to all common problems that
programmer faces everyday. Microsoft pre-coded the common tasks that a
programmer does everyday into classes, methods in a framework base class
library. When you code the program using C# or VB and run the program, Dot
Net compiler convert the code into CIL (Common Language runtime previously known
as MSIL (Microsoft Intermediate language) also called byte code. CLR (Common
Language Runtime) Jut in-time (JIT) compiler converts the code local to the
Operating System. Common Language Runtime also takes care of memory management,
thread management, exception handling, garbage collections, and security.
Dot NET is an incredible infrastructure, When i say infrastructure i mean is the
basic underlaying or features of a system that is already set
for us. Microsoft has alreay provided the basic features and layout of all the
common tasks that we do everyday. Just imagine if you have to develop an
application using HTML, you will have to code every single item on the
page...how long will it take to do that.....perhaps many days or
weeks.Therefore, Micorosft came up with the .Net framework and provided us an
application interface that helps us to program the logic without worrying about
front end such as coding a input button, text box, Button etc. It has built in
classes methods and solution to all common problems that programmer faces
everyday. Microsoft pre-coded the common tasks that a programmer does everyday
into classes and methods in a base class library.
Lets discuss the components of dot net Framework.
CLR: (Common Language Runttime)
As it names suggest, that it is a common runtime environment for all codes in
.NET Languages. This code in .Net is managed by CLR is therefore called managed
code. The managed code contains information about the code, such as classes,
methods and variables defined in the code. This information is called meta data.
The CLR uses meta data to provide safe execution of the program code.
-Garbage Collector The garbage collector is another feature of CLR, it
manages the system memory by removing the unreferenced variables. The garbage
collector automatically release the unreferenced memory sotherefore it prevents
memory leakage from the application.
How garbage collector works? when application runs, all variables,
classes objects and other declare resources are added to the memory space, this
whole process is called heap allocation. So when this heap allocation
gets full, the garbage collector kicks in and start deallocating memory to
resources that are no longer in use. This helps the application to add more
objects, classes and other resources to the memory hence making the usage of
memory more efficient.
CTS (Common Type System):
CTS is set of guidelines and standard data types. In order to make the
code (written in different language) work with other languages, Microsoft has
developed set of standard data types and guidelines to create user-defined
classes and objects for .NET framework. For instance I have written my classes
and methods in C ++, but now I have to create a visual interface in VB how I am
going to do accomplish this now? well the either I have to recode everything
from beginning or with the help of CTS (guidelines and standard data types) I
can use the code written in C++ in VB.
CLS (Common Language Specification): are defined set of rules that a .Net
language should follow to allows you to create application which is compatible
with other languages.