Monday, June 22, 2009

UNDERSTANDING .NET



NET INTRODUCTION
·         .Net is a new framework for developing web based and windows based applications within the Microsoft environment.
·         The framework offers a fundamental shift in Microsoft strategy. It moves application development from client-centric to server-centric.
The Core of .NET Framework are Common Language Runtime (CLR) and Framework Class Library (FCL).
  • Common Language Runtime
    • Garbage collection
    • Language integration
    • Multiple versioning support (no more DLL hell!)
    • Integrated security
  • Framework Class Library
    • Provides the core functionality such as ASP.NET, Web Services, ADO.NET, Windows Forms, IO, XML, etc.
THE COMMON LANGUAGE RUNTIME
The common language run time, popularly known as CLR is the heart and soul of the .Net framework. As the name suggests, CLR is a runtime environment in which programs written in C# and other languages are executed. It also supports cross language interoperability.
The CLR provides a number of services that include:
·         Loading and execution of program
·         Memory isolation for applications
·         Verification of type safety
·         Compilation of IL into native executable code
·         Providing metadata
·         Memory management(automatic garbage collection)
·         Enforcement of security
·         Interoperability with other systems
·         Managing exception and errors
·        

 
Support for task such as debugging and profiling
Common Type Systems (CTS)
The .Net framework provides multiple language support using the feature known as Common Type System that is built into the CLR. The CTS supports a variety of types and operations found in most programming languages and therefore it does not require type conversions. Though c# is specially designed for the .Net platform, but one can build .Net programs in a number of other languages including c++ and Visual Basic.
Common Language Specification (CLS)
The common language specification defines a set of rules that enables interoperability on the .NET platform. These rules serve as a guide to third party compiler designer and library builders. The CLS is a subset of CTS and therefore the languages supporting the CLS can use each others’ class libraries as if they are their own. Application program Interfaces (APIs) that are designed following the rules of CLS can be used by all the .NET languages easily.
Microsoft Intermediate Language (MSIL) or Intermediate Language (IL)
  • NET languages are not compiled to machine code.  They are compiled to an Intermediate Language (IL).
  • CLR accepts the IL codes and recompiles to machine code.  The recompilation is just-in-time (JIT) meaning it is done as soon as a function or subroutine is called.
  • The JIT code stays in memory for subsequent calls.  In cases where there is not enough memory it is discarded thus making JIT process interpretive.
Managed Code
  • Code that targets the CLR is referred as managed code
  • All managed code has the features of the CLR
§  Object-oriented
§  Type-safe
§  Cross-language integration
§  Cross language exception handling
§  Multiple version support
  • Managed code is represented in special Intermediate Language (IL)

FRAMEWORK BASE CLASSES
.NET provides a library of base classes that can be used to implement applications quickly. User can use them by simply instantiating them and invoking methods or by inheriting them through derived classes, thus extending their functionality.
Much of the functionality in the base framework classes resides in the vast namespace called System, can use the base classes in the system namespace for many different task including:
·         Input/Output Operations
·         Starting handling
·         Managing arrays, lists, maps, etc
·         Accessing files and file systems
·         Accessing the registry
·         Security
·         Windowing
·         Window massage
·         Database management
·         Evaluation of mathematical functions
·         And many more

No comments:

Post a Comment