On 4 Jun., 22:34, Casper Bang <[email protected]> wrote: > So is this a general tendency all around, code generation becoming > mainstream? I've traditionally feared the day I can't do full round- > trip engineering in plain view but depend on magic generators and > IDE's (perhaps due to experiences with JDeveloper and the ADF > framework). Is this a good thing or a symptom of inferior languages > and lack of expressibility?
In general, I prefer "code interpretation" at run-time to code generation. Let's take an ORM like Hibernate. Through XML or annotations, I define the persistence strategy a POJO. At runtime, these are interpreted by the ORM. If I add a field, I add an annotation / update the XML file. If Hibernate becomes smarter, then I don't change anything because the "interpreter" gets updated and is active at runtime (yeah, this is simplified since moving to a new ORM version can induce pain). Now if I generated the persistence code for the POJO instead, then I need to re-generate the code again for a new field. And if the ORM becomes smarter, I somehow need to know to regenerate the code again. To me, and that's subjective, the interpretation mode is better. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
