Shindig (PHP版)を動かしてみる

Shindigとは、OpenSocialとGoogleGadgetの仕様に準拠したオープンソースのサーバソフトウェアです。Apache Software Foundation内で開発が進められています。

  • Gadget Container JavaScript — core JavaScript foundation for general gadget functionality. This JavaScript manages security, communication, UI layout, and feature extensions, such as the OpenSocial API.
  • Gadget Server — an open source version of Google’s gmodules.com, which is used to render the gadget XML into JavaScript and HTML for the container to expose via the container JavaScript.
  • OpenSocial Container JavaScript — JavaScript environment that sits on top of the Gadget Container JavaScript and provides OpenSocial specific functionality (profiles, friends, activities, datastore).
  • OpenSocial Gateway Server (does not yet exist in the repository) — an implementation of the server interface to container-specific information, including the OpenSocial REST APIs, with clear extension points so others can connect it to their own backends.
via: What is Shindig?

Shindigを動作させる事によって、自分のWebアプリケーション上でGadgetをホスティングでき、さらにOpenSocialアプリケーション機能を提供できます。
今回はShindigのダウンロードからPHP上で動作させるまでをやってみました。


ソースをダウンロード

$> mkdir -p ~/src/shindig
$> cd ~/src/shindig
$> svn co http://svn.apache.org/repos/asf/incubator/shindig/trunk/ .
しばらくするとダウンロードが完了します。最新のリビジョンは 644261 でした。


Webサーバに配置
$> cd /Applications/xampp/xamppfiles/htdocs
$> ln -s ~/src/shindig/php/gadgets .


サンプルGadgetを動かす
Webサーバを起動し、http://localhost/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml にアクセスすると、、
1.png ガジェットコンテナは動いているようです。

iGoogleのようにガジェットを表示させるサンプルです。
pic2.png

OpenSocial Gadgetを動かす

http://localhost/gadgets/files/samplecontainer/samplecontainer.html

こちらのサンプルはOpenSocialがジェットのデモです。起動時にエラーダイアログが表示され、動いてくれませんでした。ソースを見る限り、ViewerとOwnerが “Hello” と言い合う(?)もののようです。

pic6.png

まとめ
Java版しか動かないと思っていましたが、PHP版も開発が進んでいるようです。早くすべての機能を試したいですね。

コメントを投稿する