You are on page 1of 3

.

NET FRAMEWORK
By, Mona Salma
Platform: It is an environment where all the resources are available for performing a particular
task. It is an environment for developing and executing applications. Platform is little more than
OS in context of some additional features which are required for execution of an application in a
given situation.
Framework: It is ready to use collection of classes and interfaces used for developing a
particular type of application.
As a developer, applications are stored in managed applications and these applications would use
class libraries which are part of .net framework. These applications can use custom libraries
which probably we may lay from third party or even we might develop it and these libraries
further in turn would depend on the .net framework runtime and it would depend on the OS and
it would depend on the hardware for execution of the instructions.
The core of .NET framework:
- Application services
- Framework/base class library: It provides the core functionality
ASP.net, web services, ADO.net, Windows forms, xml, etc.
- Common Language Runtime(CLR): It manages .NET base services
Garbage collection,
Memory management,
Exception handling and
Loading/running applications
Windows GUI application using win forms: It has controls. It has API for supporting graphics.
WPF (Windows presentation foundation) is console based application which are GUI rich
windows application more aesthetic and colorful. In each item along with text, image can be
added. Very interactive, highly animated and resolution independent.
Windows services: run in the background of an application. Server kind of services run windows
services like SQL.
ASP.NET Web Application (ASPX/MVC) is a framework which is used for developing web
based applications in .net framework. It uses web forms whose extension is ASPX/MVC.
WCF (windows communication foundation services): Service oriented application. By using
WCF a component can be developed which is reusable for different people across the network
without becoming the sole owner of the component. It provides infrastructure for hosting
services.
Mobile/smart devices applications: They would only interact with the server where WCF service
is hosted and consumed in the device.
.Net Framework class library (FCL):
FCL also begins with system. It is a superset of the entire class library. It includes a huge
collection of reusable classes, interfaces and value types that expedite and optimize the
development process and provide access to system functionality.
Base class Libraries (BCL): It is a huge collection of classes. It includes a small subset of the
entire class library. It is something readymade which is extensible and reusable. It is language
independent. Completely object oriented. It begins with system.namespace which is a logical
collection of classes and other types with unique name.
Metadata: is self-describing. It is stored in a file called manifest and it contains information about
the members, types, references and all the other data that the CLR needs for execution.
Microsoft Intermediate Language (MSIL) is a machine independent instruction set whereas
metadata describes its machine instructions which will be used by CLR at runtime and other
applications which would use that code in some other applications for invoking the functionality.
Portable Executable (PE): is a Microsoft win32 compatible format for .net applications which
can contain MSIL code & metadata in binary format. PE file contains MSIL code instructions in
binary format. Both MSIL and metadata assembled together are known as PE.
Common Language Runtime (CLR):
The CLR uses metadata to locate and load classes, generate native code, provide security and
execute managed code. It manages .net applications. It allows only those applications which are
safe to use and because of that there is performance loss. CLR restricts .net applications based on
how the CLR or the machine has been configured.
Managed code:
The code that is targeted to CLR is referred to as managed code. It has features of the CLR
which is object oriented, type safe and cross language integration which means code of one
language can be used in another language.
Cross language exception handling the runtime error if it is thrown in code of one language, it
can be captured or handled in the code of other language. Everything which is in MSIL format in
our PE file is managed code.
Components in CLR:
JIT compiler: It is responsible for compiling the code from MSIL to native code and the
executed native code is executed by code execution component.
Just before the code requires to be executed JIT will be responsible for converting that block of
code which is required to execute to native format. It doesn’t convert everything to native
format, only the code which is pending for execution immediately. The compiled code will stay
in memory so that the same compiled code will be reused for execution. It is an overhead at
runtime.
Code execution: It is a part of CLR which is responsible for code which we give to CLR in the
form of MSIL.
Garbage Collection: This is responsible for cleaning up memory which are abandoned. It
destroys an object.
Security manager: Evidence based security implements is done by security manager. It analyses
whether the given block of code is safe to execute based on the policy file or not, and if it has
permission to execute the code if not it will throw a security exception and terminate the
application.
Class loader: is one which loads the class into memory and that loaded class is further used for
creating the objects. In .net unless some code is needed it is not loaded. It is on demand loading
which is taken care of by class loader.
Common type system (CTS):
Datatypes which are compatible to call the programming language. It defines how types are
declared, used and managed in the runtime and is also an important part of the runtime’s support
for cross language integration.
Automatic memory management:
CLR takes care of managing memory of the application. In .net we don’t get opportunity to work
with memory. It works with variables.
The CLR manages memory for managed code.
- All allocations of objects and buffers made from a managed heap.
- Unused objects & buffers are cleaned up automatically through GC.
Some of the worst bugs in software development are not possible with managed code such as
- Memory leakages
- Dangling pointers
- Reading of uninitialized variables.
- Pointerless environment
CLR is ready code which will execute through .exe with .net framework we have one dll called
mscorlib.dll, it is in that dll al major components of clr are implemented. When a .net application
is launched the very first instruction that a .net application will have is to load mscorlib.dll which
is actually the .net CLR dll the core library and it will hand over the execution from here to
corlib wherein the instructions in mscorlib will then be responsible for the code which we have
in the .net application. That’s how it is said .net CLR is managing the code.
References:
https://en.wikipedia.org/wiki/.NET_Framework
http://vb.net-informations.com/framework/what_is_net_framework.htm

You might also like