.NET Framework Technology Overview


The .NET Framework is factored into several components. First, the Common Language Runtime (CLR) is the virtual execution environment — sometimes called a virtual machine — that is responsible for executing managed code. Managed code is any code written in a high-level language such as C#, Visual Basic, C++/CLI, IronPython, and the like, which is compiled into the CLR's binary format, an assembly, and which represents its executable portion using Intermediate Language (IL). Assemblies contain self-descriptive program metadata and instructions that conform to the CLR's type system specification. The CLR then takes this metadata and IL, and compiles it into executable code. This code contains hooks into CLR services and Win32, and ultimately ends up as the native instruction set for the machine being run on. This happens through a process called just-in-time (JIT) compilation. The result of that can finally be run.

Then of course, the .NET Framework itself, a.k.a. WinFX, or commonly referred to simply as "the Framework," is the set of platform libraries and components that constitute the .NET API. In essence, you can think of WinFX as the next Win32. This includes the Base Class Libraries (BCL), offering ways to utilize Collections, I/O, networking, among others. A complex stack of libraries is built on top of the BCL, including technologies like ADO.NET for database access, XML APIs to manipulate XML data, and Windows Forms to display rich user interfaces (UIs).

Lastly, there are hosts that can run managed code in a specialized environment. ASP.NET, for example, is a combination of hosted environment and libraries that sit on top of the BCL and CLR. The ASP.NET host extends the functionality of the CLR with runtime policies that make sense for web applications, in addition to offering services like integration with Internet Information Services (IIS) so that IIS can easily dispatch a request into ASP.NET's web processing pipeline. SQL Server 2005 and Internet Explorer are two other examples of native applications that can host the CLR in process.

Figure 1-1 depicts the stack of technologies at a very broad level, drilling into the CLR itself in a bit more detail. This diagram obviously simplifies the number of real working parts, but can help in forming an understanding of their conceptual relationships.

image from book
Figure 1-1: Overview of the Common Language Runtime (CLR).

This book looks in depth at every single component on that diagram.

Key Improvements in 2.0

There are many key improvements in version 2.0 of the .NET Framework and CLR. Listing them all here would be impossible. They are, of course, mentioned as we encounter them throughout the book. I'll highlight some of the "big rocks" right here — as they're called inside Microsoft — that consumed a significant portion of the team's effort during the 2.0 product cycle.

  • Reliability: Along with 2.0 of the CLR came hosting in process with SQL Server 2005. A host like SQL Server places extreme demands on the CLR in terms of robustness and failure mechanisms. Nearly all of the internal CLR guts have been hardened against out-of-memory conditions, and a whole set of new reliability and hosting features has been added. For example, SafeHandle makes writing reliable code possible, and constrained execution regions (CERs) enable the developers of the Framework to engineer rock-solid libraries, just to name a few. The hosting APIs in 2.0 enable a sophisticated host to control countless policies of the CLR's execution.

  • Generics: This feature has far-reaching implications on the type system of the CLR, and required substantial changes to the languages (e.g., C# and VB) in order to expose the feature to the programmer. It provides a higher-level programming facility with which to write generalized code for diverse use cases. The .NET Framework libraries have in some cases undergone substantial rewrites — for example, System.Collections.Generic — in order to expose features that exploit the power of generics. In most cases, you'll notice the subtle mark, for example in the case of System.Nullable<T>, enabling things that simply weren't possible before.

  • 64-bit: Both Intel and AMD have begun a rapid shift to 64-bit architectures, greatly increasing the amount of addressable memory our computers have to offer. There is a 64-bit native .NET Framework SKU, which now ships with JIT compilers targeting the specific 64-bit instruction sets. Your old code will just work in the new environment thanks to WOW64 (Windows-on-Windows64), which is substantially more reliant when compared to the migration nightmares from 16-bit to 32-bit just over 10 years ago.

Of course, there is much, much more. While this book takes a broad view of the platform, plenty of 2.0 features are highlighted and discussed in depth in this book.




Professional. NET Framework 2.0
Professional .NET Framework 2.0 (Programmer to Programmer)
ISBN: 0764571354
EAN: 2147483647
Year: N/A
Pages: 116
Authors: Joe Duffy

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