Question

What problems would I have had to come up against for me to turn to Microsoft Enterprise Library for its DAAB? In other words, I seem to be developing fine without it now - I'm using ADO .net entity framework to access my SQL database but obviously open to new/more efficient ways of dealing with data access if they're worth it. The only articles I seem to have found are aimed at the more senior level of developer so can anyone please give me a little explanation of what Enterprise Library actually provides that I may be missing out on now??

Was it helpful?

Solution

When you are coding you should never re-event the wheel for many reasons. Most importantly when you re-use you are using something that has been reviewed and generally accepted by the development community. EL is library is designed to simplify the amount of code you need to write to do common things like exception handling, data access, logging, etc.

In the case of Data Access Application of the many benefits:

  1. it forces you to abstract your self from the underlying database and types allowing you to move from one to another. This also forces you to standardize how your access your data in your product.
  2. DA also allows you to simply define your database and access it in a generic fashion, leaving DA to deal with the plumbing of connecting and querying your database.
  3. Lastly it also helps junior level developers because they dont have to code to different databases, they use one interface and it will work on various platforms.

Drawbacks, in general any framework that sits above ADO.NET will be slower, and if you are not planning on doing any of the above, you might not need to use it.

Keyword is "enterprise."

OTHER TIPS

In previous threads, such as this one, the consensus seems to be the the Enterprise Library is generally heavily over engineered for most small to medium projects. I have not even looked at it due to threads that I have read here.

You have to realize - Entlib's data access block was designed and released years before Entity Framework. At the time, the goal was to automate connection string handling and proper cleanup of ADO.NET objects, and the DAAB does do a pretty good job at that.

But that's pretty much all it does. Entity Framework gives you modelling tools and an ORM layer. If you're productive with that, and it's fast enough for your needs, I'd not drop EF in favor of Entlib.

If you find yourself needing to do raw ADO.NET programming, Entlib is a valuable tool. But I wouldn't drop down to that level without a good reason.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top