Thursday, October 22, 2009

EF against DB2 z/OS

The joy of it all :) . Turns out that the v9.7 EF provider from IBM doesn't generate correct insert statements against z/OS. I can't even tell how often my habit of putting wrappers in place has saved me a lot of trouble. The EF caching provider from CodePlex that I put in place provided an easy place to fire an event just before a DBCommand is cached/executed. Some quick & dirty string manipulation and the insert statement is fixed. While doing that, also handled SQL statements that contain 'length', 'starts with' and 'ends with'. The IBM provider doesn't handle those, but they are somewhat handy to have. An other option was waiting for the IBM product support to turn around and fix all this stuff, but I thought it was better not to hold my breath for that one.

Without a doubt, the IBM DB2 provider has serious limitations at this point. So why use EF when it's that difficult against DB2? As always, there is talk about getting rid of DB2 z/OS as a DB platform. Don't see that happening any time soon, but if I have the opportunity to develop an application DB platform independent, I probably should. On top of that, EF makes development a lot faster and easier once you have it in place. Can't even explain how happy it makes me to have the compiler help me when the data model changes :) . The additional framework I built on top of EF also provides features like audit trails. That happened to be a requirement, and within a day I had a screen built on top of the audit trail that exposes entities and properties under 'friendly names' and allows you to navigate relationships in the audit trail. Being able to use that saves so much time and bugs compared to an audit trail that would have to be custom coded for each entity.

I have noticed though that the projects are starting to become less challenging to the point of not challenging at all. It's simple execution of established patterns. By itself good, but I think it's part of a series of signs that it's time to move on (on a big scale). Noted on the list of things to do quickly.

No comments:

Post a Comment