'. '

LiveDB

From APIDesign

Revision as of 19:08, 14 July 2010 by JaroslavTulach (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Another use of Annotation Processors (in addition to generate CompileTimeCaches) is to provide typesafe, compile-time view of a live database structure. Something that might be called JavaOnRails.

For a while languages like Ruby or Groovy has been blessed for being able to easily access structures in databases without all the hassle associated with traditional object relational mapping needed in Java. Maybe there was something more in the whole rails bubble, but for me, rails mean exactly this. Be able to see content of LiveDB.

This page describes my first experiment that shows how to do something similar in old good Java. Well, it is not old good Java, but Java6. That version of Java is still few years old, but good ideas take time. That is why we are only slowly recognizing how useful Annotation Processors can be.

Get the sources

Right now I have sources in a branch, as not everything is

 
Personal tools
buy