What Is the .NET Framework?


The .NET Framework is an object-oriented programming platform that simplifies application development in highly distributed environments, including the Internet. The .NET Framework fulfills the following objectives:

  • To provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely.

  • To provide a code-execution environment that minimizes software deployment and versioning conflicts, guarantees the safe execution of code, and eliminates the performance problems of scripted or interpreted environments.

  • To make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web-based applications.

  • To build all communication on industry standards to ensure that code based on the .NET Framework can integrate with other code.

Common Language Runtime

The Common Language Runtime (CLR) is the foundation of the .NET Framework. Think of the runtime as an agent that manages code at execution time, providing a set of core services such as:

  • Memory management

  • Thread management

  • Remoting

The CLR also enforces strict type safety and other forms of code accuracy that ensure security. Thus, it is important to know how well the CLR is operating as this has a direct effect on your applications.

The following diagram shows how the Common Language Runtime underpins the architecture of .NET Framework-based applications.

click to expand
Figure 1.2: Architecture of .NET Framework-based applications

Any code which uses the Framework is known as managed code and can use the core services by executing under the runtime. Code that does not use the Framework is known as unmanaged code.

Note

To run managed code on a computer, the .NET Framework must be installed on that computer.

Using the managed environment of the runtime eliminates many common software issues. For example, the runtime automatically handles object layout and manages references to objects, releasing them when no longer in use. This automatic memory management helps to resolve the two most common application errors of memory leaks and invalid memory references.

The runtime also enforces code robustness by implementing a strict type- and code-verification infrastructure called the common type system (CTS). CTS ensures that all managed code is self-describing. A number of Microsoft and third party language compilers generate managed code that conforms to the CTS. Hence, managed code can consume other managed types and instances, while strictly enforcing type fidelity and type safety.

The CLR design supports a variety of different types of applications, from Web server applications to programs with a traditional rich Microsoft Windows operating system user interface. Each type requires a runtime host to start the application. The runtime host loads the runtime into a process, creates the application domains within the process, and loads user code into the application domains.

.NET Framework Class Library

The .NET Framework class library is a comprehensive, object-oriented collection of reusable classes, interfaces, and types that you can use to develop applications. The classes provide access to system functionality such as:

  • Security features

  • Graphical user interface (GUI) elements

  • Enterprise services (such as message queuing, load balancing, and transacted components

  • File input and output

  • Data access

The .NET Framework types are the foundation on which Framework applications, components, and controls are built. The .NET Framework includes types that perform the following functions:

  • Represent base data types and exceptions.

  • Encapsulate data structures.

  • Perform I/O.

  • Access information about loaded types.

  • Invoke .NET Framework security checks.

  • Provide data access, rich client-side GUI, and server-controlled, client-side GUI.

The .NET Framework provides a rich set of interfaces, as well as abstract and concrete (non-abstract) classes. You can use the concrete classes as is or, in many cases, derive your own classes from them. To use the functionality of an interface, you can either create a class that implements the interface or derive a class from one of the .NET Framework classes that implements the interface.

Note

Code that uses any of the classes from the .NET Framework class library requires the .NET Framework be installed on the computer on which it runs.




Deploying. NET Applications Lifecycle Guide
Deploying .NET Applications: A Lifecycle Guide: A Lifecycle Guide (Patterns & Practices)
ISBN: B004V9MSJW
EAN: N/A
Year: 2003
Pages: 53

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net