Welcome to AspAdvice Sign in | Join | Help

Data Access Application Block (Enterprise Library)

I used to be a big fan of the Data Access Application Block.  It used to be nice, simple.  It would save me a lot of repetitive code.  It was a standalone library with basically one class I needed to learn.  It just worked.

Enter the Enterprise Library.  This thing is aptly named, in that its complexity is something only an Enterprise would really want to deal with.  In addition to the DAAB, the other various application blocks have been consolidated into the library.  This is probably a good thing, but it would be nice if they were not all tightly coupled together now.  I can no longer use the DAAB by itself (this version - naturally I can keep using the older version).  Although the DAAB features a lot of improvements and enhancements, it is also a great deal more complex.  Gone is the SqlHelper class and its static methods.  Instead there are factories and instance objects.  Gone is the simplicity of passing the connection string into the methods (and the flexibility of storing the connection string wherever I like).  Instead the DAAB is tightly linked to the Configuration Application Block, which must be used to create the config file that stores the connection string information for the DAAB to use.  And the Config block requires a command line Windows Forms tool to be run just to set the config file up.

I was considering using the DAAB to reduce some repetitive DB logic in a Whidbey project which is being measured, in part, on its lines of code reduction.  However, I think the Enterprise Library DAAB would add to the needed lines of code, and significantly increase the complexity of the application, so at the moment I've decided against using it.  For a 'real' IT application, I would probably look at it more seriously, but unfortunately for quick hobby apps, the Enterprise Library is, to me, way to cumbersome to use at this point.

Published Wednesday, April 20, 2005 1:43 AM by ssmith
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Data Access Application Block (Enterprise Library)

Well, I am in the big enterprise and we just voted Enterprise Library off the island. We found that the ends really do not justify the means. As a matter of fact, after I get done reading the moring blogs I plan on starting our own DAAB. I'll be using SqlHelper as a starting point.
Wednesday, April 20, 2005 9:00 AM by ssmith

# re: Data Access Application Block (Enterprise Library)

Hear, hear! I liked the DAAB--single DLL, easy to reference, and lightweight. The only thing I needed to make the DAAB work was the DAAB.

EntLib has far more overhead than I want to deal with. To get the new DAAB to work, I have to get a config block working also, and deal with new config sections/files. Once I figured out the XML Schema, it was quicker for me to manually create the config information I needed than to deal with the GUI tool.
Wednesday, April 20, 2005 9:04 AM by ssmith

# re: Data Access Application Block (Enterprise Library)

Yep. That's the whole reason I still use the DAAB.
Wednesday, April 20, 2005 12:53 PM by ssmith

# re: Data Access Application Block (Enterprise Library)

I agree. The access blocks pre enterprise library were approachable. They were easy to pick up and use. Now I have to invest a lot of time to understand and use the library, not worth it to me.
Friday, April 29, 2005 1:06 PM by ssmith

# re: Data Access Application Block (Enterprise Library)

Steven,
I couldn't have said it better myself. You might want to check out the DAAB workspace on GotDotNet for more recent updates to the DAAB. Lots of bug-fixes and some new features.

More info can be found here: http://tinyurl.com/98btn




Tuesday, May 03, 2005 2:13 PM by ssmith

# re: Data Access Application Block (Enterprise Library)

All - thanks for the feedback - we find it valuable. You are right that we had to work out a trade-off between simplicity and support for more complex scenarios, and it isn't possible to please everybody all of the time.

That said, we are taking some of this feedback to improve the next version of the Enterprise Library DAAB. While we will still support the config block and tool, we plan on making it much easier to use without having to buy into the entire config system, eg:

SqlDatabase db = new SqlDatabase(connectionString);
db.ExecuteNonQuery("MySproc");

We are working on getting a preview of the new release (for .NET 2.0) very soon - it will be great to hear what you think.

thanks
Tom Hollander
Enterprise Library Product Manager
Microsoft patterns & practices
Thursday, May 19, 2005 4:13 PM by ssmith

# re: Data Access Application Block (Enterprise Library)

This is good news, thanks for the feedback Tom. Are you also considering an Xcopy deployment fix?
Saturday, May 21, 2005 6:30 PM by ssmith

# re: Data Access Application Block (Enterprise Library)

I have used all versions of Enterprise Library and find it the extremely easy to use. Often, it is simply a matter of learning how to use it once (like 20 mins of research and/or possibly a tutorial) and that is it.

Enterprise Library and the DAAB are much easier to use in the latest version so I am not sure why Steve holds these views. I assume it is like anything, no-one likes change but if you spend the time, it is WAY WORTH IT!!

Can't speak highly enough of MS Enterprise Library!

Cheers.

Monday, July 02, 2007 12:55 PM by Stephen McCormack

# re: Data Access Application Block (Enterprise Library)

Stephen - I'll have to revisit it.  My opinion in the blog is now over 2 years old so the latest version may well have improved quite a bit in terms of ease-of-use.  Thanks for your comments.

Monday, July 02, 2007 1:48 PM by ssmith

# re: Data Access Application Block (Enterprise Library)

Really thnx for posting this article, But mine is small asp.net (20 forms) application  with sqlserver database, is it worth full if i use these data application block, my applicaiton is specific to sqlserver database, so i dont need of using oledb related classes, how can i eliminate, please advice. if possible please mail me the details it will give me a great help.

Thanks

Naidu

vrsanaidu@gmail.com

Tuesday, October 02, 2007 8:57 AM by Naidu

Leave a Comment

(required) 
required 
(required) 
Enter the code you see below