Application Architecture Guide - Chapter 2 - .NET Platform Overview

From Guidance Share

Jump to: navigation, search

Note - The patterns & practices Microsoft Application Architecture Guide, 2nd Edition is now live at

- J.D. Meier , Alex Homer, David Hill, Jason Taylor , Prashant Bansode , Lonnie Wall, Rob Boucher Jr, Akshay Bogawat



  • Understand the high-level features of the Microsoft .NET Framework.
  • Learn about specific technologies that make up the Microsoft .NET platform.
  • Understand the development tools available for designing and creating .NET applications.


This chapter starts with an overview of the .NET Framework and the Common Language Runtime (CLR), followed by a series of sections that discuss the range of built-in technologies such as ASP.NET, server applications such as Microsoft® SQL Server®, development tools such as Microsoft Visual Studio®, and external libraries. Microsoft Visual Studio is the primary environment for developing .NET applications, and is available in several different versions that target specific groups involved in the full life cycle of application development. In addition to Visual Studio, Microsoft provides other development environments, such as Microsoft Expression® Studio, and external libraries that are not included in the .NET Framework.

The Microsoft .NET platform is composed of server applications, infrastructure components, run-time services used by .NET applications, and the .NET Framework, as detailed in the following table.

Table 1 Microsoft .NET platform Category Technologies

Category Technologies
Application Infrastructure
  • Common Language Runtime (CLR)
  • .NET Framework
  • .NET Compact Framework
  • ASP.NET Mobile
  • Silverlight Mobile
Rich Internet Application (RIA)
  • Microsoft Silverlight™
Rich Client
  • Windows Forms
  • Windows Presentation Foundation (WPF)
  • ASP.NET Web Services (ASMX)
  • Windows Communication Foundation (WCF)
Collaboration / Integration / Workflow
  • Windows Workflow Foundation (WF)
  • Microsoft Office SharePoint® Server (MOSS)
  • Microsoft BizTalk® Server
Web Server
  • Internet Information Services (IIS)
Database Server
  • Microsoft SQL Server®

.NET Framework

At a high level, the .NET Framework is composed of a virtual run-time engine, a library of classes, and run-time services used in the development and execution of .NET applications. The .NET Framework was initially released as a run-time engine and core set of classes used to build applications. Subsequent releases extended and updated the core classes, and added new technologies such as the Windows Communication Foundation (WCF).

The Base Class Library (BCL) provides a core set of classes that cover a wide range of programming requirements in a number of areas, including user interface (UI), data access, database connectivity, cryptography, numeric algorithms, and network communications.

Overlaying the BCL are core technologies for developing .NET applications. These technologies include class libraries and run-time services that are grouped by application features, such as rich client and data access. As the Microsoft .NET Platform evolves, new technologies are added on top of the core technologies, such as WCF, Windows Presentation Foundation (WPF), and Windows Workflow Foundation (WF).

Common Language Runtime (CLR)

The .NET Framework includes a virtual environment that manages the program’s run-time requirements. This environment is called the Common Language Runtime (CLR) and provides the appearance of a virtual machine so that programmers do not need to consider the capabilities of the specific CPU or other hardware that will execute the program. Applications that run within the CLR are referred to as managed applications, and most .NET applications are developed using managed code (code that will execute within the CLR). Some applications are developed using unmanaged code such as device drivers which needs to use kernel APIs.

The CLR also provides services such as security, memory management, and exception handling.


For Web applications, the ASP.NET functionality within the .NET Framework is used, hosted within Microsoft Windows Server® Internet Information Services (IIS). The .NET platform provides the following technology options for Web applications:

  • ASP.NET Web Forms. This is the standard UI design technology for .NET Web applications. An ASP.NET Web Forms application is installed only on the Web server; no components are required on the client computer.
  • ASP.NET Web Forms with AJAX. Asynchronous JavaScript and XML (AJAX) with ASP.NET Web Forms is used to send requests to the server asynchronously and process the responses on the client. This improves responsiveness and reduces the number of post-backs to the server. AJAX is an integral component of ASP.NET starting with the .NET Framework version 3.5.
  • ASP.NET Web Forms with Silverlight controls. In an existing ASP.NET application, Silverlight controls can be used to improve the user experience without the requirement to write a completely new Silverlight application.
  • ASP.NET MVC. ASP.NET MVC allows developers to use ASP.NET to easily build applications that implement the Model-View-Controller (MVC) design pattern. ASP.NET MVC supports test-driven development (TDD), and provides clear separation of concerns between UI processing and UI rendering.
  • ASP.NET Dynamic Data. ASP.NET Dynamic Data enables the creation of ASP.NET applications that leverage Language-Integrated Query (LINQ) querying functionality. This functionality allows you to more easily model your database in your application, and query the database using LINQ queries.

Data Access

The .NET platform provides the following technology options for data access:

  • ADO.NET Core. ADO.NET provides general features for the retrieval, update, and management of data. It includes providers for SQL Server, OLE-DB, ODBC, SQL Server Mobile, and Oracle databases.
  • ADO.NET Data Services Framework. The ADO.NET Data Services Framework exposes data using the Entity Data Model (EDM) through RESTful Web services accessed by using HTTP. The data can be addressed directly using a Uniform Resource Identifier (URI). The Web service can be configured to return the data as plain Atom and JavaScript Object Notation (JSON) formats in ADO.NET Data Services Framework version 1, with other formats are due in subsequent releases.
  • ADO.NET Entity Framework. This framework gives you a strongly typed data-access experience over relational databases. It moves the data model from the physical structure of relational tables to a conceptual model that accurately reflects common business objects. The Entity Framework introduces a common Entity Data Model within the ADO.NET environment, allowing developers to define a flexible mapping to relational data. This mapping helps to isolate applications from changes in the underlying storage schema. The Entity Framework also contains support for LINQ to Entities, which provides LINQ support for business objects exposed through the Entity Framework. Current plans for the Entity Framework will build in functionality so that it can be used to provide a common data model across high-level functions such as data query and retrieval services, reporting, synchronization, caching, replication, visualization, and business intelligence (BI). When used as an Object/Relational Mapping (O/RM) product, developers use LINQ to Entities against business objects, which Entity Framework will convert to Entity SQL that is mapped against an Entity Data Model managed by Entity Framework. Developers also have the option of working directly with the Entity Data Model and using Entity SQL in their applications.
  • ADO.NET Sync Services. ADO.NET Sync Services is a provider included in the Microsoft Sync Framework synchronization for ADO.NET-enabled databases. It enables data synchronization to be built in occasionally connected applications. It periodically gathers information from the client database and synchronizes it with the server database.
  • Language-Integrated Query (LINQ). LINQ provides class libraries that extend C# and Microsoft Visual Basic® with native language syntax for queries. Queries can be performed against a variety of data formats, including DataSet (LINQ to DataSet), XML (LINQ to XML), in-memory objects (LINQ to Objects), ADO.NET Data Services (LINQ to Data Services), and relational data (LINQ to Entities).Understand that LINQ is primarily a query technology supported by different assemblies throughout the .NET Framework. For example, LINQ to Entities is included with the ADO.NET Entity Framework assemblies; LINQ to XML is included with the System.Xml assemblies; and LINQ to Objects is included with the .NET core system assemblies.
  • LINQ to SQL. LINQ to SQL provides a lightweight, strongly typed query solution against SQL Server. LINQ to SQL is designed for easy, fast object persistence scenarios where the classes in the mid-tier map very closely to database table structures. Starting with .NET Framework 4.0, LINQ to SQL scenarios will be integrated and supported by the ADO.NET Entity Framework; however, LINQ to SQL will continue to be a supported technology. For more information, see the ADO.NET team blog at

Mobile Applications

The .NET platform provides the following technology options for mobile applications:

  • .NET Compact Framework. The .NET Compact Framework is a subset of the full .NET Framework designed specifically for mobile devices. It can be used for mobile applications that must run on a device without guaranteed network connectivity.
  • ASP.NET Mobile. ASP.NET Mobile is a subset of the ASP.NET controls plus additional functionality designed specifically for delivering content to mobile devices. ASP.NET Mobile applications can be hosted on a normal ASP.NET Web server. ASP.NET Mobile is suitable for mobile Web applications that can rely on a persistent network connection.
  • Silverlight Mobile. Silverlight Mobile is a mobile device–specific version of the Silverlight client. It requires the Silverlight plug-in to be available on the mobile device. This technology can be used to port existing Silverlight applications to mobile devices, or if a richer UI is needed than possible with other options.

Rich Client

Windows-based applications are executed by the .NET Framework within Microsoft Windows®. The .NET platform provides the following technology options for rich client applications:

  • Windows Forms. This is the standard UI design technology for the .NET Framework. Even with the availability of WPF, Windows Forms is still a good choice for applications that do not require a media-rich UI, when the developer team is familiar with it and has the relevant technical expertise.
  • Windows Forms with WPF user controls. You can use this approach to take advantage of the more powerful UI features provided by WPF controls. You can add WPF controls to your existing Windows Forms application. However, remember that WPF controls tend to work best on higher-powered client machines.
  • Windows Presentation Foundation (WPF). WPF supports advanced graphics capabilities such as 2D and 3D graphics, display resolution independence, advanced document and typography support, animation with timelines, streaming audio and video, and vector-based graphics. WPF uses Extensible Application Markup Language (XAML) to improve UI appearance and performance, support data binding, and define events. WPF applications can be deployed to the desktop, or displayed in a Web browser as an XAML Browser Application (XBAP).
  • XAML Browser Application (XBAP) using WPF. The XBAP mechanism hosts a sandboxed WPF application in Microsoft Internet Explorer or Mozilla Firefox on Windows. Unlike Silverlight, you can use the full WPF framework but there are some limitations related to accessing system resources from the partial-trust sandbox. XBAP requires Microsoft Windows Vista® or both the .NET Framework version 3.0 and higher plus the XBAP browser plug-in. XBAP is a good choice for intranet-facing WPF applications due to its heavier footprint and the support for Windows only.

Rich Internet Application

For a rich Internet application (RIA), you use the Silverlight functionality of the .NET Framework, hosted within IIS. The .NET platform provides the following technology options for RIAs:

  • Silverlight. Silverlight is a browser-optimized subset of WPF that works cross-platform and cross-browser. Compared to XBAP, Silverlight is a smaller and faster installation, but may not support all of the features of the client machine. Due to its small footprint and cross-platform support, Silverlight is a good choice for Internet-facing WPF applications.
  • Silverlight with AJAX. Silverlight natively supports AJAX and exposes its Document Object Model (DOM) to JavaScript in the Web page. You can use this capability to support interaction between your page components and the Silverlight application.


The .NET platform provides the following technologies for creating service-based applications:

  • Windows Communication Foundation (WCF). WCF is designed to offer a manageable approach to distributed computing and provide broad interoperability, and includes direct support for service orientation. It supports a range of protocols including Hypertext Transfer Protocol (HTTP), Transmission Control Protocol (TCP), Microsoft Message Queuing (MSMQ), and named pipes.
  • ASP.NET Web services (ASMX). ASMX offers a simpler approach to distributed computing and interoperability, but supports only the HTTP protocol.


The .NET platform provides the following technology options for implementing workflows:

  • Windows Workflow Foundation (WF). WF is a foundational technology that allows you to implement workflow. WF is a toolkit for professional developers and independent software vendors (ISVs) who want to build a sequential or state machine-based workflow. WF supports the following types of workflow: Sequential, State-Machine, Data-Driven, and Custom. You can create workflows using the Windows Workflow (WF) Designer in Visual Studio. WF is integrated with WCF in .NET version 3.5 to provide WCF-based services for workflow.
  • Microsoft Office SharePoint Server (MOSS). MOSS is a server application that provides a platform for content management and collaboration. MOSS workflow is based on a version of Windows Workflow Foundation (WF). It is a solution for human workflow and collaboration in the context of a SharePoint server. You can create basic workflows using administrative interfaces that are included in the SharePoint Central administration tool. To extend or customize the SharePoint workflow solutions, you can use Visual Studio with WF. You can also customize workflow markup using either the Microsoft Office SharePoint Designer or the Windows Workflow Foundation (WF) Designer in Visual Studio.
  • BizTalk Server. BizTalk uses a workflow engine geared toward orchestration, such as enterprise integration with system-level workflows. You can define the overall design and flow of loosely coupled, long-running business processes within applications, and between applications, using BizTalk Orchestration services.

Note: MOSS and BizTalk server are not part of the .NET Framework or Visual Studio; these are independent products, but part of the overall .NET platform.

Web Server – Internet Information Services (IIS)

The Microsoft platform includes Internet Information Services (IIS), which provides full-scale support for Internet publishing, including transport services, client applications, administrative tools, database and application connectivity, and encrypted communication. IIS supports the following services:

  • World Wide Web Service. This service provides all the features required for hypertext document publishing, and delivering other types of content that use the HTTP protocol. It provides high performance, compression, extensive configurability, and supports a range of security and authentication options.
  • File Transfer Protocol (FTP) Service. This service allows you to receive and deliver files using the FTP protocol. However, authentication is limited to the Basic method.
  • Gopher Service. This service supports a distributed document search and retrieval network protocol. It is rarely used today.
  • Internet Database Connector. This is an integrated gateway and template scripting mechanism for the World Wide Web service to access Open Database Connectivity (ODBC) databases. Generally superseded by new data-access and scripting technologies such as ASP.NET and ASP.NET Data Services.
  • Secure Sockets Layer (SSL) Client/Server. This provides a mechanism to support encrypted communication over the HTTP protocol, allowing clients and servers to communicate more securely than when sending content as plain text.
  • Internet Service Manager Server. This is an administration console and associated tools that provide local and remote administration features for IIS.
  • Integration with ASP.NET. IIS 7.0 and later is specifically designed to integrate closely with ASP.NET to maximize performance and minimize server load when using ASP.NET to create and deliver content.

Database Server – SQL Server

A relational database is a common approach for storing and accessing data in an enterprise application. The .NET platform provides SQL Server as the database engine for your applications. SQL Server is available in several variants, from a single-instance, local database (SQL Server Express) scaling to enterprise-level applications through SQL Server Enterprise Edition.

The data access technologies that are part of the .NET Framework allow you to access data in any version of SQL Server, so you do not need to modify your application if you want to scale up to a more powerful version.

Visual Studio Development Environment

The .NET platform provides a comprehensive development environment known as the Visual Studio Team System. You can use the language of your choice within Visual Studio Team System to write applications that target the .NET Framework. As an integrated development environment (IDE), it provides all the tools you require to design, develop, debug, and deploy Windows, Web, Mobile, and Office-based solutions. Visual Studio is organized into several different versions, with some versions targeted at specific groups such as architects, testers, and others involved in the full life cycle of application development. You can install multiple versions side-by-side to obtain the required combination of features. In addition to Visual Studio, Microsoft provides other development environments such as Expression Studio, and external libraries that are not included in the .NET Framework.

Other Tools and Libraries

In addition to Visual Studio, other tools and frameworks are available to speed development or facilitate specific types of application development. Examples are:

patterns & practices solution Assets

Additional Resources

Personal tools