I made a change in the blogger configuration to ease the later work when blogging. It is possible that older entries are not correctly formatted.

Friday 4 March 2011

Code Generation

Since my last project, I gained much interest in code generation. The application we were supposed to reimplement using GWT consisted of around 60 entities and had as many dialogs to be implemented. Moreover, the database schema we had was in german. Since we did not want our code to be a mix of English and German, we needed to create a lot of typical classes for this: entities, DAOs, business logic, service layer, controller as well as more or less straight forward dialogs.

Since I did not have any of my usual tools, I decided to create my own generator, which could generate simple (still to be edited!!!) versions of the diverse classes we needed. This went quite well except that I needed to write java code to perform these actions. So the first generation was somewhat of a procedural code generator. This was a tedious task which made it quite difficult to maintain the code in the always evolvin software infrastructure we had.

A more useful approach is template generation. However for templates to be adapted for such a task you need a template language capable of looping over fields and methods of the code model.

Interesting Topics for Code Katas

Since I discovered about Code Katas (?here link me please?), I played with the question as to know which code kata would be appropriate for me. The following is an extensible list of topics which should be covered by these Katas.

Code katas:


  • algorithmic katas
  • architecture patterns
    • View architecture pattern
      • MVC (Model view controller)
      • MVP (Model view presenter)
      • MVC
      • Formular Web page
  • Web Frameworks
    • JSF
    • GWT
    • RAP

  • Web Service and Gui library choice

  • javacript libraries
    • jquery
    • ext.js
    • dojo
  • Jpa and hibernate
    • jpa -> schema
    • schema -> jpa
    • query jpa
    • query plsql
    • query criteria

  • Aspects
    • logging
    • security

  • Testing
    • Unit Tests
    • GUI Testing
    • test coverage

  • Build framework
    • ant
    • maven
    • gradle

  • frameworks
    • spring
    • AOP
    • MVC
    • Web Flow
    • Security
    • hibernate
    • OSGi
    • roo
    • flex
  • scm
    • git
    • server
    • svn

Please do not pay attention to the formatting this should be improved soon.