Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

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!

share|improve this answer
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. –  Bart Koopman Jun 11 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. –  Peter Kjaer Jun 11 at 8:00
add comment

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.

share|improve this answer
    
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. –  Mihai Cădariu Jun 12 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. –  Rogier Oudshoorn Jun 12 at 10:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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