This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Any use for simple Hibernate examples?  RSS feed

 
Christopher Rygaard
Ranch Hand
Posts: 42
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Would there be any use in me posting some very simple Hibernate examples to this forum? If so, how?

Everything I've learned about Hibernate is quite impressive, and I think everybody should be using it. Toward that goal, I want to lubricate the learning process so others can learn it quickly.

There seems to be huge number of Hibernate examples out there. Unfortunately, they are so complicated that the reader has be be already familiar with Hibernate to understand what parts of the example are relevant to the concept at hand and which part are just the author trying to show something that I don't care about.

I think the best way to learn a tool is to see fully worked-out examples that focus on one concept, and just one concept, and strip away everything that doesn't support that one concept. Strip away Maven. Strip away Ant. Strip away web servers. Strip away all unnecessary application logic. Strip away useful utilities that don't support the one concept. Just illustrate one concept.

And make sure the example code runs stand-alone, so the reader can see everything that needs to happen. That way if it doesn't run, the reader will know that it is a problem in the setup, not something wrong with his/her understanding of the concept.

In my struggles I have been building such examples, to make sure I understand the concepts. I have built 'distilled' examples for:

  • POJO
  • Simple one-to-many associations
  • Inner classes
  • Eager loading
  • Lazy loading
  • Cascade saving
  • Tree structure
  • Embedded classes
  • final classes and final instance variables
  • Simple container
  •  
    Bear Bibeault
    Author and ninkuma
    Marshal
    Posts: 66143
    141
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Sure, post them in the Blog Around the Campfire forum.
     
    Christopher Rygaard
    Ranch Hand
    Posts: 42
    3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I've made a first attempt. See my Hibernate examples.
     
    Nam Ha Minh
    Ranch Hand
    Posts: 515
    Eclipse IDE Firefox Browser Windows
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Christopher,
    You have great ideas! Strongly appreciated!
     
    fred rosenberger
    lowercase baba
    Bartender
    Posts: 12529
    48
    Chrome Java Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    If that doesn't deserve a cow, I don't know what does.

    cow granted.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!