What is the difference between toplink and hibernate




















Optional 'thank-you' note:. This is what i got from googling But Oracle recently acquired TopLink, and Oracle is regrettably both a database vendor and an application server vendor. If you're a WebLogic customer or use a non-Oracle database, you're going to want to think long and hard before buying TopLink.

It's still a great product for pure Oracle customers, but others simply must protect themselves against a potential change in direction of TopLink.

Of course, you may choose to buy another proprietary OR mapper instead. The problem is that you'd then be buying a proprietary product with less-than-compelling market share. The number tables would be around 5 - 10 at most, and the operations really simple, I guess.

You create the Employee. When and If your application becomes too complex you may change the DAO implementation.

For instance in the "select" method you change the code to use the ORM object that performs the operation. The point is you may start simple and by using the desing patterns you may change the implementation later if needed.

The choice of one or another ORM solution that is depend basically on the technology you're using. For instance for JBoss or other opensource products Hibernate is great. It is opensource, there's a lot of resources where to learn from. But if you're using something that already has Toplink like the oracle application server or if the base is already built on Toplink you should stay with that framework.

By the way, since Oracle bought BEA, they said they're replacing Kodo weblogic peresistence framework with toplink in the now called "Oracle Weblogic Application Server". In this "Patterns of Enterprise Application Architecture" book, Martin Fowler, explains where to use one or another, here is the catalog. Take a look at Data Source Architectural Patterns vs.

Object-Relational Behavioral Patterns:. The DAO pattern. It does seem like it would be overkill for a very simple application, especially if you don't have plans to expand on it ever. However, it also seems like it could be worthwhile to use those with this simple application so that you have a better understanding of how they work for next time you have something that could use them.

Do you mean plain old JDBC? A small project might be a good opportunity to pick up one of the ORM frameworks, especially if you have the time. Once I have to do writes, I go with Hibernate because it's so much easier to set a few attributes and then call save than to set each column individually.

Dealing with foreign key relationships is another sign that you need to map it once and then use the getters. The same logic would apply to Toplink, although unless they've added something like HQL in the 3 years since I used it, Hibernate would be much better for this kind of transition from pure SQL. There's nothing too small for ORM.

After your first couple of projects, you'll find that you can't work any other way. The ORM mapping generally makes more sense than almost any other way of working. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Cancel Changes. Oracle Database Need help to understand difference, and contrast between Relational database model and the Object-Oriented model 34 posts views Thread by yensao last post: by.

Java What are these beans? Java Hibernate Problem 6 posts views Thread by rsrinivasan last post: by. Java Hibernate order by query thru java solution urgently reqd 3 posts views Thread by altafur last post: by. Java Urgent need help in Hibernate Configuration file 1 post views Thread by ashi last post: by.

Java hibernate 2 posts views Thread by oll3i last post: by. Java hibernate throws nullpointerexception 15 posts views Thread by oll3i last post: by. Java Hibernate :One-to-one association must return null instead of proxy or actual object 1 post views Thread by CatchSandeepVaid last post: by. General hadr monitor script reply views Thread by suresh last post: by.

General A tool to try open-source projects quickly reply views Thread by Trystan last post: by. General I want to be a programmer. Online Marketing How to get more followers on Twitter reply views Thread by strativab last post: by.



0コメント

  • 1000 / 1000