Answering Code Generator Objections
[Previous] [Main] [Next]

Answering Code Generator Objections


The major objections to code generators appear to be as follows: (Note: This is a home grown list - with no research to back it up.)

1. Generators don't generate what I want and they are frozen as to what they generate.

2. If I have to regenerate I lose all the bells and whistles I added by hand.

3. I can do just as good a job coding by hand.

Here are our answers to these objections.


1. Doesn't do what I want - /Templates/stable/Mainsource.java is a working java program. You can tweak it to add new functionality. It is also the template used by the generator. Any new functionality added to MainSource will appear in the next class you generate. There are also many features that can be turned on and off or modified using the "Class" edit screen.

2. Lose my tweaks - We generate three separate major classes where you might do you major hand tweaking.
There are two classes that you can control when the system stops generating. These two will have new code added as comments if you regenerate.
A. <yourClass>Buildlayout - controls the layout of the display.
B. <yourTable>TableModel - controls SQL access to the table(s) you are editing.

A third class <yourClass>Extra is never overwritten once it exists. There are many calls to this class scattered thoughout the generated code. You can place hand tweaking in this class and it won't get overwritten. If you need code in a place that doesn't currently have a call, you can add the call to MainSource.java and it will appear in the next class you generated.


3.. I can do as well - Of course you can. On the other hand you get over 10,000 lines of code that works. It is I18N, A11Y, has a SQL Where Clause screen and a report generator. This can get you a full featured GUI in much less time than you can hand code a class.