Posts Tagged ‘ code generation

Code Generators OUT, Wizards IN

Code generation and development trends in java.

Brief History:Code Generation In Java

Code Generation was a must for J2EE because of lots of .xml, .java and .properties files . There are less code-reuse and less components. So if you are developing medium or enterprise applications your first step would be seeking a code generator. And finally you would find one or build a small code generator . And after some development and training you have something miraculous:Code Generated and lots of code working with pretty UI’s and interfaces.

Read more

when do not generate code !

Cloud Factory

Image by saharsh via Flickr

Currently code generation is very common way of some handling common repeating code fragments and some initial setup task like startup configurations and so on. Some clear benefits are:

  • ease your setup process
  • protects your code form some common coding mistakes
  • maintain some coding pattern practices and standards.
  • keep your effort on complex tasks

    But on the other hand when you evaluate code generator or while writing your code should thing about ” why you generate this code ? and not writing some generic component to evolute such business
    this is the most common mistake while using this technology. you generate code to customize the generated code. If you not need this fragment to customization. DO NOT GENERATE IT. otherwise in most case any enhancement in these fragments will require great effort or worse (to generate again).

    so what is important.

    • more less code generated more perfect it is
    • more easily you customize it more useful it is

    Some code generators:
    http://www.codegeneration.net/