Microsoft .NET Is A Framework For Distributed, Portable, Scalable Computing.
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.
• Portability
• Interoperability
• Fast development
• Simplified Deployment
• Security
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 following types:
• Value Types
• Reference Types
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 same.
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:
• File Handling
• Remoting
• Sockets
• Database access
• XML
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).
CLR Services
The CLR provides a lot of services for applications that run in the .NET environment.
These include:
• Garbage Collection
• Code Verification
• Exception handling
• Access to metadata
Assembly
An assembly is a group of resources and types, along with metadata about those
resources and types, that is deployed as a single unit.
MSIL
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 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.
Garbage Collection
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:
Code Verification
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
• Language Neutrality
ADO.NET
ADO.NET provides support for data access in Microsoft .NET and its features include:
• XML support
This model can, however, only be used from the managed code environment. This
implies that there is no COM interoperability allowed for ADO.NET.
Web Services
.NET Remoting
Microsoft .NET follows compact security architecture that is basically composed of but is
not limited to:
• Authentication
• Authorization
• Impersonation
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:
• Cryptography
Conclusion
http://www.midnightbeach.com/jon/pubs/2002/BorCon.London/dotNetArchitecture.html
http://www.gotdotnet.com/team/clr/about_clr.aspx
http://www.gotdotnet.com/team/clr/about_security.aspx
http://www.c-sharpcorner.com/Code/2002/Aug/GCinNet.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/cpguide/html/cpconthecommontypesystem.asp
http://www.c-sharpcorner.com/Articles/CompilationOfCSharpProgram.asp