Print
Introduction

Introduction

As a newcomer to XDoclet2, it is quite likely, that one might feel a little overwhelmed by the number of terminologies one has to come to terms with - "Picocontainer", "Generama", "QDox", support for various template engines etc. This documentation aims to quell those doubts if any. Quite a few books have been written about XDoclet. But they cover XDoclet 1.x which predates this version. XDoclet2, incidentally, is a complete rewrite of the older version. For XDoclet1.x users, it should suffice to say that XDoclet2 doesn't change the 'end-user' experience much but it definitely is a marked change for Plugin writers and more significantly, a marked improvement on the design front when compared to 1.x version. This is a humble attempt at documenting the XDoclet2 architecture and its internals. It is by no means a comprehensive XDoclet2 documentation in the sense that it does not cover the existing XDoclet2 plugins and the associated tag definitions. If you are looking for information on a specfic XDoclet2 plugin, this probably is a good place to start. XDoclet2 is believed to have lowered the bar for plugin writers. But if it is'nt too obvious, please read on. Some familiarity with XDoclet 1.x will definitely help in understanding the article.

XDoclet2 architecture consists of

  • Generama, A framework for code generation.
  • QDox, A parser that extracts metadata stored in the form of javadoc style @tags in java source files.
  • A template engine abstraction.

Before discussing each of these components, it is important to understand that these components collaborate with each other to generate code. In other words, the framework needs to resolve the dependency between each of these individual constituents and to do this, it employs the home grown Dependency Injection container called Picocontainer. The following section provides a quick overview of picocontainer.

Dependency Injection Containers

If you are not too familiar with the term 'Dependency Injection' please refer to this excellent article. It also has a nice discussion on various flavours of DI.

Powered by Atlassian Confluence