[[OpenSocial/shindig]]
 
 
 ** install [#ya420e36]
 READMEに書いているが、適当なディレクトリ(例:/var/www/shindig)とかを作ってsvnでチェックアウトする。
  svn co http://svn.apache.org/repos/asf/incubator/shindig/trunk/ .
 
 VirtualHostで適当なServerNameを割り当ててDocumentRootを/var/www/shindig/php/にする。
 VirtualHostで使ったServerName(仮にshindig.example.comとする)にアクセスしてみる。
  http://shindig.example.com/gadgets/ifr?url=http://www.google.com/ig/modules/hello.xml
 上記はgoogleのhelloworldのサンプル(http://www.google.com/ig/modules/hello.xml)
 Revision: 660801で動作を確認.。
 Revision: 660801で動作を確認。
 
 [[OpenSocial/shindig]]
 
 
 ** install [#ya420e36]
 READMEに書いているが、適当なディレクトリ(例:/var/www/shindig)とかを作ってsvnでチェックアウトする。
  svn co http://svn.apache.org/repos/asf/incubator/shindig/trunk/ .
 
 VirtualHostで適当なServerNameを割り当ててDocumentRootを/var/www/shindig/php/にする。
 VirtualHostで使ったServerName(仮にshindig.example.comとする)にアクセスしてみる。
  http://shindig.example.com/gadgets/ifr?url=http://www.google.com/ig/modules/hello.xml
 上記はgoogleのhelloworldのサンプル(http://www.google.com/ig/modules/hello.xml)
 Revision: 660801で動作を確認.。
 
 ** 動作 [#zcf6e69e]
 shindig/phpには .htaccess が置いてあり、mod_rewriteを使ってアクセスを全てindex.phpに渡している。
 index.php内で、アクセスされたパスを調べて適当なクラスに処理を渡している。
 アクセスコントローラーのようなもの。
 REQUEST_METHODがPOSTであればdoPostメソッド
 それ以外はdoGetメソッドを呼び出す。
 index.php内の$servletMapに有効なパスが記述されている(パス名=>クラス名)
 #blikimore
  $servletMap = array(
         Config::get('web_prefix') . '/gadgets/files'    => 'FilesServlet',
         Config::get('web_prefix') . '/gadgets/js'       => 'JsServlet',
         Config::get('web_prefix') . '/gadgets/proxy'    => 'ProxyServlet',
         Config::get('web_prefix') . '/gadgets/ifr'      => 'GadgetRenderingServlet',
         Config::get('web_prefix') . '/gadgets/metadata' => 'JsonRpcServlet',
         Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
         Config::get('web_prefix') . '/public.crt'       => 'CertServlet'
  );
 Config.php内でweb_prefixを指定できる。
 通常は指定する必要は無いが、以下のような状況なら変更する必要がある。
 - VirtualHostが使えない
 - DocumentRoot以外のディレクトリ(/~user/とかhtdocs/shindig/とか)で使いたい
 - mod_rewriteが使えない(/index.php/gadgets/ifr?のようにアクセス)
 
 ** 各パスの動作 [#cd97b02b]
 現状わかっている事は、
 - /gadgets/files
 -- /gadgets/files/somepath/somefile のように記述するとshindig/javascript/somepath/somefileを取得して出力する
 - /gadgets/ifr
 -- /gadgets/ifr?url=someurl と記述するとsomeurlにアクセス、出力がgadgetのxmlならばパースして実行可能なhtmlとして出力する
 
 動作がわかったものから下位ページを追加していく。
 
 #ls2
 
 #blikifooter(斉藤)
 
 tag: [[OpenSocial>tag/OpenSocial]]
 
 ** 各パスの動作 [#cd97b02b]
 現状わかっている事は、
 - /gadgets/files
 -- /gadgets/files/somepath/somefile のように記述するとshindig/javascript/somepath/somefileを取得して出力する
 - /gadgets/ifr
 -- /gadgets/ifr?url=someurl と記述するとsomeurlにアクセス、出力がgadgetのxmlならばパースして実行可能なhtmlとして出力する
 
 動作がわかったものから下位ページを追加していく。
 
 #ls2
 
 #blikifooter(斉藤)
 
 tag: [[OpenSocial>tag/OpenSocial]]
 

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS

アークウェブのサービスやソリューションはこちら