• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Any use for simple Hibernate examples?

 
Ranch Hand
Posts: 42
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  •  
    Sheriff
    Posts: 67759
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I've made a first attempt. See my Hibernate examples.
     
    Ranch Hand
    Posts: 530
    Hibernate Eclipse IDE Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Christopher,
    You have great ideas! Strongly appreciated!
     
    lowercase baba
    Posts: 13091
    67
    Chrome Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    If that doesn't deserve a cow, I don't know what does.

    cow granted.
     
    Are we home yet? Wait, did we forget the tiny ad?
    The new gardening playing cards kickstarter is now live!
    https://www.kickstarter.com/projects/paulwheaton/garden-cards
    reply
      Bookmark Topic Watch Topic
    • New Topic