Enterprise Library: Your first step on DAAB

This sample code snippet gives you a kick start (Hello World ;)) on Microsoft Patterns & Practices Enterprise Library – Data Access Application Block.

Remember that there a more than one way to do most steps. I am not going to confuse you by writing all.

 

  1. First you need to download and install Enterprise Library. I used version 4.1 which is the latest at the time of writing this entry.
  2. Create a new project. I used a C# Windows application on my Visual Studio 2008 Express.
  3. Now you need to add reference to dlls
    • Microsoft.Practices.EnterpriseLibrary.Common and
    • Microsoft.Practices.EnterpriseLibrary.Data
  4. Below code does the following:
    • Create database connection. I used a SQL Server 2008 Database.
    • Execute a SELECT statement
    • Populates data to a DataGridView control

 

Enterprise Library: Your first step on DAAB

This sample code snippet gives you a kick start (Hello World ;)) on Microsoft Patterns & Practices Enterprise Library – Data Access Application Block.

Remember that there a more than one way to do most steps. I am not going to confuse you by writing all.

 

  1. First you need to download and install Enterprise Library. I used version 4.1 which is the latest at the time of writing this entry.
  2. Create a new project. I used a C# Windows application on my Visual Studio 2008 Express.
  3. Now you need to add reference to dlls
    • Microsoft.Practices.EnterpriseLibrary.Common and
    • Microsoft.Practices.EnterpriseLibrary.Data
  4. Below code does the following:
    • Create database connection. I used a SQL Server 2008 Database.
    • Execute a SELECT statement
    • Populates data to a DataGridView control

 

Why we must use Microsoft Patterns and Practices?

A quick answer will be “to make development environments more productive, consistent and standardized”. As an addendum, it accelerates project cycle times, reduce costs.

It is important that companies must update their applications for compatibility with rapid evaluation of  technologies such as mobile devices, software as a service etc. Customers must be happy even after their database grow and the application complexity increases. Current trend is to follow Agile Methodology which forces the stack holders to use iterations for development and reusability of code can save much time.

Some companies commented that they were able to improve productivity of developer up to 40% by reusing assets from Patterns and Practices.

It is also possible to reduce the project cycle times by using pre-built application blocks in Patterns & Practices rather than building the code from scratch.

Some companies commented they were able to shorten project cycle times up to  25% by using pre-built components of Enterprise Library

Here comes the role of Microsoft Patterns and Practices. This gives guidance to to companies to do

  • design
  • develop
  • deploy

using Microsoft platform effectively and rapidly.

If you plan to use Patterns & Practices for your company, you will be spending less time for development it may be even less time than your requirement analysis time.

Microsoft provide:

  • A group of Patterns & Practices tools are freely available and
  • The Source Code of these tools as also available for free so that the company can alter and use if they need.

 

The Microsoft Patterns & Practices supports Web, Windows, Mobile Devices etc. These are the forms of support we can avail:

  • Enterprise Library Application Blocks – Reusable library for:
    • Data Access
    • Caching
    • Cryptography
    • Exception Handling
    • Logging, Security
    • Policy Injection and
    • Validation
  • Software Factory – Helps architects and developers to create instances of specify types of applications
  • Guides – Architecture and Design guidelines
  • Reference Implementations – Sample applications

 

 

References: 1) Guidebook Microsoft Patterns and Practices 2) Internet

 

Why we must use Microsoft Patterns and Practices?

A quick answer will be “to make development environments more productive, consistent and standardized”. As an addendum, it accelerates project cycle times, reduce costs.

It is important that companies must update their applications for compatibility with rapid evaluation of  technologies such as mobile devices, software as a service etc. Customers must be happy even after their database grow and the application complexity increases. Current trend is to follow Agile Methodology which forces the stack holders to use iterations for development and reusability of code can save much time.

Some companies commented that they were able to improve productivity of developer up to 40% by reusing assets from Patterns and Practices.

It is also possible to reduce the project cycle times by using pre-built application blocks in Patterns & Practices rather than building the code from scratch.

Some companies commented they were able to shorten project cycle times up to  25% by using pre-built components of Enterprise Library

Here comes the role of Microsoft Patterns and Practices. This gives guidance to to companies to do

  • design
  • develop
  • deploy

using Microsoft platform effectively and rapidly.

If you plan to use Patterns & Practices for your company, you will be spending less time for development it may be even less time than your requirement analysis time.

Microsoft provide:

  • A group of Patterns & Practices tools are freely available and
  • The Source Code of these tools as also available for free so that the company can alter and use if they need.

 

The Microsoft Patterns & Practices supports Web, Windows, Mobile Devices etc. These are the forms of support we can avail:

  • Enterprise Library Application Blocks – Reusable library for:
    • Data Access
    • Caching
    • Cryptography
    • Exception Handling
    • Logging, Security
    • Policy Injection and
    • Validation
  • Software Factory – Helps architects and developers to create instances of specify types of applications
  • Guides – Architecture and Design guidelines
  • Reference Implementations – Sample applications

 

 

References: 1) Guidebook Microsoft Patterns and Practices 2) Internet