Jonathan Ellis wrote:
4/12/06, *Michael Bayer*
at the point at which SA is looking more like Hibernate than you want it
to, its time to speak up ! at the moment, Hibernate is partially or
fully
driving just about every decision made in the past three weeks. its
gravitational pull is much stronger than that of trying to re-invent
each concept on your own.
I guess what scares me is that Hibernate tries to accomodate every
possible way of doing things, and I don't think that's a good target. I
don't want to have to spend days becoming an expert on my ORM.
("Professional Hibernate" is 350 pages long, without even counting the
"Using Hibernate with XXY" chapters.)
Considering that we don't have to worry about EJB, that's one huge chunk that
we can just brush under the rug. However, Hibernate is an extremely
well-thought-out ORM, and as Mike has said, why reinvent solutions that have
already been proved to work? Gavin King really did his homework, and the ORM he
ended up with is a very building-block type of library that is just plain
useful.
The more I studied Hibernate the more it just made sense. I don't think there
are a lot of unnecessary features in Hibernate. On the other hand, I think XML
is possibly the worst possible way to configure mapping files. This is where I
think SA has a huge lead. The expressiveness and brevity of Python makes it a
joy to configure mappings compared to Hibernate's XML.
I think the biggest reason Hibernate is such a bug chunk to swallow is its
comprehensive documentation. Its documentation arguably covers much more than
an API. When you learn Hibernate you're not simply learning how to use an ORM,
you're learning how to construct a normalized relational data schema that can
be mapped to in-memory objects. Hibernate was made to minimize the
object-relational impedance mismatch, and it shows. I think SA can solve most
of the problems that Hibernate does and still be much easier to get off the
ground with a simple example. Part of that is the extensions built on top (such
as ActiveMapper). With a good set of defaults, it will be easy to do the simple
things and possible to do the complex things (unlike some other ORM's that just
bottom out once you get past the simple use cases).
Another complicated part of Hibernate is it's many styles of inheritance mapping. I'm not
sure SA will need all of that, but someone's bound to ask for it sometime. While all this
complexity may seem daunting, I would counter that most of it can just be ignored when
you're starting. That means we have to write a good "getting started tutorial"
that doesn't scare newbies away. But we also need the reference documentation so people
can figure out how to solve their complex problems. Mike has done an amazing job of
documenting SA so far (very very amazing if you look at how fast the API is growing).
I say keep up the good work Mike! I'm here to help (if I can find the energy
after my day job). Having SQLAlchemy modeled after Hibernate will be a strength
if we avoid the nasty cruft like XML and EJB (which shouldn't be hard).
~ Daniel
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users