What Is .NET?


It is impossible to say anything about .NET without first explaining the core components .

.NET is a product vision and platform roadmap for Microsoft products. This includes a broad spectrum of products, architectural patterns, and solutions. The confusing part of .NET is the effect this strategy has in terms of your role within the organization. For example, developers have new tools and architectural patterns that are used to develop applications. Business users have new tools and technology that offer them additional productivity enhancement. The .NET platform is really a broad range of solution offerings that are built around three broad fundamental building blocks. Each of these represents a set of .NET core components.

The first building block is a set of industry-accepted standards that guarantee an application s ability to easily interact and communicate. There are a variety of these, but the main ones that we will focus on throughout this book are XML, Hypertext Transfer Protocol (HTTP), Universal Description Discovery and Integration (UDDI), and Web Services. These standards provide the core building blocks of application enablement across the other two components.

The second building block is a set of client- and server-based application solutions built on top of these standards and designed to solve a business problem. For example, Exchange 2003 Server delivers an e-mail and calendaring solution that uses XML and HTTP. Another example is BizTalk Server 2004, which provides workflow and data transformation services. Also included in this is Microsoft Office System 2003, which delivers both client- and server-based integration and productivity solutions.

The last building block is the development environment of Visual Studio.NET 2003. This component is designed to hide the semantics of the standards and enable developers to create and deploy solutions that solve problems as well as extend and interact with the various products. Basically, this enhances programmer productivity by allowing developers to solve business problems without having to code for specific standards. Each of these three core components is an essential piece of the .NET architecture, and all are interrelated in delivering an integrated solutions platform.

.NET Framework

Within each of these core building blocks is the technology stack that makes up the various components of .NET. Figure 1.1 provides a diagram. The most important of these is the .NET Framework, which is the Windows component that provides the compile and runtime services for applications and Web Services. Consider it the core plumbing that provides the standards-based implementation that allows developers to focus on writing the business logic.

click to expand
Figure 1.1: The .NET Framework consists of various layers .

The .NET Framework contains several different abstraction layers. At the bottom is the Common Language Runtime (CLR). The CLR contains a set of components that implement language integration, garbage collection, security, and memory management. The output of application code compiled within the CLR is Microsoft Intermediate Language (MIL). MIL is a language-neutral byte code that operates within the managed environment of the CLR. For developers, the CLR provides lifetime management services and structured exception handling. An object s lifetime within the .NET Framework is determined by the garbage collector (GC), which is responsible for checking each and every object to evaluate and determine its current status. The GC traverses the memory tree, and any objects that it encounters are marked as alive . During a second pass, any object not marked is destroyed and the associated resources are freed. Finally, to prevent memory fragmentation and increase application performance, the entire memory heap is compacted . This automatically prevents memory leaks and ensures that developers don t have to deal with low-level system resources.

On top of the CLR is a layer of class libraries that contain the interface and classes that are used within the framework abstraction layers. This Base Class Library (BCL) is a set of interfaces that defines things like data types, data access, and I/O methods . The BCL is then inherited into the upper layers to provide services for Windows, Web Forms, and Web Services. All of the base controls that are used to design forms are inherited from classes that are defined within the BCL. At the core of the BCL are the XML enablement classes that are inherited and used within the entire framework and provide a variety of additional services that include data access.

One of the major enhancements to .NET is within data access. The pre-.NET data access infrastructure of ActiveX Data Objects (ADO) and OLE DB was a tightly coupled connected environment. The Microsoft Data Access Component (MDAC) was a stack of services evolved primarily to keep up with the emergence of the Internet. Portions of ADO like Remote Data Services (RDS) were introduced to provide a disconnected data access model that would provide a familiar ADO model for Web developers. One additional feature of ADO was that it allowed you to load and save disconnected recordsets in and out of XML. Developers found it hard to reconcile the ADO data model, which was primarily relational with the new world of XML, where data was becoming heterogeneous and hierarchical. XML comes with its own object model (XMLDOM ”Document Object Model) and a different set of services ”XSL Transformations (XSLT), XML Path Language (XPATH), and schemas. Therefore, developers had to make an architectural choice of whether to use a relational design model or a more hierarchical or heterogeneous approach based on the type of application they were writing.

Developers had to decide which model would be the best one to service the application. In reality, what they wanted was to use both technologies. One of the strengths of the .NET Framework was the uniformity of the model. All components were designed to share a common type system, design pattern, and naming conventions. It just didn t make any sense to re-design the existing model within the context of the Framework. The result was a new design approach ”called ADO.NET ”which added core classes to the native Framework. For existing applications, a set of Component classes was added; these provide interoperability to the traditional ADO object model.

Among the key design decisions for ADO.NET was that XML and data access are intimately tied together. ADO.NET doesn t just use the XML standards; it is built on them. XML support is tied to it at every fundamental level. The result was a data access method that didn t require developers to make a choice in their design.

ADO.NET is divided into two levels. First is the managed provider. This enables high-speed managed access to the native database. The second level is the dataset, which is the local buffer of tables, or a collection of disconnected XML data collections. The majority of code that we will cover in this book uses the dataset and the managed provider as the connection and transport for database data.

Layered on top of the data access and XML layers and inheriting all of their features is the visual presentation layer of Windows Forms and Web Forms. The data access layer inherits all of the features of the bottom level and adds additional objects and classes that enable application developers to present and design a visual interface.

Residing at the top level is the Common Language Specification (CLS), which provides the basic set of language features. The CLS is responsible for defining a subset of the common type system that provides a set of rules that define how language types are declared, managed, and used in the runtime environment. This ensures language interoperability by defining a set of feature requirements that are common in all languages. Because of this, any language that exposes CLS interfaces is guaranteed to be accessible from any other language that supports the CLS. This layer is responsible for guaranteeing that the Framework is language agnostic for any CLS-compliant language. For example, both VB.NET and C# are CLS compliant and therefore interoperable. All of the examples within this book are written in VB.NET, but they could have easily been written in any CLS-compliant language.




Programming Microsoft Infopath. A Developers Guide
Programming Microsoft Infopath: A Developers Guide
ISBN: 1584504536
EAN: 2147483647
Year: 2006
Pages: 111
Authors: Thom Robbins

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