I won't go into great detail here about how opensocial apps are architected but what I will say is that you have to define javascript in any opensocial app just to get the thing off the ground. On some containers you need to do an XML situp as well. I've only experimented on Orkut and MySpace thus far with varying degrees of success and confusion.
Coding Library: Javascript/AJAX

More OpenSocial Resources: