SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Hibernate vs DAO

    hi,

    I wonder whether Hibernate is perfomant and really usefull for a J2EE application ?
    For example if we have to create a totaly new application J2EE, without very complicated traetment, like managing a stock of differents products (that's quite close to my case), is hibernate give a real addon ? (with a beginner team developper and modeler)

    I'm used to the old good DAO class and i never tried hibernate, so i'm trying to know if it's really relevant, performant and all... comparing to a standard dao where i can do all my specifics requests to get back only the real data i need.
    And is hibernate can manage complicated sql request on several tables?
    is it a technology with a futur or a new wonder will all change soon?


    Well, i have lot of interrogations on hibernate, if some experts of this wonderful forum(that's for the motivation ) could give me some advices i will greatly appriciate !

    thx

  2. #2
    SiteP0int Weazle hooknc's Avatar
    Join Date
    Dec 2004
    Location
    Socialist Republic of Boulder
    Posts
    937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hibernate is an excellent tool. We are using it on our J2EE product and it has been absolutly kicking ***.

    It does take a while to learn hibernate and work with it well.

    HOWEVER, since you're using the DAO pattern it shouldn't matter what your ORM tool is. You could you straight up JDBC if you wanted. But then you would have to implement all your object associations yourself. Hibernate manages all associations between objects through mapping files. It is very nice.
    baby steps... baby steps...

  3. #3
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hibernate can be a real pain if you don't design your database schema the "hibernate way", if your database is pretty simple in design then sticking with DAOs should be fine.
    Also in many cases hibernates performance is bad as the SQL behind sucks (such as if you do a lot of joins etc).

    Also if you just use DAOs in your application its pretty easy to switch to Hibernate, but once you start using hibernate it can be a pain to get rid of it.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx for your advices, it's not an easy choise, i have to think about it more...

  5. #5
    SiteP0int Weazle hooknc's Avatar
    Join Date
    Dec 2004
    Location
    Socialist Republic of Boulder
    Posts
    937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I suggest trying hibernate out for your self. Try some simple associations and mapping them out via hibernate and their mapping files. You will make mistakes along the way and unfortunately the hibernate documentation isn't quite the best, but at least get something working to see how slick hibernate can be.
    baby steps... baby steps...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •