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.
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