You are viewing an old revision of this post, from February 26, 2006 @ 17:43:00. See below for differences between this version and the current revision.

Hey, this JDBC stuff really works!

I could really do without checked exceptions, though: every single time I call a JDBC function, I have to add four lines of try/catch wrapper code, because an SQLException could be thrown at any time. Sigh. And I can’t think of a good way to avoid that, given that I want to wrap the JDBC code in an abstraction layer as quickly as possible, so I need to translate exception types; occasionally, a try block covers multiple statements, but not very often.

I’m still not writing all the data out – for now, all I’m writing is the table mapping entity numbers to entity types. I was going to first write the code (using my abstraction layer, not the real JDBC stuff) that would add all the data for each entity to the appropriate table, but I realized that, if I started there, then it would be too long before I could verify my work via acceptance tests. (And, in particular, I’d be able to put off using JDBC for too long.) So I changed my focus to getting to JDBC calls verified with acceptance tests as quickly as possible; that was a good move, and I’m honestly amazed at how easy it was to get a passing acceptance test. It should be smooth sailing from here on out – the rest of the code shouldn’t involve any new tricks and will be easily unit-testable. (Though I will throw in acceptance tests as well, of course, being a good boy.)

Post Revisions:

Changes:

There are no differences between the February 26, 2006 @ 17:43:00 revision and the current revision. (Maybe only post meta information was changed.)