We are planning to use DD4T using java for some POC. Just wanted to know how DD4T consumes odata service?

Do we need any wrapper while using DD4T with java.

2 Answers 2


I assume you know DD4T for Java is an MVC application (Spring MVC). It uses factories to read Tridion content and metadata and to transform it into DD4T class model. The factories work with different providers, which actually read the content/metadata from the Content Delivery database.

One of such providers would be the OData provider. Now funny enough, there is no official OData provider for DD4T and you would have to write one yourself (it's not too difficult), or use an unofficial one (I heard there are some floating around this thing called "Internet").

If you choose to write one yourself, simply start by implementing the provider interfaces for pages, binaries and links. Please do make use of heavy caching (e.g. EHCache will do wonders). Also, think about using your home made JAX-RS services (& client) to write your own providers which talk directly to the CD API (so no OData in this case).

Fun work anyway, good luck!

  • 1
    Maybe good to mention that unless you have a "hard" requirement to use the OData service, you could just use the out of the box Java DD4T. It won't use the OData service, but the Content Delivery API. Jun 11, 2014 at 7:56
  • 1
    In this scenario, the only reason I can see for using OData would be if it needs to be hosted on another machine. Which probably won't perform as well, so I'm not sure I'd go that route. Jun 11, 2014 at 8:00

Why would you want to do this? In general, running on the API directly improves performance because you lose network latency, unnecessary (de)serialization and improved cachability.

  • Typically the Tridion part is just a 'smallish' part of the entire website. Especially when the customer is running its own web applications, integrations, ecommerce, etc. It is much easier to have a clear separation on Tridion stuff and 'other stuff'. Especially for Java this spears you of JAR dependency hell :) Also not to mention improvement in scalability (of OData servers) and easier installation/maintenance of OData servers. Jun 12, 2014 at 9:40
  • If you want to seperate tridion stuff and other stuff, especially for jarhell, you will be much better off seperating at the webapp level then at the data retrieval level. Jun 12, 2014 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.