What is jpa2web?
Readily available tools like Hibernate (see Resources) have dramatically reduced the impedance created between Java objects and their database storage; specially, the ease with which Java classes can now be annotated to specify the way objects should be persisted. Developers are freed from the onerous task of writing up database integration codes. Hibernate solves the persistence issue; however, Web pages need to be created to handle these elements. A typical scenario for a medium-sized Web application can proceed something like this: The developer starts by coding the Plain Old Java Objects (POJOs) that represent a particular domain model, and then proceeds to create the different transactions and the Web user interface. A subset of the elements of the model will frequently involve non-transactional data. Customers, clients, countries, locations, employees, and companies are typical elements of a business model that are maintained by a few operators.
Why not generate the Web presentation layer to create, add, list, delete, and search these elements from the annotated beans? And why not make this presentation a friendly Ajax experience? These are the main goals of the jpa2web tool, which has the following process flow:
* Input: POJO-annotated beans (and optional templates).
* Output: An Ajax Web application to handle and persist the elements of the model.
* Technologies used: FreeMarker + ZK + Hibernate (see Resources for links to more information on these technologies).