More feedback from Jozsef:
1) What are you using in the UI layer for your web app?
The web application uses the Apache Click framework. It is in Apache incubator.
2) Have you considered using db4o with DataNucleus in the web app?
DataNucleus was called JPOX in 2005. At that time it was quite difficult to work with the bytecode enhancement. But since then it has evolved to a generic persistence layer solution (DataNucleus is an additional abstraction layer on the top of different databases).
This is good because the web application can be deployed on the new Google App engine for Java. Right now I do not use DataNucleus in the application because it adds more complexity. In any case all database calls are hidden behind an interface. So it is possible to change it if necessary.
3) How do you present persisted objects in the UI?
The presentation of item lists in the web application is Click specific. Click uses velocity templates as view.
I do not like to display database objects directly in the template. e.g. $order.orderI
If a field name in an object changes this requires a change in all references in the templates where it is used. I use display objects for this purpose instead.
This pattern should be described in the click documentation.
4) How do you update persistent objects?
When I update an object in the database there are two options.
- In connected mode I simply use the objectContainer.store() method
- In disconnected mode I rebind the object by id. This is not the recommended way but there's nothing better for updating disconnected objects right now.
The brute force method for an object update is to delete the object and add it again. Not nice, but works.