ADF Business Components or TopLink - what to choose?

This is a question that I see from time to time coming from customers who are getting started with JDeveloper and ADF. On the face of it, both TopLink and ADF BC do the same thing - take care of persistence and eliminate a lot of SQL writing for CRUD operations when working with a database. So why does Oracle have both? and which one is right for me?

Well my answer is that each one is suitable for a specific type of developer/project.
Let's face it, not all developers come from the same background and not all developers think the same way.
Basically for the ADF BC vs TopLink debate I'll break down projects and developers into two camps - one is thinking OO and the other one is thinking SQL - if you are thinking OO than TopLink is for you, and if you are thinking SQL than ADF BC is for you.

Let me give you a simple test to see what type of developer, or what type of project you are in.
When you think about your upcoming application do you think: "I'm going to have a department object with a methods exposed that will let me access the department details and also the collection of employees which will be one of the attribute of the department"?
Or do you think more along the lines of "I'm going to have this form were I'll show information from the departments table as the master and also the information about employees based on the Foreign-Key defined in the database?

As you can see these are two different ways to approach the same problem. And I guarantee that if you are thinking like the first sample you'll like TopLink more, and if you are thinking along the second line ADF BC is more up your alley.

The point is that TopLink comes from developers who were thinking in object oriented style and wrote something to make interaction between objects and the database simple. and ADF BC came from guys who were thinking in the way that most 4GL client/server tools were working (Think Oracle Forms, Powerbuilder etc) - which is how do I access these tables in the database and show them on my Form.

So there you have it, it might seem a little bit of oversimplifying the picture - but I think you'll find that this is the best approach for making the choice. No need to look into all the little features that set those two framework apart, just use this simple test and you should be fine.

Comments:

ADF is too complex and too proprietary and locks you in. There is a huge learning curve and you seldom find people with ADF in their resume. I like JDeveloper for other features and not for ADF.

Posted by Madhav Iyer on June 05, 2006 at 03:06 PM PDT #

Madhav, ADF doesn't lock you in. You can use it on any J2EE application Server. You can use it with standard EJBs and JSF and JSP and Struts. And to make it simpler to learn we came out with the ADF Developer Guide - give it a read to understand what ADF does and how it does it. This is quite a deep digging book.

Posted by Shay Shmeltzer on June 06, 2006 at 04:54 AM PDT #

What's important in my opinion is that Oracle offers standards based and compatible code, best practices (design patterns already implemented for you), performance and tuning (for ADF BC4J) through ADF frameworks. I think that if you have to produce J2EE apps in a productive way that meet all of this, ADF is a very good choice and has no competitor (many try to fill the gap, but Oracle is far ahead). It happens that it's effectively Oracle 'The vendor' who did this great job but unlike other vendors (IBM ??), you're not locked in. You take your code and deploy it on virtually every major app server. You can leave ADF whenever you want and return to boring 'manual' JSF + hibernate architecture (tralking about learning curve ? hope you have some very qualified J2EE engineers...) or whatever. Plus, you have now great documentation and a personnalised support through Metalink although i think it could be better. ADF Faces is built on top of JSF in a standard compliant way => ADF Faces has joined OS MyFaces project. ADF BC4J is a huge productivity framework for your business layer and does not make call to any proprietary app server API ie Oracle IAS. Toplink is the reference standard for JPA / EJB 3. I don't work for Oracle. I've been evaluating Jdev since 2002.

Posted by Seb on June 11, 2006 at 04:51 PM PDT #

Shay, you are posing the evaluation criteria based solely an OO versus relational "orientation". I'm guessing there are other aspects of the approaches that might be relevant. For example, wouldn't it be easier to evolve a toplink-based POJO OO model? Doesn't the OR mapping buy you some isolation from schema changes? Are than any others that should be considered? Thanks.

Posted by clark updike on November 08, 2006 at 06:31 AM PST #

Clark, There are many other points that you can consider when choosing your preferred solution. So for example for your point about toplink offering more isolation from the DB, one thing that plays in favor of ADF BC in the same area is that it has a "Synchronize with DB" option that automatically picks up DB changes and applies them to your components. The solution I gave is as I stated from a high-level point of view and will usually serve as a good rule of thumb if you can fit your team into one of the types of developers I describe. If you want to drill more about each one of the options I would suggest reading the two ADF Developer Guides we have out there to get an understanding of the internal working of the solutions.

Posted by Shay Shmeltzer on November 10, 2006 at 09:31 AM PST #

Hi Shay, I'm currently evaluating ADF BC with TopLink as a persistence layer. Can you shed some lights as to some of the main advantages and disadvantages, from your experience, of using ADF BC as a persistence layer? Thanks and Regards, John

Posted by John Ng on June 10, 2008 at 03:51 PM PDT #

I really believe that this comes down to the type of developer you are. ADF BC is much more oriented to people who are coming from a database background where they have SQL knowledge, and design their application based on their DB structure. TopLink is much more oriented to pure OO developers where your application design is focused on UML class modeling. I would recommend going through the two ADF tutorials at the top of the JDeveloper tutorial page to see the difference in the amount of coding also.

Posted by Shay Shmeltzer on June 11, 2008 at 05:11 AM PDT #

Hi Shay, I would like to know if BC4J is a good choice if my application contains 90% read and 10% write/update operations ? Thanks, Naresh

Posted by Naresh on August 13, 2008 at 01:49 PM PDT #

Naresh, ADF BC is a good choice whenever you are doing something with a DB. The fact that you mostly are going to do select type of operations doesn't change this. (You might want to read the part about read only view objects for this type of operations). TopLink will also work in this scenario. Shay

Posted by shay on August 14, 2008 at 12:23 AM PDT #

Shay, I am in the same situation trying to understand the pros and cons of the TopLink and ADF. One thing that I could not get a clear picture is, can they both be used in other IDEs other than the Oracle JDeveloper? Is there a fee involved? I seemed to have an impression that, deployment to other application servers is not free any more. Is it true for both ADF and TopLink applications? Thanks! Ning

Posted by Ning on September 04, 2008 at 10:23 PM PDT #

Ning, In terms of license one thing that happened since I wrote this original entry is that TopLink went open source as EclipseLink - so you can get a version of it for free and you can also get a licensed version of it. ADF BC is part of the ADF framework and is under the ADF license/pricing terms: http://www.oracle.com/technology/products/jdev/htdocs/jdevpricefaq.html Technically both TopLink and ADF BC are certified to run on other servers and other databases. In terms of IDEs that you can use: With ADF BC - the actual files you develop are XML and Java files that can be edited in any code editor - but if you are looking for the visual and declarative approach to working with these files - the JDeveloper is your tool. TopLink is a bit of a different story that kind of depends on what type of development you do. TopLink itself has tooling in JDeveloper and in a stand alone mapper tool. But TopLink is also a runtime implementation of JPA now - and you can find tools for working with JPA in any modern Java IDE from JDeveloper to Eclipse and Netbeans.

Posted by shay on September 05, 2008 at 01:12 AM PDT #

Hi Shay, I was wondering which is the best approach when using as well relational data as xml data. BC4J supports xml data in 10g using writeXML and reasdXML and in 11g we can even base an Entity Object on a Webservice. So BC4J is becoming OO more and more, you can choose declarative of coding approach so depending on skill- and mindset you can choose wizard-like or source-code. Toplink is standards-based but can't be approached declaratively. How can we dynamically handle relational or xml data and use conditional rendering, conditional business logic, integration with webservices, ... I would say Toplink is coding and BC4J gives you the choice: coding or declarative approach.

Posted by Nathalie Roman on October 10, 2008 at 01:28 AM PDT #

Nathalie, Actually in release 11g of JDeveloper we included the TopLink/EclipseLink capability to map to XML data sources as well. More info here: http://www.oracle.com/technology/products/ias/toplink/oxm/index.html So again I would say that both framework can work in this case ant it is a matter of development style preferences. Shay

Posted by shay on October 11, 2008 at 12:31 AM PDT #

Hi Shay,
Great Post. My project uses ADF BC and I find it great with Synchronize with DB option.

Posted by Sahar on October 04, 2011 at 06:54 PM PDT #

I am totally new to Oracle ADF and now i am in the evaluation phase of the ADF technologies to use it in each and every layer of the new project. With the new project implementation, my client has already setup the database with lot of stored procedures using their DBA team to use in new project.

With this scenario i am not able to make a decision whether to go with programmatical ADF BC to use stored procedures for all CRUD operations or use the Spring framework to execute the stored procedures by considering the Cache Management implementation. Is DAO's caching using Ehcahce or some frameworks is possible in ADF BC?

Please throw some light on the deciding the persistence layer ADF BC or Webservices with Spring framework to execute the stored procedures. I understand as per this blog, based on developers experience we can decide on ADF BC or toplink.

Posted by guest on June 15, 2013 at 08:21 AM PDT #

Guest, I'm not too familiar with the Spring approach for working with stored procedures, however ADF BC definitely has this covered with the programmatic approach.
Note that by using the ADF BC approach you'll also get the benefits that the framework provides in terms of optimizing DB access (range fetching, LOV etc) and you'll enjoy the benefits up the stack with things like easy binding to the UI.

Posted by shay on June 17, 2013 at 08:42 AM PDT #

Shay, Thanks for the response about the programmatic approach of ADF BC to use stored procedures. How about the DAO's caching in ADF business components to reduce the round trip between application and database?

Posted by guest on June 17, 2013 at 03:28 PM PDT #

ADF BC caches data at the EO level and your VO can also be tuned to decide what level of caching it does.
Check out the documentation for more on this.

Posted by guest on June 17, 2013 at 03:45 PM PDT #

JDeveloper, ADF, ADFm and ADF BC reminds me a lot of an anology created in the book titled "The Mythical Man Month" where it's relatively obvious to someone familiar with athletics that you cannot run a mile in 160 seconds if you can run 100 meters in 10. In our latest design discussion it was decided we would use ADF Faces with JSR standards like JPA, EJB, JavaBean Validations, etc. instead of ADF BC and DTOs instead of ADFm as we are running a marathon. Quite frankly I can't think why you would be using Java EE if you're not involved in a marathon.

Posted by guest on November 12, 2013 at 11:55 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today