BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Enterprise Libarary 4.0 Released for Visual Studio 2008

Microsoft Enterprise Libarary 4.0 Released for Visual Studio 2008

This item in japanese

Microsoft released a version of their Enterprise Library 4.0 for Visual Studio 2008 and at the same time, Unity 1.1 application block, their dependency injection container.

Grigori Melnik, Product Manager from the patterns and practices team, announced the release of both the Enterprise Library 4.0 and the Unity 1.1 refresh, describing all the new features.

The MSDN Developer Center explains what this release means to developers:

This release of Enterprise Library includes a new application block (see The Unity Application Block). Unity is a lightweight, extensible dependency injection container with support for constructor, property, and method call injection. You can use the Unity Application Block as a stand-alone dependency injection mechanism without requiring installation of Enterprise Library. However, this release of Enterprise Library incorporates integration with Unity that provides new opportunities for generating instances of Enterprise Library objects.

There are also additions in functionality to several of the existing application blocks. The following sections discuss these and other changes in the current release. In addition, this release has been adapted to work with Microsoft Visual Studio 2008, Windows Management Instrumentation (WMI) version 2.0, and the Microsoft .NET Framework 3.5.

Enterprise Library 4.0

Version 4.0 of the Enterprise Library application blocks include:

  • Caching Application Block. Developers can use this application block to incorporate a cache in their applications. Pluggable cache providers 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.
  • 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 standard logging functionality in their applications.
  • Policy Injection Application Block. Developers can use this application block to implement interception policies that can be used 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.
  • 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.

What's new in Enterprise Library 4.0?

  • Integration with the Unity Application Block
  • Windows Management Instrumentation (WMI) 2.0 support and improved instrumentation
  • Performance improvements (particularly, in the Logging Application Block)
  • Pluggable Cache Managers
  • Visual Studio 2008 support
  • Bug fixes

The QuickStart for all of the application blocks are available:

The Enterprise Library 4.0 is available for download from the patterns & practices Developer Center.

Unity 1.1

Unity is described as a dependency injection container that integrates with the Enterprise Library but is not dependent on it:

The Unity Application Block (Unity) is a lightweight, extensible dependency injection container with support for constructor, property, and method call injection. You can use it with Enterprise Library to generate both Enterprise Library objects and your own custom business objects. However, the Unity Application Block differs from the other application blocks included in Enterprise Library in several fundamental ways:

  • You can use the Unity Application Block as a stand-alone dependency injection mechanism without requiring installation of Enterprise Library.
  • The Unity Application Block can use configuration information exposed through configuration files to prepare the container, but you can also use code to register dependencies dynamically at run time.
  • The Unity Application Block has no dependency on the Enterprise Library core or the Enterprise Library configuration system. It contains its own built-in mechanism for reading configuration—although, if appropriate, this information can come from the normal Enterprise Library configuration file.

What is new in Unity 1.1?

  • Remove all obsolete ObjectBuilder code.
  • Fix the bug: lifetime managers with open generic types.
  • Fix the bug: RegisterType was overriding RegisterInstance.
  • Performance improvement when resolving singletons.
  • Made some internal classes public to make it easier to write certain type of extensions (the ones that need to customize how the dependencies are resolved.
  • Improved error messages when value resolution fail.

What did not make it into this release?

  • Interception mechanism is not implemented yet; it is on top of our Unity backlog though.
  • Policy Injection Application Block can still be used if AOP functionality is needed.
  • No tool support for DI configuration.

Unity 1.1 is available for download from the patterns & practices Developer Center.

A screencast of the Enterprise Library 4.0 Data Access Application Block using the Unity Inversion of Control (IoC) integration is available from David Hayden and gives a good introduction to how this can be used.

Rate this Article

Adoption
Style

BT