How towork easier with hibernate?

I’m new in hibernate!

It’s hard for me!

I have always some problems!

who can help me to make a simple hello world with hibernate?

thanks every body!

Sorry everyone, I couldn’t help myself… Sometimes “Duty Calls”.

dear hooknc
stead of thinking about my conversation
check my suggestion.
no need to scandal.
i used shine times and times in my projects
specially maplet framework
and i like this pattern
any way you are free if you want to stick to hibernate :wink:

[OT]My apologies to anyone confused by posts #3 and #4

They made more sense before the offending posts were removed.[/OT]

you’re kidding! I really hate its .xml files! they makes me confused!

how does it work so? can you explain more?

does it really supports ORM same as hibernate?

Your English is fine, no need for apologies.

However, you need to answer my questions from before first. Then we can talk about some specifics.

Also, if you’re not amirsam why are you shilling this product? What do you have to gain?

For me, Hibernate was pleasant to use! This is how I got started w/ Hibernate.

  1. Popular IDE like eclipse/myeclipse/etc… have auto code generation for Hibernate. You just need to specify the datasource. If you set your DB to have foreign keys/primary keys/etc… it will automatically create Hibernate configuration as well.

From this, I was able to learn the basics of Hibernate. Of course, when tuning for permance then one needs to KNOW hibernate before hands.

  1. I then grabbed a book EJB 3.0/Hibernate. You can use EJB 3.X Entity Bean API on top of Hibernate. This is the industry recommendation, however you lose some proprietary functionality for Hibernate. However, you’ll have all core needs to do CRUD.

  2. Then dig into Hibernate Documentation on how to tune the queries. People who use “as-is” for autogenated code is pretty stupid. For small projects, I guess it’s fine. However for a project that has over 100k queries a day then you’d want to tune the configuration.

For the Hibernate or ORM haters…

Get over it, your way is old and new way is in. I’m not say doing straight through SQL is bad~ in fact, SQL is very good! However, there’s always room to grow in technology and moving onto ORM is a good one! Main driver of going from SQL to ORM is that most projects today are done by Object Oriented Programs. SQL is NOT Object Oriented. Therefore, people create unnecessary boiling plate to make the connection…instead of focusing on the business logic. Yes, you can still hate ORM and it’s your choice to fall behind in technology.

hi every body specially hooknc
first excuse me for my bad english :slight_smile:
I’m not amirsam, but john stalin is my nick name !:slight_smile: don’t give name to people.
anyway! lets study this pattern step by step
how u replaced light weight technologies like RMI with some thing like web services. and how you compare this 2 ?! :nono:
jshooter is not working like rmi exactly, it is some thing between RMI, JMS and maybe other technologies.
pleas read jshooter part again deeper.
in witch technology of framework you have this kind off accessibility.
check this methods pleas and start coding with it

i will be happy to hear you idea hooknc.

Dear John Stalin (aka Amirsam Bahador),

You’re putting yourself in a position for harsh critiques of your work because your disingenuous behavior with how you’ve attempted to prompt your ‘product’. I did several searches for your Maplet/Shine framework and Sitepoint isn’t the first forum to be less then enthused with your posting shenanigans.

Your intent of helping our beginning developers is laudable, but your product is rubbish and is unusable for anything but the simplest and I mean simplest of applications.

You’re attempting to “fix” issues with Struts. Struts, while not easy, was replaced years ago by Struts2, SpringMVC, and JSF. Still none of these products are easy out of the box, but they are better then what you are purposing.

I didn’t see any proper understanding of what MVC even means.

Your Maplet framework or pattern pushes println statements for producing html. This type of behavior has been discouraged since JSP and Servlets were introduced. Is JSP great or easy to work with well? No way, that is why there are other products like Freemarker that are attempting to crack that nut.

There seems to be no ability to perform any type of Object Oriented or Model Driven development. How would a Maplet get an object to work with? Spring does this with Dependency Injection.

You’ve solved problems for tools that people don’t even tend to use anymore. Who uses RMI? It has been replaced by web services. I can’t even remember the last time I saw RMI used in a sentence.

I think your Database/JDBC class is kind of ingenious with the login method, but what have you really added to the different flavors of the Statement classes? Not much as far as I can tell and my guess is that the chance to close the connection due to exceptions is lost, unless it’s hidden behind the commit method. How do you handle exceptions btw? Is there connection pool management?

Your documentation didn’t even state how to work with hibernate better, which btw, seeing that you don’t even once mention working with a domain model, you most likely don’t even get the point of working with hibernate.

Why is your product easier for people to learn? Have you done a repeatable scientific study? I didn’t see anything in your framework that simplifies anything that isn’t currently available out on the market.

What will your developers do after they are done working for you and try and find a different job? Your product does everything differently then all the major products out there. How does that help students?

BTW, speaking of simplifying development for beginning programmers, who, besides the most naive asks a novice programmer to build an enterprise quality product?

I think that sums up my thoughts on your product.

Good day sir.

Search on Youtube some tutorials about how to use it. In there is explained in an easier way and it shows every step that must be done.

You’re joking right?

What a lame attempt at plugging a product. Did you have this “conversation” on other java forums too?

I’m amazed a what people will do to try and improve their Page Rank.

Sadly, you’ve hit the nail on the head with hibernate.

It’s hard for me!

I have always some problems!

Hibernate is hard for everyone. Just go look at the hibernate forums.

Here is my recommendation for working with hibernate.

Read the documentation fully prior to starting out with anything. I know it will take a few days, but it is worth it. Mark places of interest in the documentation of stuff you might need in the future.

Start with a simple one table example. Get that to work.

Add a simple one to many join table. Get that to work.

Get delete to work.

Add a many to many join table. Get that to work.

Get a delete to work.

Hibernate in Action is a reasonable book to read.

I also read Hibernate: A Developer’s Notebook By James Elliott, which was good, but it is 6 years old now. There might be a free version of the book for download.

After you’ve done your tests above, reread the documentation.

Seems like a lot of work, but hibernate is worth it. The power that hibernate provides far surpasses the aggravation that it causes during the learning process.

If you have specific questions you can also ask them here.