Re: Ammentos: hibernate alternative?
steve67 wrote:
I've developed for years with hibernate but I found it always too
complex (with its errors like lazy inizialization, mapping etc) and too
boring (make configuration file, sql dialect, etc).
"Boring"?
For a new project I've done a research on internet about free java [sic]
persistence framework.
OpenJPA, Oracle TopLink/EclipseLink or another Java Persistence API
(JPA) framework.
I found a free and opensource framework named Ammentos
(http://www.ammentos.org)
Ammentos used annotations, no configuration file, and it seems very very
very simple.
No configuration file at all? How does it know its connection
parameters?
Hibernate, used as a JPA implementation, uses the Java-standard
'persistence.xml' file, which typically is quite short (about a dozen
lines of XML) and annotations.
The degree of HIbernate's configuration complexity depends directly on
the complexity of the application's needs. In a simple case, with
tables corresponding directly to domain entities and straightforward
foreign-key relationships, there is very little complexity to a
Hibernate implementation.
For more complex scenarios, assuming Ammentos can even handle it, the
framework's complexity of necessity must match the problem's.
Given that JPA is the standard now, I would recommend using a JPA
framework. In my use of it, I find JPA to be straightforward,
reliable and useful. And gives me no trouble with its lazy
initialization. It allows me to put together persistence-connected
functionality in a matter of a couple of hours with very little
fooferol.
I have no idea whether you'd find it "boring", though.
--
Lew