Wednesday, January 26, 2005

Generating Code

In conjunction with tedia2sql, I also wrote some Python code to take those custom files that our hacked version of tedia2sql generates, and use them to generate Java data objects. In this case, the data objects have getters and setters, and 'getFooAsString()' getters, and are derived from a base class that has insert, update and delete methods to call our internal database layer (that sits on top of PostgreSQL). That's a mouthful, but the upshot is that I enter the stuff into Dia, save the diagram, run one script, and can start writing database client code.

Automating away tedious stuff is awesome. (Or put another way: it's great to be lazy.)


Post a Comment

<< Home