Annotations

From APIDesign

Jump to: navigation, search

Annotations can definitely be an API. At salesforce.com, we have a dynamic language that we develop in-house. Many methods for standard objects in this language are implemented in Java, and annotated to generate (just like described in CompileTimeCaches, using AnnotationProcessors?) the method signatures in Apex. The annotations are literally the library API.

Similarly, Hibernate can use annotations to specify mappings between the DB and entity objects. It's an API for communication between the DBA and logic programmer.

Annotations are often used in lieu of XML configuration files (in spring, hibernate, tapestry, etc.) There are many cases of projects using annotations to get rid of "XML configuration file cruft" (as they see it). Therefore it's likely the general case that annotations are an API in the same way that XML schemas are.

--RichUnger Thu Mar 27 21:10:09 PDT 2008

Personal tools
buy