Is there a way to develop a Component to interact with another platform's content ? Both are CQ based applications hosted on different servers.
In other words how to communicate between two platforms (both are CQ applications on different servers)
Is there a way to develop a Component to interact with another platform's content ? Both are CQ based applications hosted on different servers.
In other words how to communicate between two platforms (both are CQ applications on different servers)
Cross domain interaction challenges are the same in CQ as in any web application. While several approaches exist, I've found JSONP to be the easiest option for allowing cross-domain communication. You could build a .jsonp selector (such as by adding a jsonp.jsp to your component) and make the JSP functionality very similar to the built-in .json selector that lets you see a node in the CRX repository in JSON format. In this case your selector would need to return JSONP format instead of JSON, and it would probably want to accept a callback name as an input parameter (such as ?callback=myCallbackname) so that it could wrap the JSON it returns in a function with the requested name.
Then, with that selector deployed on one CQ platform, you could construct a component on the other platform that would make JSONP AJAX requests to the other CQ platform using the .jsonp selector to fetch information. Really, the .jsonp selector can be coded to do whatever you want or need it to do, so if fetching node information is not exactly the sort of communication you need, it could do something else. As long as the AJAX jsonp request receives an appropriate JSONP response, you can communicate cross domain.
See What is JSONP all about? for more info on JSONP.
Also see http://api.jquery.com/jQuery.ajax/ for jQuery's JSONP support, as an example.