Results 1 to 4 of 4
Thread: Should I be using hibernate?
- 04-01-2011, 12:54 PM #1
Member
- Join Date
- Apr 2011
- Location
- Changchun, China
- Posts
- 3
- Rep Power
- 0
Should I be using hibernate?
Hi all. I am thinking of creating lesson management software for the school I currently work for. I wish the have all the individual pieces of a lesson stored in a MySQL database (eg. games, activities, etc) as well as schedules, messages and lots of other pieces of information. I have spent hours and hours writing SQL statements and converting datatypes so that my program can work with MySQL. I have done a little bit of research into Hibernate today and think it may be the best way to go about it. I would genuinely appreciate any advice you can give me about both the advantages and disadvantages of both approaches. Are there any other approaches that I have failed to see? I'm sure there is an easier and more efficient way to go about it than what I have been.
Cheers for any info you can give me.
- 04-01-2011, 02:28 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
You still need some SQL statements.
You still need conversion stuff, though this will be in the form of mappings (either via XML, or annotations).
But Hibernate will hide lots of code away from you, and can be easier (once the above mapping work is done) to work with.
Personally? It depends on how you've written your JDBC code and your Dao layer. I have little problem with either method. Both can be mucked up by poor design.
- 04-01-2011, 02:42 PM #3
Member
- Join Date
- Apr 2011
- Location
- Changchun, China
- Posts
- 3
- Rep Power
- 0
Cheers
Thank's for your reply. I've looked into it some more and I think hibernate would be quite suitable. My code works with the JDBC code. It's just a matter of writing a lot of SQL to accomplish fairly simple tasks. I've found Hibernate also lets you write direct JDBC code to accomplish the tasks that Hibernate might be less suited for. Are there any major drawbacks of Hibernate that I should be aware of? Again, thanks for the reply. :)
- 04-03-2011, 10:24 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
As with any other framework, read the docs...keep the link to them handy when you're writing stuff.
Other than that I've not really hit problems, outside of large systems where it's not really Hibernate but the inevitable consequences of getting the order of things wrong. You'll probably not hit any of that.
Similar Threads
-
Hibernate
By redforce.bala in forum Advanced JavaReplies: 0Last Post: 10-02-2010, 11:49 AM -
new to hibernate
By ajhansiprasad in forum Advanced JavaReplies: 2Last Post: 11-06-2008, 05:20 AM -
Hibernate, help me
By Nick15 in forum JDBCReplies: 2Last Post: 06-05-2008, 03:39 PM -
Hibernate Use
By sireesha in forum JDBCReplies: 2Last Post: 05-21-2008, 03:05 AM -
org.hibernate.ejb.Version <clinit> INFO: Hibernate EntityManager 3.2.0.CR1
By Heather in forum JDBCReplies: 2Last Post: 06-30-2007, 03:01 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks