Results 1 to 6 of 6

Thread: Hibernate or JDBCTemplate

  1. #1

    Default Hibernate or JDBCTemplate

    Hi Guys

    Just wanted to see what your thoughts are when it comes to choosing whether to use Hibernate or JDBCTemplate.

    I am starting a new project and at the moment i cant really decide whether to use Hibernate or JDBCTemplate for database operations.


    Initially there will only be about 6 tables involved and there will be lots of SELECT/INSERT/UPDATE operations involved per user request.

    I have used Hibernate in other projects but ran into performance problems due to very large object graphs etc. So what do you think would be the best to use ?

    Application i am working on is like a Online Questionnaire where there will be about 50 to 100 questions pers exam and traffic wise there will be atleast 400+ users per day using it.

    Any input will be appreciated.

    thanks in advance

  2. #2
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    Imo, 400 users per day of an online questionnaire is a load that can be easily handled by early 90s technology, so I wouldn't really worry about performance.

  3. #3
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,425

    Default

    If it's quite simple, I'd be tempted to go with JdbcTemplate. Likewise you don't have to go the whole hog and use Hibernate, have you looked at iBatis?
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  4. #4
    Join Date
    Jul 2006
    Location
    Philadelphia, PA, USA
    Posts
    341

    Default

    Hey ozGuy,

    I'd go with whatever you're the most comfortable with; I realize that the JdbcTemplate-route is seemingly easier, but I'm so used to using Hibernate-based DAOs that I could write the app much quicker via Hibernate.
    Arthur Loder
    Software Engineer
    Fancast
    Comcast Interactive Media

  5. #5
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,425

    Default

    Either way, if you keep this in the data access layer, switching them out in the future shouldn't be too hard (obviously Jdbc version would require calls to replace Hibernate's transparent persistence). I'm currently porting raw Jdbc code, and I decided to go with JdbcTemplate because everyone else will understand what's going on. I'm comfortable with Hibernate, and I'm sure it would pick it up quite quickly but it's more difficult route at the current time.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  6. #6
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,806

    Default

    what about that hibernate
    if i dont bad remember dont support subqueries

    think about if you work with jasperreport, jdbcTemplate is a nice option

    about ibatis no worked with that yet

    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Posting Permissions

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