This tutorial shows J2EE developers how to use XDoclet to speed development. XDoclet simplifies continuous integration between components using attribute-oriented programming. It allows you to radically reduce development time by generating deployment descriptors and support code, allowing you to focus on application logic code. If you are a J2EE development veteran, then you realize keeping code in sync with deployment descriptors can be a drag. Often you may need to reuse components with other applications or in other environments like other application servers or with other database systems. You need to keep separate deployment descriptor for each application/environment combination, even if only one or two lines of the large deployment descriptor changes, you need to have a deployment descriptor for every possible configuration.
This can really slow down development. At times you may feel you spend more time syncing deployment descriptors than writing code. XDoclet facilitates automated deployment descriptor generation. As a code generation utility, it allows you to tack on metadata to language features like classes, method, and fields using what looks like JavaDoc tags. Then it uses that extra metadata to generate related files like deployment descriptor and source code. This concept has been coined attribute-oriented programming (not to be confused with aspect-oriented programming, the other “AOP”). XDoclet generates these related files by parsing your source files similar to the way the JavaDoc engine parses your source to create JavaDoc documentation. In fact earlier versions of XDoclet relied on JavaDoc. XDoclet, like JavaDoc, not only has access to these extra metadata that you tacked on in the form of JavaDoc tags to your code, but also access to the structure of your source, that is, packages, classes, methods, and fields. It then applies this hierarchy tree of data to templates. It uses all of this and templates that you can define to generate what would otherwise be monotonous manual creation of support files. This tutorial focuses on using existing templates that ship with XDoclet. XDoclet ships an Ant task that enables you to create web.xml files, ejb-jar.xml files, and much more. In this tutorial, you will use XDoclet to generate a Web application deployment descriptor with the webdoclet Ant task. In addition you will generate Enterprise JavaBeans (EJB) support files. Note that XDoclet Ant tasks do not ship with the standard distribution of Ant.
Download pdf Enhance J2EE Component Reuse with XDoclet
Related Searches: deployment descriptor, aspect oriented programming, hierarchy tree, javadoc tags, application logic
RSS feed for comments on this post · TrackBack URI
Leave a reply