Development ProcessHibernate is also process-agnositic. An XML mapping document decouples your Java object model from the underlying data model. Any of the following development scenarios are supported:
top-down
- implement a Java (JavaBeans) object model
- write a mapping document by hand, or generate it from XDoclet tags
- export the database tables using the hbm2ddl tool
bottom-up
- start with an existing data model
- use Middlegen to generate the mapping document
- use the hbm2java tool to generate skeletal Java code
- fill in the business logic by hand
middle-out
- express your conceptual object model directly as a mapping document
- use the hbm2java tool to generate skeletal Java code
- fill in the business logic by hand
- export the database tables using the hbm2ddl tool
meet-in-the-middle
- start with an existing data model and existing Java classes
- write a mapping document to adapt between the two models (you may require some minor refactorings of the object and / or data models)
See the Hibernate tools documentation for more information about roundtrip development.
|