This update to the original application blocks has recently been released. After a couple of weeks developing with it I’ve decided that I’m going to ditch it and go back to the old blocks. There is lots of really useful functionality but what I’ve found boils down to two main problems.
The first problem I’ve been wrestling with is the flexibility in library configuration. I applaud the flexible storage mechanism and the excellent configuration application but, having tried to add my own provider class, I think it is too complicated. You need to derive three classes for every provider – ConfigurationView, ProviderFactory and ProviderData. The equivalent code written without the Enterprise Library is about half as much.
I also wonder what the benefit of having a system administrator rework your exception handing? The whole idea of exceptions is to only catch those you are capable of handling. If your handler catches a SqlException but the configuration is changed to wrap it in a MyException then the whole thing is going to stop working. I can just imagine the support calls:
Support: “Hello, Exony support”
Customer: “Er, hello. Your application isn’t working.”
Support: “OK, well looking at the deployment logs I can see it passed it’s customer acceptance tests. Have you changed anything recently?”
Customer: “Well I used the configuration tool to modify the exception handling.”
Support: “You shouldn’t do that. It’s not meant to be changed.”
Customer: “Oh, why is it there then?”
Support: “I dunno, let me ask an engineer… OK, he says why are we all here?… Maybe you should just change it back.”
The other issue is, whilst some parts of the library are incredibly configurable, the bit’s you really need access to are inaccessible. For example, in an enterprise application, it’s likely you might have a backup database connection. With this in mind, there doesn’t seem to be a way to enumerate all the database instances configured. I also can not find a way to create a database instance against a programatically generated connection string.
Some other minor problems I could live with but worth mentioning are:
- Logging is slow compared to other libraries
- You can’t store all your configuration in a single app.config [Edit: this is now possible with the extension library]
- The documentation is too much “look at this cool design we did” and not enough “how to do…”
- The fact that a patch had to be released fixing custom storage providers tells me that no one tested this feature – how much more wasn’t tested?
Hopefully I’m wrong on all counts and someone will provide me with answers to all my problems so I can do the right thing and continue using it. Maybe next week I’ll have better news to report.