Introducing Microsoft Enterprise Library Application Blocks
 
Published: 29 Nov 2006
Abstract
In this article Joydip discusses the salient features of Enterprise Application Blocks with the advantages and disadvantages of each of them.
by Joydip Kanjilal
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 27079/ 38

Overview

With a view to promote enterprise development, enhance developer productivity, reduce development time, facilitate efficient code maintenance and rapid application development, the Patterns and Practices group from Microsoft has introduced a collection of extensible and configurable application blocks that are commonly known as the Enterprise Library Application Blocks.  These blocks are available for free download from Microsoft and are actually a collection of some reusable code snippets and code libraries that encapsulate some of the best coding and design strategies that are recommended by Microsoft.  The basic features provided by each of these blocks are:

·         Simplicity and ease of use

·         Extensibility as the source code for each of these blocks are available for free

·         Integration with other blocks

·         Consistency

Microsoft introduced the original Data Access Application Block in the month of April, 2002.  It became extremely popular and it paved the way for the design of the other blocks that comprise the Enterprise Application Block as we call it today.  The following are the versions of the Enterprise Library Application Blocks with their year and month of release.

1.    Enterprise Library 1.0 (January 2005)

2.    Enterprise Library 1.1 (June 2005)

3.    Enterprise Library 2.0 (January 2006)

This article discusses the features of each of the Enterprise Library Application Blocks briefly in a lucid language.

Why should I use these Application Blocks?

According to the MSDN, the "Application blocks are a type of guidance, provided as source code that can be used 'as is,' extended, or modified by developers to use on enterprise development projects."  Further, the MSDN says, that the "Application blocks help address the common problems that developers face from one project to the next. They are designed to encapsulate the Microsoft recommended best practices for .NET-based applications." The benefits provided by these application blocks are many, the best part of these blocks being that you can fine tune the source code as per your convenience and needs.

The following are some of the basic features provided by the Enterprise Library Application Blocks.

·         Extensibility

·         Simplicity and ease of use

·         Integration

·         Consistency

The Enterprise Library Application Blocks

The Enterprise Library consists of the following seven Application Blocks. 

·         Data Access Application Block

·         Exception Handling Application Block

·         Logging and Instrumentation Application Block

·         Security Application Block

·         Cryptography Application Block

·         Caching Application Block

·         Configuration Management Application Block

The following sections discusses each of these blocks briefly.

Data Access Application Block

The Data Access Application is one of the most popular of the Enterprise Library Application blocks and has been widely used in enterprise applications.  The earlier versions of this block contained static methods that could have posed problems due to thread safety issues in multithreaded scenarios.  The newer version, however, makes use of the Abstract Factory pattern to solve all these issues.  The salient features of the Data Access Application Block include:

·         Support for both SQL Server and Oracle databases

·         Extensible

·         Tightly coupled with the Configuration Management Block

Exception Handling Application Block

An exception is an error that occurs at runtime.  If the same is not handled by your code, it might lead to premature termination of the flow of execution of your application.  Exceptions should be handled very carefully as handling them are quite expensive and too many exception blocks in your code might lead to poor application performance.  The Patterns and Practices group from Microsoft has introduced the Exception Handling Application Block with the sole purpose of providing the application developers with a set of the best practices and strategies that should be followed for handling exceptions in the code.  The salient features of the Exception Handling Application Block include:

·         Encapsulates the recommended best practices on handling exceptions

·         Support for logging exceptions

·         Extensibility

·         Ease of use

Logging and Instrumentation Application Block

Efficient Logging and Instrumentation feature in an enterprise application development phase facilitates application performance monitoring.  Hence, it is a very important feature in enterprise application software development.  The Patterns and Practices group from Microsoft has come up with this powerful block that can be instrumental in the above stated situations.  The salient features of the Logging and Instrumentation Application Block include:

·         Support for logging synchronously and asynchronously

·         Support for formatters

·         Support for logging to different destinations

Security Application Block

The Security Application Block from the Patterns and Practices group of Microsoft facilitates the implementation of security features in enterprise applications built on top of the Microsoft .NET framework.  The salient features of the Security Application Block include:

·         Support for authentication and authorization

·         Supports both role and profile management

·         Plug ability with the Data Access Application Block

·         Plug ability with the Cryptography Application Block

Cryptography Application Block

The Cryptography Application Block is a collection of reusable and extensible code that simplifies the usage of cryptographic functionality in applications that are designed on the Microsoft.NET framework.  The salient features of the Cryptography Application Block include:

·         Plug ability

·         Configurable

·         Extensible

Caching Application Block

Caching is an important feature that promotes improvement of application performance by storing the frequently used pages or data in main memory.  The Caching Application Block from the Patterns and Practices group of Microsoft encapsulates efficient, consistent caching strategies and, hence, simplifies implementation of caching strategies in enterprise application development. The salient features of the Caching Application Block include:

·         Support for efficient caching strategies in web applications

·         Configurable

·         Thread Safety

Configuration Management Application Block

The Configuration Management Application Block from the Patterns and Practices group of Microsoft provides, "a seamless integration with configuration sources other than XML files.  You could use the registry, a database, or many other storage mediums, all using a common interface to manipulate the configuration information."  The salient features of the Configuration Management Application Block include:

·         Support for reading and writing the configuration data

·         Support for storing configuration data at multiple locations

·         Support for caching the configuration data

·         Plug ability

References

Conclusion

Microsoft has introduced Enterprise Library Application Blocks to facilitate the development of robust, scalable enterprise applications in Microsoft .NET.  These application blocks are available for free download and you can also fine tune the source code to suit your needs.  Effective use of these application blocks can facilitate robust, scalable enterprise applications with ease.  This article has provided an introduction to the features and the benefits of the Enterprise Library Application Blocks.  Note that the features that I have provided on each of these blocks are the ones that are most important, but there are a lot more features for all these blocks.  I would recommend that you download these free blocks, go through the documentation, source and implement the ones that are relevant to your application.  I will highlight on the implementation of each of these blocks in my future articles.  So, stay tuned for more.  Happy reading!



User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-19 11:06:38 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search