'. '


From APIDesign

Revision as of 04:45, 22 July 2020 by JaroslavTulach (Talk | contribs)
Jump to: navigation, search

Micronaut (Micronaut.io) brings compile time annotations to enterprise Java programmers. That's great!

I love annotations, especially the compile time ones. It helped NetBeans tremendously - originally we were using XML based registration (e.g. layer.xml), but that was very error-prone. We switched to compile time caching and the usability increased a lot. I have even called year 2009 the "year of annotations" in an API Design podcast.

I participated in DSL vs. Annotation Shootout with RichUnger from Salesforge at JavaOne 2010. First of all we had to agree what a DSL means - and we concluded that annotations are a great way to create embedded DSL in Java. Rich was defending their APEX programming language (which integrates well with DB) and I was defending annotations. In order to win the shootout I had to invent LiveDB - with that project your database schema becomes part of your Java sources. You can access the DB rows in a completely type-safe way. Once you change your schema (remove a column), your Java build fails and gives you an early warning.
For a long time I was sad to see that JavaEE only relies on runtime annotations. When Micronaut appeared, I was really glad that the beauty of compile time annotations is finally spreading to the enterprise Java applications.
Personal tools