Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 959622

Pages: 1
svdb
Unregistered




Say no to build-time code-generation
      #14392 - 12/29/04 12:16 PM

Interesting article.

Although I don't think build-time code-generation should be promoted and I don't think its a good trade-off against code complexity. I think its a very bad trade-off and I think it should be strictly avoided. Maintenance is the main reason.

* Complex applications have complex code anyway, you don't want to have a complex build process on top of that.
* You still have to javadoc complex code more than simple code, and having it generated won't change that in any way.
* Simple applications don't need to be made complex with a complex build process.
* What executes is the code I see. No hidden "magic". We're not talking about AOP here. Even provided by a well-known tool, so-called "magic" has proven itself being barely maintainable because, over time, nobody remembers what it does.
* Another well-known idiom is this: the complexity of the code-generation grows cubic to the complexity of the generated code. You end-up having to maintain your code-generation tool as well.

The only viable trade-off I see is One-shot code generation, because it doesn't add complexity to anything and the whole build process is simpler to maintain over time.
This is very simple to achieve using your favorite IDE's code template features.

Note: readers might find the sample classes being a performance bottleneck due to the extensive use of the synchronized modifier.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 5018

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5