Announcement Announcement Module
Collapse
No announcement yet.
DAO POJO's vs Hibernate Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DAO POJO's vs Hibernate

    I have a fairly complex MySQL backend that I'm utilizing that is almost 6 years old. It wasn't all built by me but needless to say it's not the best built DB of all time..

    Over the times I've fixed many things, but there are a lot of oddities.

    My question is this:

    Is there an advantage to move to Hibernate or should I continue on using POJO's for data access? Essentially right now I am using a pattern similar to ActiveRecord using POJO's and it works, don't get me wrong but I'm thinking there has to be a more elegant solution..

    Thanks!

  • #2
    I have a fairly complex MySQL backend that I'm utilizing that is almost 6 years old.
    I assume that you use JDBC, right?

    Over the times I've fixed many things,
    Like what?

    Is there an advantage to move to Hibernate or should I continue on using POJO's for data access?
    I don't understand your context, Hibernate work closely with POJO, if performance is a problem, Hibernate is an excellent option, if you are working with JDBC I suggest move to Hibernate, since is more easier the work (reduce verbose code) and is useful for maintenance.

    Be aware of course that it depends strongly if your entities in your database is well done or structured, if not Mybatis (known before like Ibatis) would be an option too

    Comment


    • #3
      Originally posted by dr_pompeii View Post
      I assume that you use JDBC, right?


      Like what?


      I don't understand your context, Hibernate work closely with POJO, if performance is a problem, Hibernate is an excellent option, if you are working with JDBC I suggest move to Hibernate, since is more easier the work (reduce verbose code) and is useful for maintenance.

      Be aware of course that it depends strongly if your entities in your database is well done or structured, if not Mybatis (known before like Ibatis) would be an option too
      1) Yes I'm using JDBC

      2) I've changed many of the database tables over to InnoDB because they have millions of records, few writes and extremely heavy reads. Also I've tried to normalized the bad table structure a bit better.

      3) I'm not having a performance problem, my question was more from a developers stand point, I was hoping to cut down on code that I'm creating by hand. I would say about half of my DOA objects are well structured but some simply are not, so perhaps I'll try out Mybatis. I think the biggest thing to over come right now is name conventions, column naming issues with primary keys and foriegn keys.

      Comment

      Working...
      X