Bibliography

patterns & practices Developer Center

On this page: Download:
Preface | 1 – Welcome to the Library: Introduction to the Microsoft Enterprise Library | 2 – Much Ado About Data Access: Using the Data Access Application Block | 3 - Error Management Made Exceptionally Easy: Using the Exception Management Application Block | 4 - Perseverance, Secret of All Triumphs: Using the Transient Fault Handling Application Block | 5 - As Easy as Falling Off a Log: Using the Logging Application Block | 6 - Logging What You Mean: Using the Semantic Logging Application Block | 7 - Banishing Validation Complication: Using the Validation Application Block | 8 - Updating aExpense to Enterprise Library v6.0 | Appendix A - Enterprise Library Configuration Scenarios | Appendix B - Encrypting Configuration Files

Download code

Download PDF

Download Paperback

Preface

For more details about the Enterprise Library Application Blocks, see the Enterprise Library Reference Documentation.

You can download and work through the Hands-On Labs for Enterprise Library, which are available at https://aka.ms/el6hols.

To help you understand how you can use Enterprise Library application blocks, we provide a series of simple example applications that you can run and examine. Each is a console-based application and, in most cases, all of the relevant code that uses Enterprise Library is found within a series of routines in the Program.cs file. You can open the solutions for these examples in Visual Studio, or just run the executable file in the bin\debug folder and view the source files in a text editor if you prefer. To obtain the example applications, go to https://go.microsoft.com/fwlink/p/?LinkID=304210.

You can download the Enterprise Library binaries, source code, Reference Implementation, and QuickStarts at https://go.microsoft.com/fwlink/p/?LinkID=290898.

The Enterprise Library community Web site is at https://entlib.codeplex.com/.

1 – Welcome to the Library: Introduction to the Microsoft Enterprise Library

If you want to know more about how you can use Unity and the Policy Injection Application Block, check out the Dependency Injection with Unity guide. This guide is also available on MSDN: Developer's Guide to Dependency Injection Using Unity.

Many scenarios supported by these blocks are now better supported by the .NET platform. Our deprecation philosophy is outlined in this post by the Librarian. The V6 project was focused on ensuring Enterprise Library’s close alignment to the current platform (.NET framework 4.5) with a goal of reducing Enterprise Library’s footprint by leveraging platform capabilities and improvements. For more details, see the Migration Guide.

You can download the Nucleus Research 2009 Report on Microsoft patterns & practices, which reviews the key components, benefits, and includes direct feedback from software architects and developers who have adopted patterns & practices deliverables in their projects and products from https://www.microsoft.com/en-us/download/confirmation.aspx?id=11522 .

There are resources to help if you're getting started with Enterprise Library, and there's help for existing users as well (such as the breaking changes and migration information for previous versions) available on Codeplex.

For more information about the topics covered in this chapter, see the Enterprise Library Reference Documentation.

From the perspective of Enterprise Library, the great advantage of NuGet is that it automatically adds everything that you need to use a block (including any dependencies) to your project in one, easy step. If you’ve not used NuGet before, you can find out more at "Welcome to NuGet Docs."

If you want to examine the source code, and perhaps even modify it to suit your own requirements, you can download the EnterpriseLibrary 6-source.exe (a self-extractable zip file). You can also download the binaries, Reference Implementation, and QuickStarts from the Microsoft Download Center.

For more information about these legacy approaches, you should read the reference documentation and the Developer’s Guide for Enterprise Library 5.0.

Unity 3 now supports the registration by convention to make it easier to do so. See the Dependency Injection with Unity guide for more info.

To help you understand how you can use Enterprise Library application blocks, we provide a series of simple example applications that you can run and examine. To obtain the example applications, go to https://go.microsoft.com/fwlink/p/?LinkID=304210.

2 – Much Ado About Data Access: Using the Data Access Application Block

For more information on a variety of topics, see the Enterprise Library Contrib site.

You can access the full Enterprise Library Reference Documentation on MSDN.

For information on using Data Transfer Objects (DTOs) to pass data around your application layers, implement a data access layer using O/RM techniques, or want to take advantage of new client-side data querying techniques such as LINQ.

For more information on using LINQ to query sequences, see "LINQ Query Expressions" on MSDN.

For a description of the capabilities of SQLXML see the MSDN documentation.

For more information about using an XmlReader, see "Reading XML with the XmlReader" on MSDN.

For more information on XSLT, see "XSLT Transformations" on MSDN.

You can now use the Task Parallel Library and the async/awaitkeywords to greatly simplify some of your asynchronous code.

For more information about asynchronous data access, see "Asynchronous Operations" on MSDN.

For guidance on performance testing and setting performance goals see patterns & practices "Performance Testing Guidance for Web Applications."

For more details about using a DTC and transaction scope, see "Distributed**Transactions (ADO.NET)" at and "System.Transactions Integration with SQL Server (ADO.NET)."

3 - Error Management Made Exceptionally Easy: Using the Exception Management Application Block

For a more detailed discussion of whether you should catch an exception at a particular level in your application or allow it to propagate up through the call stack, see Eric Lippert’s "Vexing exceptions" blog post and Raymond Chen’s "Cleaner, more elegant, and harder to recognize" blog post.

If you are not familiar with lambda functions or their syntax, see the "Lambda Expressions" article on MSDN.

For a full explanation of using the HandleException method, see the "Key Scenarios" topic in the Enterprise Library Reference Documentation.

For more information on raising specific types of exceptions, see the "Design Guidelines for Exceptions" on MSDN.

For information about adding support for declarative configuration in custom handlers, see the topic Extending and Modifying the Exception Handling Application Block in the Enterprise Library Reference Documentation.

4 - Perseverance, Secret of All Triumphs: Using the Transient Fault Handling Application Block

For detailed information about configuring the Transient Fault Handling Application Block and writing code that uses the Transient Fault Handling Application Block, see the topic "The Transient Fault Handling Application Block" in the Enterprise Library Reference Documentation.

For information about how you can use NuGet to prepare your Visual Studio project to work with the Transient Fault Handling Application Block, see the topic "Adding the Transient Fault Handling Application Block to Your Solution."

For more information about throttling in Azure, see "Microsoft Azure Storage Abstractions and their Scalability Targets" on MSDN.

There is an additional approach that is provided for backward compatibility with the "Transient Fault Handling Application Framework" that uses the RetryPolicyFactory class.

For more details about the parameters for each retry strategy, see the topic "Source Schema for the Transient Fault Handling Application Block" in the Enterprise Library Reference Documentation.

You can define your own custom retry strategy. For more information, see the topic "Implementing a Custom Retry Strategy."

For more information about how to define your retry strategy in code, see the topic "Specifying Retry Strategies in Code."

For more information about how to define your retry strategies in a configuration file, see the topic "Specifying Retry Strategies in the Configuration."

If you define your retry strategies in the configuration file for the application, you can also define default retry strategies and a global default retry strategy. For more information, see the topic "Entering Configuration Information."

For more information about using the retry policies, see the topic "Key Scenarios" on MSDN.

For more information about the RetryPolicy delegate in the Microsoft.WindowsAzure.StorageClient namespace, see the blog post "Overview of Retry Policies in the Microsoft Azure Storage Client Library."

For more information about retries in Azure storage, see "Overview of Retry Policies in the Microsoft Azure Storage Client Library" and "Microsoft Azure Storage Client Library 2.0 Breaking Changes & Migration Guide."

The Transient Fault Handling Application Block is a product of the collaboration between the Microsoft patterns & practices team and the Azure Customer Advisory Team. It is based on the initial detection and retry strategies, and the data access support from the "Transient Fault Handling Framework for SQL Database, Microsoft Azure Storage, Service Bus & Cache" on MSDN.

5 - As Easy as Falling Off a Log: Using the Logging Application Block

For more information about using and extending the Logging block, see The Logging Application Block in the Enterprise Library Reference Documentation.

For more information about how to manage the buffer size, see the topic Logging Messages Asynchronously in the Enterprise Library Reference Documentation.

6 - Logging What You Mean: Using the Semantic Logging Application Block

For more information about ETW, see Event Tracing on MSDN.

See the topic Performance Considerations in the Enterprise Library Reference Documentation.

For more information about the EventSource class and the WriteEvent and IsEnabled methods, see EventSource Class on MSDN.

For more information about the EventSourceAnalyzer class, see the topic Checking an EventSource Class for Errors in the Enterprise Library Reference Documentation.

You can use the onCompletedTimeout parameter to the CreateListener method controls how long a listener will wait for the sink to flush itself before disposing the sinks. For more information, see the topic Event Sink Properties in the Enterprise Library Reference Documentation.

If you are collecting high volumes of trace messages from a production application, you may need to tweak the settings for the trace event service in the XML configuration file. For information about these settings, see the topic Performance Considerations in the Enterprise Library Reference Documentation.

7 - Banishing Validation Complication: Using the Validation Application Block

For more details on each validator, see the Enterprise Library Reference Documentation.

For more information on using interception, see "Chapter 5 - Interception using Unity" in the Developer's Guide to Dependency Injection Using Unity.

For more information, see the Enterprise Library Reference Documentation, and the topic "System.ComponentModel.DataAnnotations Namespace" on MSDN.

The topic, "Using Self Validation" in the Enterprise Library Reference Documentation, demonstrates use of the Validation block attributes.

For more information about data annotations, see "System.ComponentModel.DataAnnotations Namespace" on MSDN.

For more information about ASP.NET integration, see the Enterprise Library Reference Documentation.

For more information about Windows Forms integration, see the Enterprise Library Reference Documentation.

For more information about WPF integration, see the Enterprise Library Reference Documentation.

For more information on extending Enterprise Library and creating custom providers, see the Enterprise Library Reference Documentation.

8 - Updating aExpense to Enterprise Library v6.0

For more information about Unity, see the Dependency Injection with Unity guide. This guide is also available on MSDN: Developer's Guide to Dependency Injection Using Unity.

For more information about migrating to Enterprise Library 6, see the Migration Guide.

For more information on distributed caching solutions, see "AppFabric Caching API Usage Sample" on MSDN.

You can read more about claims-based authentication and authorization in the guide "A Guide to Claims-Based Identity and Access Control (2nd Edition)" available for download from MSDN.

Appendix A - Enterprise Library Configuration Scenarios

For more information on the scenarios presented here, see "Configuring Enterprise Library" in the Enterprise Library Reference Documentation.

To store configuration in a database you can use the SQL configuration source that is available as a sample from the Enterprise Library community site.

The way that the configuration settings are merged, and the ordering of items in the resulting configuration, follows a predefined set of rules. These are described in detail in the Enterprise Library Reference Documentation.

For more information about MergeConfiguration.exe, see "Configuring a Deployment Environment" in the Enterprise Library Reference Documentation.

Appendix B - Encrypting Configuration Files

If you deploy your application to Azure, you should also carefully consider how to encrypt configuration settings stored in Azure. One approach to consider is using the "Pkcs12 Protected Configuration Provider."

For more information on exporting the RSA private key that is required to decrypt the data, see "Importing and Exporting Protected Configuration RSA Key Containers."

Previous Topic | Home | Community