java/j2ee tips and blueprints
java/j2ee tips and blueprints
It is a very sad thing that nowadays
there is so little useless information.
Oscar Wilde
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.
And this approach was such a popular way of doing software this is called MDA’s first step.
The truth behind the this picture is PAIN.
After lots of effort and investment team gets used to this painful development.
Pros:
- Nice and breath taking project kick start.
- Early First start Release.
- Extra Strong Coding standard with less design and control.
Cons:
- Hard to maintain. You have lots of code that you cannot even touch. You probably have some code injection points that you can code thats all.
- Hard to go on. For each time you want to extend your model you’ll get into a dreadful code generation transaction. MAY THE FORCE BE WITH YOU.
- Impossible to modify or change something in underlying API or architecture.
- All of them have generating code running on some API that is not clear and documented.
Now:Era of wizards and Strong API
Today it is accepted total domain modeling in just iteration is impossible. so it should be preferred to iterate on both project development and modeling.
Cons:
- Very few stable code generators
- IDE dependent.
- most of them modeling only CRUD operations.
- Some of them are still generating complex code (lots of xml and java)
Pros:
- Since it is generated for one then you can easy modify generated code.
- Continuous model development and very flexible.
- focus one what you need. less unnecessary code.
- again quick kickoff.
- All of them generating high level and mature API that you can count on.
- Agile approach: no need to know all at the beginning.
Looking for some good and helpful wizards check out netbeans
Future:
- more complex and sophisticated API. implementation would take no more then modeling : See Ruby on Rails
- more flexible wizards.
- Highly reusable components.












> Hard to maintain. You have lots of code that you cannot even touch. You probably have some have some code
That’s a Pro?
thanks guyumu
hot referrers:
http://www.jaxmag.com/itr/news/psecom,id,40633,nodeid,146.html
http://entwickler.de/zonen/portale/psecom,id,99,news,41725.html