'. '

LiveDB

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(New page: 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 cal...)
Line 1: Line 1:
-
Another use of [[Annotation Processor]]s (in addition to generate [[CompileTimeCaches]]) is to provide typesafe, compile-time view of a live database structure. Something that might be called [[JavaOnRails]].
+
Another use of [[AnnotationProcessor]]s (in addition to generate [[CompileTimeCache]]s) is to provide type-safe, 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]].
+
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'' hype, 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 [[Java]]6. 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 Processor]]s can be.
+
This page describes my first experiment showing how to do something similar in old good [[Java]]. Well, it is not old good [[Java]], but [[Java]]6. That version of [[Java]] is still few years old, but good ideas take time. That is why we are only slowly recognizing how useful [[AnnotationProcessor]]s can be.
== Get the sources ==
== Get the sources ==
-
Right now I have sources in a branch, as not everything is
+
Right now I have [[sources]] in a branch, as not everything is automated (I don't know how to start Derby automatically yet):
<source lang="bash">
<source lang="bash">
 +
$ hg clone -r livedb http://source.apidesign.org/hg/apidesign/
 +
$ cd apidesign
 +
$ hg pull
 +
$ hg update livedb
</source>
</source>
 +
 +
And then open the right project ''samples/livedb''.

Revision as of 20:49, 14 July 2010

Another use of AnnotationProcessors (in addition to generate CompileTimeCaches) is to provide type-safe, 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 hype, but for me, rails mean exactly this. Be able to see content of LiveDB.

This page describes my first experiment showing 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 AnnotationProcessors can be.

Get the sources

Right now I have sources in a branch, as not everything is automated (I don't know how to start Derby automatically yet):

$ hg clone -r livedb http://source.apidesign.org/hg/apidesign/
$ cd apidesign
$ hg pull
$ hg update livedb

And then open the right project samples/livedb.

Personal tools
buy