Case Study

A software company had a complex and powerful C++ data library. It took developers a long time just to create a C++ class for a single database table just because of the amount of repetitive code required to create a class from scratch. Some developers tried taking shortcuts by copying existing classes, but that introduced errors occasionally because of the different ways the classes were written.

The solution to this problem was a simple code generator written in Java. Given a database table and a list of column-name-to-field-name mappings, the generator created the appropriate C++ classes. After the base class was generated, developers added additional methods to the generated code. The code generator was used as a one-shot time ...

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.