-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 34 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Hibernate vs. Toplink
PostPosted: Thu Jan 15, 2004 3:13 pm 
Beginner
Beginner

Joined: Mon Nov 24, 2003 11:47 am
Posts: 22
Our company has been working with Hibernate only several weeks on one big project (accounting system). We will start another project during several weeks (large IS) and our partner wants Toplink.

Is Toplink better as Hibernate (I know that Toplink is not open source and is expensive) ?

Are there some differencies between Toplink and Hibernate ?

Until now I found these differencies:

1. Toplink has GUI. But it is not very good tool, and time for create java classes, mapping and create DB is the same as write XML for Hibenate. But is it small advantage

2. Toplink has more possibilities to work with database:
* for example I can define my own SQL commands for insert,update,select,delete (it can be important)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 17, 2004 9:30 pm 
Beginner
Beginner

Joined: Sun Sep 21, 2003 12:19 am
Posts: 40
I think Hibernate can define Native SQL for each case you mentioned too.
Yeah I am interested to learn this too since I have never worked with Toplink before. Anybody converted from Toplink camp on this board, can give us some advice? Really appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2004 12:13 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
You cannot (yet) define native sql for insert,update,delete's - but you can for selects.

If you need that functionallity the current way is to make a custom persister (which actually should be quite easy ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 03, 2004 4:16 pm 
Beginner
Beginner

Joined: Tue Apr 27, 2004 11:16 am
Posts: 23
Hi Max,

Can I get some tips on the steps about implementing a custom persister, to get my stored procedures running.

I followed the thread...
http://forum.hibernate.org/viewtopic.php?t=11
but I didnt get any reply from it.

If u can upadte me.. it will be great...

Thanks

-Gana.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 03, 2004 4:43 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
I'd suggest you take a look at the current v22branch in cvs, quite some stored-procedure and custom-sql support is already implemented there


Top
 Profile  
 
 Post subject: Re: Hibernate vs. Toplink
PostPosted: Mon May 03, 2004 5:11 pm 
Regular
Regular

Joined: Mon Oct 06, 2003 1:59 am
Posts: 52
RichardMaly wrote:
Our company has been working with Hibernate only several weeks on one big project (accounting system). We will start another project during several weeks (large IS) and our partner wants Toplink.

Is Toplink better as Hibernate (I know that Toplink is not open source and is expensive) ?


Toplink is older which may result in a more stable and mature OR Layer
whereas Hibernate supports more modern and more open development.

RichardMaly wrote:
Are there some differencies between Toplink and Hibernate ?


Basically OR Mapping can be described by a couple of well implemented desing patterns. Martin Folwer collected them in PEEA. Looking at both tools you can find these patterns.

RichardMaly wrote:
Until now I found these differencies:

1. Toplink has GUI. But it is not very good tool, and time for create java classes, mapping and create DB is the same as write XML for Hibenate. But is it small advantage


The workbench you refer is not so fine IMHO. It does not support all the features the API offers. Hibernate supports XDoclet which is cool as you can tight the mapping close to your code and XDoclet does a lot of work for you by fitering out the informations which are already in classes. In Toplink you have to take care that all the Workbench xml files are in sync with your source control tool (e.g cvs). This process isn't automatable eg. with ant or maven you have a higher automation in you build process. Hibernate is more straight forward in the way to map things wheras Toplink provides a bunch of different mappings (transversion mapping, etc.).

RichardMaly wrote:
2. Toplink has more possibilities to work with database:
* for example I can define my own SQL commands for insert,update,select,delete (it can be important)


This feature sound good at the first moment. In fact Toplink offer more kinds of Queries. But whenever you leave the ObjectLevelQuery land you have to create the POJO's by yourself which is comparable to the way Sun does with Raven (using ResultSet like set of data, iterate it and generate your objects). This may be interesting but needs more work. I'm not sure for the moment but I guess this is possible in Hibernate as well.

Toplink has no own query language. You have to use a Query API (query-by-example if you like buzz-words). Hibernate already starts to provide something similar but here is Toplink the winner. In many cases a QL is more pragmatic but a API is more configureable and easier to encaspluate.

Toplink has its own nuts and bolts e.g you have to carry yourself about registering the POJO's in the cache (
UnitOfWork.
This is automatically done in Hibernate. You don't have to care about the clones extis in Toplink's world. IMHO the whole eagerness/lazyness is handle better in Hibernate (one-to-one, many-to-one). To get it really workin in every case you have to make your POJO's to so called ValueHolders.

Technical Toplink uses reflection whereas Hibernate tries to use Bytecode weaving whenever possible. Weaving is not even fast it may work more mature whin bitchy class loader envoriments. Oracle OC4J for instance is such an environment.... we needed 3 days to get it working there while the class loading woes causing mystical server hungs.

The support of Toplink via Oracle's Metalink is not that good. You have to deal weaks for weaks with the support to come to a solution. This forum normally has nice response time.

Having said all of this I still guess that Toplink is a good product. It's just does some things in a differnet way as Hibernate. It may work better with Oracle database but as I'm using Hibernate on non Oracle-Database I cannot give you any infos about this concern.

BTW you cannot switch the underlying caching provider of Toplink and you cannot use a different pooling provider (you can use J2EE pooling --> javax.sql.DataSource in Toplink but you must have a enviroment that offers a JNDI Nameservice and a DataSource driven pooling).

Some interesing stuff in this concern: While JBoss 4.x will use Hibernate as future persistence engine Oracle will use Toplink for OC4J/AS.

Hope that helps you to gain some infos.

_________________
"Wisest of the Maia was Ol


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 03, 2004 5:50 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
when you go to an Oracle conference and ask them about other products than toplink, they reply "hum nothing really interesting".
Then you ask the second question: "oh i've heard about a product called Hibernate", they reply "oh yes, just a fashion moment, not really serious, will die".
Then curious you ask the "killer" question "ok but tell me what can toplink do that hibernate can't", the answer? they aren't able to really answer this question because they know that some of the customers are technical and if they begin to lie.... they're going to be ridiculous.

I ask those 3 questions 5 months ago, just take a look at how hibernate has grown in one year, how powerfull it is, no real bug it has, "open minded" product pluggable with great pool system, great cache....

I 've used the query system of toplink.... it is a _____, HQL is very very more intuitive to use and if you want to compare the two, criteria api is enough for the comparision.

Toplink is a great and powerfull tool, but Oracle must find real arguments to explain its price cause hibernate for me (i'm using it since feb 2003) does not lack important features.
And if you need some special features, it will probably come very soon.

Be carefull with commercial arguments....


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 03, 2004 5:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
*chuckle* thats a funny story. It's especially funny since we have a very warm, mutually respectful relationship with the actual developers of TopLink and we co-operate with them in the JCP.

But I certainly don't expect their sales guys to say nice things about us - business is war!

:-)


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 03, 2004 6:21 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
we're are ok about this, developper are rational, this tool is great but
commercials are _____argh,
"business is war but honnesty is a way of life" ... now i'm gonna write a song, good night folks i'm too busy ;))


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 03, 2004 7:53 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Just to confirm what have been said. I was a (short-timed) TL user, and I found this tool not as intuitive as Hibernate. But to be honest, Iwas pretty new on ORM at this time.
I also did a HB/TL comparison and talk to the TL techies when I switched, and they basically agreed all my needs where covered by Hibernate (except for the GUI tool that wasn't so good).

This is a good tool however compared to tons of ORM you can find : it's in the top 2 for sure ;-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 03, 2004 9:28 pm 
Newbie

Joined: Tue Apr 13, 2004 3:18 pm
Posts: 3
>except for the GUI tool that wasn't so good

This is not an argument anymore.
ORM Studio Hibernate Edition - http://www.exadel.com/products_ORMstudio.htm
Visual guide - http://www.exadel.com/downloads/ormhib/viewlets/gs/ormgettingstarted_viewlet_swf.html

And more products are coming from other companies.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 04, 2004 4:39 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
valeriy wrote:
>except for the GUI tool that wasn't so good

This is not an argument anymore.

Anyway, I used to finish my TL mappings using XML Spy ;-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 04, 2004 4:45 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
valery,
i've seen exadel but what is the pricing for the orm gui?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 04, 2004 11:39 am 
Regular
Regular

Joined: Mon Oct 06, 2003 1:59 am
Posts: 52
gavin wrote:
*chuckle* thats a funny story. It's especially funny since we have a very warm, mutually respectful relationship with the actual developers of TopLink and we co-operate with them in the JCP.

But I certainly don't expect their sales guys to say nice things about us - business is war!

:-)


Next week I have the chance to meet with a TL Product Mangager. I will use this chance to add some insult to injury *lol*. I hope I get some statements about how TL Team think about JDO and of course attribute/annotation driven programming (XDoclet, Tiger Annotation) instead of evil UI-Workbench and of course if the plan/get rid of to automate the stupid UnitOfWork-clone-all-POJO-references "approach" ;).

*g*

BTW thx for such a wonderful tool.

Toby

_________________
"Wisest of the Maia was Ol


Top
 Profile  
 
 Post subject: Re: Hibernate vs. Toplink
PostPosted: Tue May 04, 2004 11:48 am 
Beginner
Beginner

Joined: Mon Nov 24, 2003 11:47 am
Posts: 22
Thanks tradem for answer. After 5 months we have a lot of experiences with Toplink and Hibernate. We are working on two large projects (both have more than 100 database tables == more than 100 Hibernate/Toplinks POJO objects) and several hundred users. We had meeting last week where we compared both products.

Both products are very similar and no one has some important (for our work) feature. We found only small diferencies:

* in mapping many-to-one I can have "lazy" object. In Hibernate I can have lazy only collections

* We often use Criteria API (Expression in Toplink). This API is slight more handy in Toplink. But other API is better in Toplink.

* In Hibernate is nice thing: session.saveOrUpdate() - if I update objects with another session. In Toplink it is not so easy (this is maybe biggest diference between Hibernate and Toplink)

* sessions.xml file is better than hibernate.properties (there is possibility to avoid to see password for database connection)

* WorkBench is not very handy for large projects. There are far better simple Hibernate xml files.

We decide to use Hibernate in our next projects because Hibernate is cheap, we use not only Oracle, Hibernate has better xml definition files, etc.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 34 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.