Monday, 15 February 2010

Apache Shindig: Java vs. PHP

I've spent a lot of time trying to understand what Shindig does and how it works. Well, I am close to it now, I believe. Another point that I was concerned about is Java or PHP? Shindig is known to be available as both java and php code. I need to use shindig to redirect the OpenSocial API calls inside gadget to my database. For this I need to write some interface methods. So which Shindig to choose: php or java?

Since I am more confident with php rather than java, I've chosen to look into php version. Partuza project that provides an example of social application based on PHP version of Shindig turned out to be very helpful.

At first I ran into some problems with php shindig, but it seems as I found the answers and those are not really problems.

Problem 1:
First of all the common todo gadget in php version of Shindig has a layout completely different from that of java version, which seems to be strange. Well it's not. Why it is different is explained here by Chris Chabot.

Problem 2:
Gadget default user preferences are not shown in shindig (php version),
but shown in java version.
It seems as it is the container implementations issue.
If those values are passed over url parameters it works:

Gadget example is taked from Google:

Problem 3:
Gadget Friends gadget doesn't work in SimpleContainer.
It seems that those examples are not supported in PHP Shindig (found it on shindig emails list)
This gadget seems to work ok with partuza!!

Problem 3 was the biggest issue for me.
It seems it works properly in Partuza. Thus I will try to
implement interface methods to allow this gadget to request people from my database. If it works for Friends widget I will most probably stay with PHP if not, I guess I'll have to switch to Java version.

1 comment:

  1. See the solutions to these problems here: