Micronaut
From APIDesign
(Difference between revisions)
Line 7: | Line 7: | ||
<br> | <br> | ||
- | 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 [[annotation]]s 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 [[annotation]]s. 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. | + | I participated in [[DSL]] vs. [[Annotation]] Shootout (slides are available as [Image:Domain-library-shootout.pdf]]). with [[RichUnger]] from Salesforge at [[JavaOne]] 2010. First of all we had to agree what a [[DSL]] means - and we concluded that [[annotation]]s 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 [[annotation]]s. 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. |
<br> | <br> |
Revision as of 04:46, 22 July 2020
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 (slides are available as [Image:Domain-library-shootout.pdf]]). 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.