• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is hibernate necessary

 
Anand Shrivastava
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,

I am about to make my first java website. It contains only 5 tables. What should be my approach. Should I use JNDI and DAO or should I use Hibernate. What is the current industry practice ? I am using tomcat 6. However, to be candid, I do not know Hibernate, but would learn if it is worth.

Thanks.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Hibernate is worthy of learning. One thing that I love about Hibernate is that when you do a "select" in the database it will return an object to you, JDBC returns strings in columns.

There are several frameworks you could use to replace Servlets.

First, grab some tutorials and study about it. Struts or JSF with Hibernate is a good call. [=

I do like those frameworks.
 
Derek Eichele
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I would suggest it's a perfect time to learn Hibernate. Smaller projects are better opportunities to try something new, imho.

I have used DAOs for a very long time and have just recently learned Hibernate myself, and I think it's worth it. I do most of my work building Java web applications for Tomcat, and I find that Struts2 is a nice frame work as well.

Good luck.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it necessary? No.
Is it useful to learn? You bet.
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could instead of hibernate look at JPA. JPA is a specification which hibernate implements but there are more implementations.
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pat Farrell wrote:Is it necessary? No.


I agree. Don't go for any frameworks, just because people are talking about it or it claims it can deliver pizza object to your home address.
Understand if the framework really suits your need. Happy coding.
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do experiment with frameworks. But not in production code. Try them out for your hobby projects. And if you want to try something in production, do a trial first. Write a couple of small programs. The couple of days you spend experimenting are nothing compared to the days you have to "hack" because halfway through the project you figure out that it doesn't really do what you expected.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic