Compartir a través de


Enterprise Library 5.0 – May 2011

patterns & practices Developer Center

May 2011

Summary

Microsoft Enterprise Library is a collection of application blocks designed to assist developers with common enterprise development challenges. Application blocks are a type of guidance, provided as source code that can be used "as is," extended, or modified by developers for use in enterprise development projects.

Downloads

Microsoft Enterprise Library 5.0
Optional Update 1
Also available via NuGet

Developer's Guide

Developer's Guide FREE content in HTML at MSDN
Developer's Guide to Enterprise Library, C# edition at the publisher’s site (O'Reilly, print, Mobi, PDF, ePub)
Developer's Guide to Enterprise Library, Visual Basic edition at the publisher’s site (O'Reilly, print, Mobi, PDF, ePub)

Class Library

Enterprise Library 5.0 Class Library on MSDN

License

Microsoft Public License (Ms-PL)

On This Page

Overview
What’s New
Getting Started
Community
Feedback and Support
Authors and Contributors
Related Titles

Overview

Enterprise Library consists of reusable software components that are designed to assist developers with common enterprise development challenges. It includes a collection of functional application blocks addressing specific cross-cutting concerns such as data access, logging, or validation; and wiring blocks, Unity and the Interception/Policy Injection Application Block, designed to help implement more loosely coupled testable, and maintainable software systems.

Different applications have different requirements, and you will find that not every application block is useful in every application that you build. Before using an application block, you should have a good understanding of your application requirements and of the scenarios that the application block is designed to address. Note that this release of the Enterprise Library includes a selective installer that allows you to choose which of the blocks you wish to install.

Microsoft Enterprise Library 5.0 contains the following application blocks:

  • Caching Application Block. Developers can use this application block to incorporate a cache in their applications. Pluggable cache providers and persistent backing stores are supported.
  • Cryptography Application Block. Developers can use this application block to incorporate hashing and symmetric encryption in their applications.
  • Data Access Application Block. Developers can use this application block to incorporate standard database functionality in their applications, including both synchronous and asynchronous data access and returning data in a range of formats.
  • Exception Handling Application Block. Developers and policy makers can use this application block to create a consistent strategy for processing exceptions that occur throughout the architectural layers of enterprise applications.
  • Logging Application Block. Developers can use this application block to include logging functionality for a wide range of logging targets in their applications. This release further improves logging performance.
  • Policy Injection Application Block. Powered by the Interception mechanism built in Unity, this application block can be used to implement interception policies to streamline the implementation of common features, such as logging, caching, exception handling, and validation, across a system.
  • Security Application Block. Developers can use this application block to incorporate authorization and security caching functionality in their applications.
  • Unity Application Block. Developers can use this application block as a lightweight and extensible dependency injection container with support for constructor, property, and method call injection, as well as instance and type interception.
  • Validation Application Block. Developers can use this application block to create validation rules for business objects that can be used across different layers of their applications.

Enterprise Library also includes a set of core functions, including configuration and instrumentation, and object lifecycle management. These functions are used by all other application blocks.

Common Scenarios

Enterprise Library can be useful in a variety of situations:

  • Enterprise Library provides sufficient functionality to support many common scenarios that enterprise-level applications must address.
  • Enterprise Library can serve as the basis for a custom library. You can take advantage of the extensibility points incorporated in each application block and extend the application block by adding new providers. You can also modify the source code for the existing application blocks to incorporate new functionality, and even add new application blocks to Enterprise Library. You can either develop extensions for existing application blocks and new application blocks yourself, or you can use extensions and application blocks developed by others.
  • Enterprise Library is designed so that its application blocks can function independently of each other. You need to install and add only the application blocks that your application will use; you do not need to install or add the entire library.
  • Enterprise Library includes the source code and the unit tests for all application blocks. This means you can explore the implementations, modify the application blocks to merge into your existing library, or you can use parts of the Enterprise Library source code in other application blocks or applications that you build.
  • Enterprise Library includes documentation, hands-on labs, and source code. Enterprise Library embodies many design patterns, and demonstrates good architectural and coding techniques. You can use the library as a tool for learning architectural, design, and coding proven practices.

Audience Requirements

These reusable components and guidance are intended primarily for software developers and software architects. To get the most benefit from this guidance, you should have an understanding of the following technologies:

  • Microsoft Visual C# or Microsoft Visual Basic .NET
  • Microsoft .NET Framework

IT Professionals and system administrators will benefit from using Enterprise Library as it makes deployment and maintaining of systems easier. IT Professionals can use the configuration console to modify application blocks configuration with no programming required.

Contents of This Release

Microsoft Enterprise Library 5.0 contains the following:

  • Binaries. The Enterprise Library includes pre-compiled, strong-named assemblies for all the source code.
  • Source code. The Enterprise Library includes the source code for the application blocks and the configuration tools.
  • Unit tests. The Enterprise Library includes the unit tests that were created while the application blocks were being developed.
  • Documentation. A separate download for Enterprise Library includes documentation that can be viewed within Visual Studio and separately. The documentation includes guidance about how to use the Enterprise Library and a class library reference.

System Requirements

  • Supported architectures: x86 and x64.
  • Operating system: Microsoft Windows® 7 Professional, Enterprise or Ultimate; Windows Server 2003 R2; Windows Server 2008 with Service Pack 2; Windows Server 2008 R2; Windows Vista with Service Pack 2; or Windows XP with Service Pack 3.
  • Microsoft .NET Framework 3.5 with Service Pack 1 or Microsoft .NET Framework 4.0.

For a rich development environment, the following are recommended:

  • Microsoft Visual Studio® 2008 Development System with Service Pack 1 (any edition) or Microsoft Visual Studio 2010 Development System (any edition).

To run the unit tests, the following are also required:

  • Microsoft Visual Studio 2008 Professional, Visual Studio 2008 Team Edition, Visual Studio 2010 Premium, Visual Studio 2010 Professional, or Visual Studio 2010 Ultimate edition.
  • Moq v3.1 assemblies.

For the Data Access Application Block, the following is also required:

  • A database server running a database that is supported by a .NET Framework 3.5 with Service Pack 1 or .NET Framework 4.0 data provider. This includes SQL Server® 2000 or later, SQL Server 2005 Compact Edition, and Oracle 9i or later. The database server can also run a database that is supported by the .NET Framework 3.5 with Service Pack 1 or the .NET Framework 4.0 data providers for OLE DB or ODBC.

For the Logging Application Block, the following are also required:

  • Stores to maintain log messages. If you are using the Message Queuing (MSMQ) Trace Listener to store log messages, you need the Microsoft Message Queuing (MSMQ) components installed. If you are using the Database Trace Listener to store log messages, you need access to a database server. If you are using the E-mail Trace Listener to store log messages, you need access to an SMTP server.

Design Goals

Enterprise Library is intended for use by developers who build complex, enterprise-level applications. Enterprise Library is used when building applications that typically will be deployed widely and must interoperate with other applications and systems. In addition, they generally have strict security, reliability, and performance requirements. The goals of Enterprise Library are the following:

  • Consistency. All Enterprise Library application blocks feature consistent design patterns and implementation approaches.
  • Extensibility. All application blocks include defined extensibility points that allow developers to customize the behavior of the application blocks by adding their own code.
  • Ease of use. Enterprise Library offers numerous usability improvements, including a configuration tool, powerful programmatic configuration support, intuitive interfaces, a simpler installation procedure that allows you to select only those application blocks you require, and clear documentation, samples and hands-on labs.
  • Integration. Enterprise Library application blocks are designed to work well together or individually.

What's New

This major release of Enterprise Library contains many compelling new features and updates that will make developers more productive. There are no new blocks; instead the team focused on making the existing blocks shine, on testability, maintainability and learnability. The new features include:

  • Major architectural refactoring that provides improved testability and maintainability through full support of the dependency injection style of development

  • Dependency injection container independence (Unity ships with Enterprise Library, but you can replace Unity with a container of your choice)

  • Programmatic configuration support, including a fluent configuration interface and an XSD schema to enable IntelliSense

  • Redesign of the configuration tool to provide:

    • A more usable and intuitive look and feel
    • Extensibility improvements through meta-data driven configuration visualizations that replace the requirement to write design time code
    • A wizard framework that can help to simplify complex configuration tasks
  • Data accessors for more intuitive processing of data query results

  • Asynchronous data access support

  • Honoring validation attributes between Validation Application Block attributes and DataAnnotations

  • Integration with Windows Presentation Foundation (WPF) validation mechanisms

  • Support for complex configuration scenarios, including additive merge from multiple configuration sources and hierarchical merge

  • Optimized cache scavenging

  • Better performance when logging

  • Support for the .NET 4.0 Framework and integration with Microsoft Visual Studio 2010

  • Improvements to Unity

  • A reduction of the number of assemblies

The detailed list of all changes is included in the Enterprise Library documentation.

Getting Started

For information about getting started with Enterprise Library, see the Enterprise Library documentation.

Community

The Enterprise Library, like many patterns & practices deliverables, is associated with a community site - www.codeplex.com/entlib. On this community site you can provide feedback and connect with other users to share ideas. You can post questions and get support using the Enterprise Library Discussion forum. You can also download additional content, such as extensions and training material. Community members can also help Microsoft plan and test future releases of the Enterprise Library and other application blocks. Community-developed extensions to the Enterprise Library are available on the EntLib Contrib site.

Feedback and Support

Questions? Comments? Suggestions? To provide feedback about this release, or to get help with any problems, please visit the Enterprise Library Discussion forum and the Enterprise Library community site. The community site is the preferred feedback and support channel because it allows you to share your ideas, questions, and solutions with the entire community. Enterprise Library is a guidance offering, designed to be reused, customized, and extended. Code-based guidance is shipped "as is" and without warranties. Customers can obtain support through Microsoft Premier Support Services for a fee, but the code is considered user-written by Microsoft support staff.

Authors and Contributors

Microsoft Enterprise Library 5.0 was produced by the following individuals:

  • Product/Program Management: Grigori Melnik (Microsoft Corporation)
  • Architecture/Development: Bob Brumfield and Chris Tavares (Microsoft Corporation), Fernando Simonazzi (Clarius Consulting), Nicolas Botto (Digit Factory) and Olaf Conijn (Olaf Conijn BV)
  • Testing: Carlos Farre, Masashi Narumoto and Rohit Sharma (Microsoft Corporation), Nicolas Botto (Digit Factory), Lavanya Selvaraj, Magdelene Sona, Mani Krishnaswami, Meenakshi Krishnamoorthi, Santhosh Panneerselvam, and Ravindra Varman (Infosys Technologies Ltd), Erik Renaud and François Tanguay (nVentive Inc), Rick Carr (DCB Software Testing, Inc)
  • User experience: Damon van Vessem, Heidi Adkisson, Jen Amsterlaw, and Kelly Franznick (Blink Interactive), and Brad Cunningham (Interknowlodgy)
  • Documentation: Alex Homer (Microsoft Corporation) and Dennis DeWitt (Linda Werner & Associates Inc)
  • Editing and production: RoAnn Corbisier and Steve Elston (Microsoft Corporation), Nancy Michel (Content Master Ltd.), and Patrick Lanfear and Tom Draper (Twist Creative LLC)
  • Release management: Richard Burte (ChannelCatalyst.com, Inc.) and Jennifer Burch (DCB Software Testing, Inc)
  • Business administration support: Tracy Emory (Microsoft Corporation)

Many thanks to the following members of the Enterprise Library 5.0 Advisory Board:

  • Brian Button (Asynchrony Solutions),
  • Kyle Huntley (Avanade),
  • David Starr (Elegant Code),
  • Wallin Ludwik (Volvo), Bill Wilder (Fidelity),
  • Andrej Golcov (Hermes SoftLab),
  • John Askew, Nicholas Blumhardt, Martin Bennedik and Serge Baranovsky (Independent),
  • Evgeny Sorokin and Ksenia Mukhortova (Intel),
  • Scott Nichols (Idaho Central),
  • Eng Chong Lim and Isabel Niu (McDonald's Corporation),
  • Aaron Hanks, Glenn Block, Hugo Batista, Jason Hogg, Jason Olson, John Czernuszka, Joshy Joseph, Lenny Fenster, Massimo Mascaro, Matthew Podwysocki, Tom Hollander, Piyush Gupta, and Scott Densmore (Microsoft)
  • Matthew Buonomano and Nikola Malovic (Monster.com),
  • Daniel Piessens and Phill Van Hoven (Red Prairie),
  • Walter Wu (Royal Bank of Canada),

Many thanks to the following people who previewed Microsoft Enterprise Library 5.0 and provided meaningful feedback and ideas:

  • Ade Miller, Blaine Wastell, David Hill, Don Smith, Eugenio Pace, and Mohammad Al-Sabt (Microsoft Corporation).

Related Titles

patterns & practices Developer Center