iRSSの日記

はてなダイアリーiRSSの日記の続き

OpenSocial入門本がでた。開発環境はPartuzaがいいけど、タイポで悩まされた

OpenSocial入門 ~ソーシャルアプリケーションの実践開発

OpenSocial入門 ~ソーシャルアプリケーションの実践開発

↑こちらが、発売されました。
この本で、紹介されている、Partuza。以前から、気にはなっていたのですが、この本では1章とって、紹介されております。
Mac向けにかかれているのですが、細かく書かれているので、すんなり、導入できました。

しかし、致命的なタイポがあり、データの取得ができずにはまりました。



[{"id":"viewer_data","error":{"code":400,"message":"Person not found"}}]

データを取得しようとするのだけど

[{"id":"viewer_data","error":{"code":400,"message":"Person not found"}}]

がレスポンスされる。
うーん、こまった、とおもってたら、タイポだということがわかりました

Ring
↑こちらで、紹介されていますが。

第7章 P.299(リスト7-7)で、

$shindigConfig = array(
'people_service' => 'PartuzaService',
'activity_service' => 'PartuzaService',
'app_data_service' => 'PartuzaService',
'extension_class_paths' => '/Library/WebServer/Documents/partuza/Shindig'
);
となっていますが、2行目は
'person_service' => 'PartuzaService',
が正しいです。

またこの本のインストール手順の元ネタは
Where To Find The Internet’s Best Free Gay Porn – Chabotc
↑のようですが、こちらは、ただしく書かれています。

インストールした、設定ファイルをみていたときに
shindig/php/config/container.phpに以下の記述があり、ここには'people_service'とかかれていることに、気がついてたのですが、リカバリできませんでした。思い込みってこわいです。

/**
 * The default configuration settings
 * 
 * Put any site specific configuration in a config/local.php file, this way
 * your configuration won't be lost when upgrading shindig.
 * 
 * in local.php you only have to specificy the fields you want to overwrite
 * with other values, for example on a production system you would probably have:
 * $shindigConfig = array(
 *  'debug' => false,
 *  'allow_plaintext_token' => false,
 *  'token_cipher_key' => 'MySecretKey',
 *  'token_hmac_key' => 'MyOtherSecret',
 *  'private_key_phrase' => 'MyCertificatePassword',
 *  'people_service' => 'MyPeopleService',
 *  'activity_service' => 'MyActivitiesService',
 *  'app_data_service' => 'MyAppDataService',
 *  'app_data_service' => 'MyAppDataService',
 *  'oauth_lookup_service' => 'MyOAuthLookupService'
 *  'xrds_location' => 'http://www.mycontainer.com/xrds',
 *  'check_file_exists' => false
 * );
 *  
 */

他にも

sudo bi ....

なんていうタイポもあるのですが、これはかわいいですね。

sudo vi ....

正解はこちら↑

もちあるける、partuza、すばらしい。

parutuza(「ぱるつーざ」とよむらしい)は、OpenSocialの開発環境としては、友達作り放題、ローカルで動くということで、非常に有用です。
また、DBも見れるので、障害時のきり分けがやりやすいです。

おすすめです!

たぶん、1時間もあれば、インストールできるので、やってみましょう!