Todays most entertaining presentation at Javapolis (at least from the ones i attended) was the presenation by Scott W. Ambler on agile model driven development (AMDD). Not because of the contents, he basically flipped through a lot of different diagrams, saying you can do this, you don’t want to do this. His presentation was entertaining because of his bluntness and way of presenting.
He also presented the idea of database refactoring, on which he recently published a book, called Database Refactoring. It would be nice to be able to refactor database applications, but the example Scott made during his presentation didn’t convince me that it’s very doable.
Actually, not all database refactoring is hard. It’s refactoring the tables which is hard. The problem with database tables accessed by many applications is that the database tables are basically the interface of your application. And normally you try to minimize change to interfaces used by external applications. You try to be as much backwards compatible as possible. So you usually add new functionality to your interfaces while keeping the old stuff.
Most refactoring in java applications happens inside the application, outside systems don’t really notice that you’ve refactored your application. And you test this with unit tests. Database refactoring would be a lot easier if your applications aren’t tightly coupled to the database tables. So you need to hide your tables as much as possible, for example behind views and packages. If you use ref cursors your applications don’t have to contain sql statements, and thus they aren’t as tiedly coupled with your database.
Scott made some interesting statements. Here are some quotes:
Anyway, an entertaining session. Food for thought.