The .NET Framework is a common environment for building, deploying, and running Web Services and Web Applications.
The .NET Framework contains common class libraries - like ADO.NET, ASP.NET and Windows Forms - to provide advanced standard services that can be integrated into a variety of computer systems.
The .NET Framework is language neutral. Currently it supports C++, C#, Visual Basic, JScript (The Microsoft version of JavaScript) and COBOL. Third-party languages - like Eiffel, Perl, Python, Smalltalk, and others - will also be available for building future .NET Framework applications.
The new Visual Studio.NET is a common development environment for the new .NET Framework. It provides a feature-rich application execution environment, simplified development and easy integration between a number of different development languages.
Languages Supported By .NET |
Common Type System and CLS |
CLS(Common Language Specification) Compliant Attribute
|
ASP.NET and Web Forms |
Windows Forms |
|
Database Support in .NET |
|
XML Support |
|
Base Class Library | ||||||||||||||||||||
The Base Class Libraries (BCL) provides the fundamental building blocks for any application you develop, be it an ASP.Net application , a Windows Forms application, or a Web Service. The BCL generally serves as your main point of interaction with the runtime.BCL classes include | ||||||||||||||||||||
|
Common Language Runtime |
The Common Language Runtime (CLR) provides a solid foundation for developers to build various types of applications. Whether you're writing an ASP.Net application , a Windows Forms application, a Web Service, a mobile code application, a distributed application, or an application that combines several of these application models, the CLR provides the following benefits for application developers:
|
The CLR is the execution environment provided by the Microsoft .NET Framework. It provides many services such as
|
Because the CLR manages the code execution, all the code that is targeted for the CLR is known as managed code. Managed code emits metadata along with the executable. This metadata is used to describe the types (classes) and members used in the code, along with all the external references used in executing the code. The CLR uses this metadata to load the classes during execution and resolve method invocations during runtime. |
The CLR provides automatic garbage collection of the objects that have been loaded into memory. All objects that are created via the new operator are allocated memory on the heap. A program can allocate as many objects as are required by the program logic. However, when an object is no longer required, there must be some mechanism to free up the memory that was occupied by the object. |
This is accomplished in the CLR via a program called garbage collector, which collects all objects in memory that have no references. This program runs as a low-priority thread in the background process and collects all unreferenced objects. Because memory management is automatic, the chances for memory leaks in the program are minimized. However, the time when garbage collector would actually release the objects from the memory is not known. This concept is known as nondeterministic garbage collection because it cannot be determined in advance when the objects would be released from memory. |
If sufficient memory is not available for creating new objects, the CLR throws an exception that can be caught and gracefully handled by the application. |
Code Access Security (CAS), as the name suggests, is used to control the access that the code has to system resources. The CLR has a runtime security system. Administrators can configure policy settings by specifying the resources that can be accessed by the code. |
A call stack is created that represents the order in which the assemblies get called. The CLR's security system walks the stack to determine whether the code is authorized to access the system resources or perform certain operations. If any caller in the call stack does not have the requisite permission to access the specific system resources, a security exception is thrown by the CLR. |
Simplified versioning is another feature provided in the .NET Framework. It supports versioning and also provides for side-by-side execution of different versions of the same component. The specific versions of the assembly and the dependent assemblies are stored in the assembly's manifest. The copies of the same assembly that differ only in version numbers are considered to be different assemblies by the CLR. |
Simplified deployment is one of the features provided in the .NET Framework. The most important point to mention is that .NET components do not need to be registered in the Windows registry. All code generated in the .NET Framework is self-describing because assemblies contain the manifest and metadata information. This information contains all the data about the dependencies of the assembly and the specific versions of the components that these assemblies would use at execution time; therefore, multiple versions of the same components can coexist. The CLR enforces the versioning policy. |
Cross-language interoperability is an important feature, and it was one of the design goals of the .NET Framework. This feature is possible because of the CTS and CLS. |
Visual Studio .NET allows for debugging across an application consisting of different languages targeted for the CLR. In fact, the IDE also allows for debugging an application in which managed code interacts with unmanaged code. |
CLR ensures that performance of the code execution is optimized. Compiled code is stored in cache. When the same code is called next time, this code is loaded into memory from cache. This advantage stands out more in the case of ASP.NET applications than for ASP applications. ASP code was interpreted every time an ASP page was requested. In ASP.NET, the code is compiled only once when the page is requested for the first time. This ensures that performance is optimized. |
The .NET Framework also provides some classes for tracking the performance of the .NET applications. These classes are known as performance counters. The .NET Framework provides performance counters for getting information on exception handling, interoperation with unmanaged code, loading and unloading code into memory, locking and threading, memory, networking operations, and so on. These performance counters help to fine-tune the performance of the .NET applications. |
COM+ Services |