News for hackers. Stuff that matters.
Re:Zero to Riding the Rails in Four Months by Tichy on Monday October 15, 2007 @06:31PM (#68265)
Why don't you like Hibernate? It has never let me down so far, and I am positive that it is way superior to ActiveRecords. At least it also handles lots of special cases that are not implemented in AR. I also like the HSQL syntax.
Re:Zero to Riding the Rails in Four Months by ardit33 on Monday October 15, 2007 @06:51PM (#68277)
It is very bloated. Typical Java style. Too much XML (or anotattions), lots of "magic" happening, without you knowing what's going on. For complicated joins, you are much better off with just SQL (maybe using some utilities like Jakarta's DButil).

Hibernate is just another complexity with a steep curve, and it's propertary stuff to learn (HQL ?).

If you must do a ORM, I like Apache's Cayenne. It comes with a very nice utility, which creates everything for you. Much simpler than Hibernate.

Overrall I'd rather not use java. Python seems a much better fit for web development, thou it's most popular framework, Django, suffers a lot of the same stuff as Rails.

And Ruby is an ugly language. Too perl-ish.

Re:Zero to Riding the Rails in Four Months by Tichy on Monday October 15, 2007 @07:18PM (#68286)
No way you would create a join with pure SQL, filling all the objects fields by hand is just too much pain. I found HQL very intuitive to use, it is almost exactly like SQL, only with a few shortcuts. The learning curve was not so steep either.

Hibernate does one thing, and does it well. With the annotations, it has improved even more. What parts of it do you consider magic? Magic is not necessarily a bad thing - I like the magic of higher level programming languages that shield me from the gory details of assembly language. I just don't like it if code is not readable anymore without knowing the magic.

I will look into Cayenne on occasion. Hibernate is the industry standard now, though, and for a good reason in my opinon.

I would like to move to a more dynamic language, though...

Maybe using GORMS (the ORM from Grails, based on Hibernate) standalone in a Java project would be nice.

Re:Zero to Riding the Rails in Four Months by michaelneale on Monday October 15, 2007 @09:31PM (#68329)
>And Ruby is an ugly language. Too perl-ish.

Definately a taste thing, but I would agree (having done a bit of both over the last year). Ruby OO is nice, but then OO is often the cause of problems for me (python makes quasi functional styles easy).

People don't really use XML with hibernate (and haven't for some years from what I see). Hibernate does try to cater for every corner case though (perhaps the cause of the "bloat"). But its the 80/20 rule again - most people only want 20% of the features, the problem is that every one wants a different 20% (hence you get subjective bloat).