Microsoft .NET is a framework for distributed, portable,
scalable computing. This article discusses the features of the framework and
the related terminologies, provides an insight to its architecture, and then
discusses ASP.NET, ADO.NET, Web Services, Remoting, and the robust security
model that this framework is designed on.
Features of the .NET Framework
The Microsoft .NET Framework has the following features:
Cross Language Integration
Common Runtime Engine
Base Class Library
The Common Language Specification
It is a set of language-independent conventions intended to
promote language interoperability for programs running inside the runtime
environment. It defines types, methods, properties, fields, etc.
The Common Type System
The Common Type System (CTS) is a standard that defines a
set of types and rules for creating new types and enables multi-language
integration in the .NET environment. The common type system supports the
Value types are created in the stack, and reference types
are created in the managed heap. The primitive types, structs, and enums are
all examples of value types. Reference types are arrays, objects, etc. The
conversion of a value type to a reference type is called boxing; un-boxing is
the conversion of a reference type to a value type.
At runtime, the type checker ensures the validity of all
objects within the runtime environment. It makes sure that only valid
operations are performed on the code and throws exceptions on violations of the
.NET Framework Class Library
The .NET Framework Class Library (FCL) is a set of managed
classes that provide a lot of services. The following are some of the language
independent services provided by the FCL:
The Common Language Runtime
The CLR is a runtime engine that handles memory allocation,
security, code verification, type verification, exception handling, and garbage
collection. Managed code is one that runs in the context of the CLR and is
hence managed by the common language runtime itself.
The source code in .NET is compiled to an intermediate
language called the Microsoft Intermediate Language or the MSIL. This is then
converted to the native code at runtime by the Just In Time Compiler (JIT).
The CLR provides a lot of services for applications that run
in the .NET environment. These include:
Just In Time Compilation
Memory management and isolation of the application memory
Code Access Security
Verification of type safety
Conversion of the MSIL to the native code
Access to metadata
An assembly is a group of resources and types, along with
metadata about those resources and types, that is deployed as a single unit.
The source code of the .NET languages is not converted into
the native code. Rather, it is compiled into a machine-independent intermediate
code known as Microsoft Intermediate Language or the MSIL.
The JIT compiler
The MSIL code and metadata are loaded into the memory with
the help of Common Language Runtime (CLR). The JIT compiler then compiles the
MSIL code to native code and executes it at runtime. The JIT does not convert
the entire MSIL code to its native equivalent. Rather, it does so in demands,
i.e., the portion of the current execution code is converted and loaded into
the memory. Hence, it works the same way that Demand Paging works in Virtual Memory
supporting Operating Systems.
The Garbage Collector is responsible for cleaning up the
unused objects in the runtime environment. Objects are generally created in the
managed heap. Here the term 'managed' implies that it is cleaned implicitly by
the Garbage Collector. The garbage collector works based on these principles:
Small objects are generally short-lived and frequently accessed.
Larger objects are longer-lived.
Heap compaction of the large objects to minimize heap fragmentation
This is a feature that enforces type safety and checks the
code prior to its execution in the runtime environment. This disallows illegal
operations inside the runtime environment and hence prevents an application
running in the context of the runtime environment from crashing. Programs
running in the runtime environment have restricted access to memory and devices
of the system.
ASP.NET is a language-neutral, interoperable server side
technology that allows creation, execution, and deployment of scalable Web
Applications and Services. The advantages of ASP.NET over traditional ASP are:
Code Separation with the help of code behind file
Better State Management
Enhanced XML support
Support for pre-compilation of the ASP.NET pages
ADO.NET provides support for data access in Microsoft .NET
and its features include:
Support for disconnected data access model
Integration with the .Net framework
This model can, however, only be used from the managed code
environment. This implies that there is no COM interoperability allowed for
A web service is a platform–independent software component
that contains a group of functions that are packaged together for use in a
common framework throughout a network. Web services are based on the Simple
Object Access Protocol or SOAP.
This is a concept that enables different applications
residing on remote systems to communicate with one another. The .NET objects
are exposed to remote processes, hence allowing inter-process communication
between even remote systems. The remote objects are accessed through channels
that physically transport the messages to and from the remote objects.
Microsoft .NET follows compact security architecture that is
basically composed of but is not limited to:
The .NET Framework uses authentication to verify the
credentials of the individual users. Authorization is used to determine the
accessibility of a particular resource that a user is entitled to.
Impersonation is the process by virtue of which a resource can be accessed
under a different identity. The following are the types of security that the
.NET Framework supports:
Code Access Security (CAS)
Evidence Based Security
Role Based Security
Declarative and Imperative Security
Microsoft .NET is a device and platform-independent
distributed computing model based on open XML communication technology and
helps integrate users, devices, and applications for the different
environments. It promises to be the technology of choice for building robust,
scalable, portable applications for a long time to come.
For Further Reading