Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming

Journal dthable's Journal: [programming] Is Hibernate Worth It? 7

I've got into a little debate/argument with a former boss over how to code up a new Java web application. I suggested looking into Hibernate (which I know very little about) to ease up on the developers. He thought we should take control of writing the SQL because there might be too much overhead. Does Hibernate, or any relational mapping library, cause enough slow downs to resort to writing SQL? Is Hibernate really going to make my database and application that much easier to maintain?

This discussion has been archived. No new comments can be posted.

[programming] Is Hibernate Worth It?

Comments Filter:
  • I'm currently architecting a J2EE app that uses the latest hibernate (that's wrapping up ejb3s) with the latest spring(2.0). If you have just a CRUD application (create read update delete), then hibernate is right up your alley. If you are doing something like reporting software, hibernate won't buy you much.
    Hibernate won't help your database much, but it will virtually eliminate the need for DAOs. And the overhead is negligible unless you have some REALLY funky table relationships.
    Don't forget the lea
    • FYI - if you want to have a chat on the phone or over email, just contact me. josh at marotti dot com.
    • by dthable ( 163749 )
      You mention ejbs. Does that mean hibernate is going to require that I run some kind of application server, jboss or websphere? I know I couldn't get that one to fly for a minute. You'll also need to point me in the right direction on spring. It seems like a lot of work for ??????

      I'll send you an email so we can talk.
      • hibernate does not require ejbs, nor does it require an app server. Same with spring.

        Hibernate is a lot of work so you can do this:
        object.save();
        I didn't write the dao. Hibernate already knows if its a save vs an update and automatically pushes the data to the database. No DAOs required, and you can turn on 'see sql' setting in hibernate to know exactly what sql is being run.

        Spring gives you 2 things:
        1.) A transactional layer with full rollback capability
        2.) Aspects so you can make advisors (basi
  • Hibernate is a very cool library for interacting with the database. If you are interested in supporting multiple backend database vendors, then using it is almost manditory, as it will handle all the database specific stuff and probably be more efficient since it will handle the DB specific optimizations. If you are using a single DB, then I would still recommend it. The overhead is small and it will simplify your interactions with the DB greatly.

    There is a learning curve, but it is by no means insurmoun
  • i ditched hibernate a long time ago in favor of ibatis. to me, ibatis gives me the object relational benefits of hibernate but gives me control over the sql (and i actually like that for a variety of reasons).

    in fact, the project i am wrapping up uses ibatis as its data abstraction layer (in front of a mysql database but ibatis is just at home with sql server, oracle, db2, sybase etc.)

    yeah, there is some weird quirks with ibatis, but its all very workable and its just a nice simple but very powerful and ver
    • by dthable ( 163749 )
      Was not having control of the SQL something that hurt you in debugging? My boss would rather see us write the SQL so we know exactly what's going each time. Is ibates faster than hibernate? What about these quirks?

Software production is assumed to be a line function, but it is run like a staff function. -- Paul Licker

Working...