In this post I want to give some pointers to/an overview of technologies for developing server side software in general, as well as one in particular: Attribute Oriented Programming, also known as AOP (is not the same as aspect oriented programming, by the way!).
AOP refers to a framework, that is an extension of the standard Java Doclet API . It enables conversion of custom Javadoc-like tags into source code, thereby allowing the programmer to focus on, let’s say the implementation of his EJB bean only, and let a tool such as Xdoclet generate the necessary interface classes and deployment descriptors. When working with EJBs it is almost impossible to do without such a tool, since alleviates the labour involved when dealing with all the interface classes and makes managing your Container Managed Relations (CMR) in the deployment descriptors viable. As an additional bonus, all files+deployment descriptors will be in sync with your implementation continuously.
The two most important tools are
- EJBGen, see also Accelerate EJB 2.0 development with EJBGen
- Xdoclet, see also Using XDoclet: Developing EJBs with Just the Bean Class by Dion Almaer
As is discussed in e.g. AOP with Java 1.5, Java 1.5 now includes facilities to for AOP standard, albeit in a slightly different manner.
Summarizing, I think AOP/Xdoclet is key in developing J2EE software. I used it for EJB development under JBoss, but it supports code and deployment descriptor generation for numerous (proprietary) applications servers and technologies (servlets, struts, JDO, Hibernate, JMX).
Finally, even the generation of the tags can be automated itself with Middlegen! This is escpecially useful for e.g. graphically setting up the CMR between your entity beans. More to follow on this research in subsequent posts! I’ll include some code examples as well.