The problem with the data-centric approach of Commons-Sql (and OfBiz, and Torque, ADO.NET, etc) is they approach persitence from the wrong way round. Data-models are still thought of data-models - they just have a nicer interface than raw SQL (be it Java objects, generic value objects or XML).
...
As clunky as entity beans are, they do encourage the Domain Model approach. Of course there are more elegant solutions, Kodo (a commercial but affordable JDO implementation) being my personal favorite. [Joe's Jelly]
A shameless plug for a colleague. After a long and annoying project trying to do XP with EJB1.1, Gavin and Daniel from our Melbourne office came up with Hibernate, an open-source (LGPL) O-R mapping tool written with agile development in mind.
It supports the Domain Model. It's lightweight. It runs on reflection so you can persist your objects without an extra code-generation step, and without following any coding conventions more stringent than "use properly named getter and setter methods". It supports object composition, inheritance/polymorphism, relationships, and the Collections API. It may even make tea, if you ask it nicely enough.
(I believe Joe knows about Hibernate already, but it was still worth plugging to the wider audience)
2:54:41 PM
|