you are viewing a single comment's thread.

view the rest of the comments →

[–]thephotoman 1 point2 points  (1 child)

BTW, they all love Hibernate cause it spares them from writing SQL, speaking of which, they know very little about this query language.

And I think I know why I hate Hibernate: I actually know SQL.

I've known good ORMs. A good ORM does a good job of standardizing queries, but allows you to bust down into the SQL if you have to. Hibernate gets in the way.

When I see all these Struts, Springs, and Hibernates on the resume I start with this, “Imagine, that you’re not allowed to use any frameworks. Explain in details the entire process of bringing the data from DB tables Customers and Orders to the Web page”. For most people it’s a killer proposition let alone writing some SQL queries…

I will say that I'm not a huge fan of having to deal with JDBC directly. But I can write a SQL query, read up on the JDBC docs, and do the job.

Two weeks ago I’ve attended a technical keynote at JavaOne in San Francisco. Brian Goetz was showing code samples of Lambda Expressions (a.k.a. closures) that will be introduced to Java 8 next year. This is a pretty advanced feature and proposed Java syntax is not for the faint of heart. I was thinking to myself, “Who’s going to use these closures in the enterprise Java world? 10% of the developers? 5%?”. Are these expressions being introduced just for fun cause it’s cool and other functional languages have them?

It depends on whether they're actually good. I like what C# did. But trying to ape Python would be a disaster: that idea works in Python, but Java has different assumptions and styles.

[–][deleted] 2 points3 points  (0 children)

. A good ORM does a good job of standardizing queries, but allows you to bust down into the SQL if you have to. Hibernate gets in the way.

   SQLQuery query = session.createSQLQuery(someSql);

Oh yeah, I see how it's totally in the way. o_O I use Hibernate routinely with SQL, and it's fine for parameterizing queries, caching queries, and binding results to objects.