Microsoft .NET Architecture
page 1 of 1
Published: 20 Mar 2006
Unedited - Community Contributed
Abstract
In this article, Joydip discusses about the essential aspects of Microsoft .NET such as CLR, MSIL, ASP.NET, ADO.NET, and Web Services. He wraps up the dicussion with a short note about the security aspects involved with the .NET Framework.
by Joydip Kanjilal
Feedback
Average Rating: 
Views (Total / Last 10 Days): 27156/ 31

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:

·         Portability

·         Cross Language Integration

·         Interoperability

·         Common Runtime Engine

·         Base Class Library

·         Fast development

·         Simplified Deployment

·         Security

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 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.

.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:

·         File Handling

·         Remoting

·         Sockets

·         Database access

·         XML

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).

CLR Services

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

·         Garbage Collection

·         Code Verification

·         Code Access Security

·         Verification of type safety

·         Exception handling

·         Conversion of the MSIL to the native code

·         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 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. 

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:

·         Small objects are generally short-lived and frequently accessed.

·         Larger objects are longer-lived.

·         Heap compaction of the large objects to minimize heap fragmentation

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

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:

·         Language Neutrality

·         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

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

·         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

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.

.NET Remoting

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.

.NET Security

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:

·         Code Access Security (CAS)

·         Evidence Based Security

·         Role Based Security

·         Declarative and Imperative Security

·         Cryptography

 

Conclusion

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

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

 



User Comments

Title: Article Feedback   
Name: Dilip
Date: 9/4/2006 4:54:06 AM
Comment:
An interesting article, that takes a round of briefing what and how on .Net. I would like more on getting into coding with the tool, preferable one the author feels to start for a fresher on .Net
Title: .Net Architecture   
Name: Sudheer B
Date: 8/7/2006 6:07:42 AM
Comment:
The basic topic are explained good,but i feel it would be nice if explained with diagram (.net architecture & CLS).

Thanks
Title: hmmm good   
Name: Sreenu Sannidi
Date: 4/28/2006 2:07:53 AM
Comment:
very very nice article.
Title: Associate - Projects   
Name: Kishore Kumar
Date: 4/25/2006 2:21:54 AM
Comment:
Basic level .Net fundamentals & article also very good....
Title: reasonable   
Name: kishore
Date: 4/4/2006 8:03:23 AM
Comment:
ok but .net developers needs are not satisfied .they must give correct information for definitions as well as .net developers.
Title: Impressive   
Name: Reddaiah G
Date: 3/28/2006 6:58:42 AM
Comment:
This Article is Really good to learn.Even a beginner of
.NET can able to understand each & every concept
Title: Rating does not work   
Name: Yeshwant Hegde
Date: 3/23/2006 12:14:40 PM
Comment:
Though to rate this with 4+, unfortunately the url returns error logged sorry for the inconvenience. Hope this authors article deserves the rating to be published as rating would help others to take a call on continue reading or drop.(sometime not always)
Title: An interesting reading on .Net to start and grab what is what with .Net   
Name: Yeshwant Hegde
Date: 3/23/2006 12:11:20 PM
Comment:
An interesting article, that takes a round of briefing what and how on .Net. I would like more on getting into coding with the tool, preferable one the author feels to start for a fresher on .Net
Title: Programmer Analyst   
Name: Srinivas
Date: 3/23/2006 4:41:05 AM
Comment:
Need explanation of each and every concept.
Defination is not sufficient for novice .net devolpers.

But the way of presentaion is Good.
Title: Good   
Name: Ravi
Date: 3/22/2006 7:34:33 AM
Comment:
Very good summary of the concepts. Nicely designed article with good concise summary.
Title: Good   
Name: Manashi
Date: 3/21/2006 6:59:21 AM
Comment:
The basic knowledge of the article is good.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2014 ASPAlliance.com  |  Page Processed at 8/20/2014 6:24:18 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search