Archive for 1月, 2009

1月 25 2009

SocialWeb Conference vol.1

Published by Eiji under SocialWeb

SocialWeb Conference vol.1 was held at DeNA Office on 23rd Jan. packed with 50 people and had waiting list. I felt that SocialWeb is really hot topic and is going to break sometime soon in Japan.

My presentation was to show direction of this community as a moderator and then, what concrete service look like over seas, and how main players are acting against social web. Most stuff was introduced on this blog but, it made a good summary, hopefully.

The slide is uploaded on SlideShare (all in japanese :P). Some fonts look ugly but you can download the PowerPoint itself. Please take a look.

SocialWeb Conference Vol.1

View more presentations or upload your own. (tags: swj)

There was also presentations from yoichiro about OpenSocial, from id:ZIGOROu about OpenID. You can check out summary of the conference on this page.

Finally, I’d like to thank DeNA for offering nice conference room to us, and DeNA staff for helping us out on many situations.

View Comments add to hatena hatena.comment (9) add to del.icio.us (0) add to livedoor.clip (0) add to Yahoo!Bookmark (1) Total: 10

1月 12 2009

OpenSocial(Shindig)’s Server Architecture

Published by Eiji under OpenSocial

There’s some ways to get involved into OpenSocial

  • Be the container
  • Develop gadgets
  • Develop a service that uses OpenSocial RESTful API

It is quite important to know architecture of OpenSocial whichever you choose. Especially when you choose to develop a gadget, there’ll be a lot of situations you get better result by knowing it.

This entry will try to explain what OpenSocial architecture is like by looking at reference implementation Shindig.

Relationship between gadget and SNS

Did you know how iGoogle renders gadgets secure? In fact, gadgets are rendered inside iframes which is on different domain.

The reason for that is, security. It is quite dangerous to have third party scripts on same domain because it could steal cookies, do XSS, etc. I’ve written an article about Caja and there’s some details about same domain security (sorry only in japanese).

OpenSocial Gadget Rendering

Where’s APIs?

OpenSocial have 4 APIs People, Group, Activity and Persistent. Each of them is provided using RESTful in JSON, XML, AtomPub representation, or using RPC in JSON representation. Shindig’s JavaScript API is using RPC in JSON format.

I’ve mentioned about 2 domains on gadget architecture. In this situation, you know that API will be on Shindig domain because it’s using Ajax.

OpenSocial Server Architecture

Gadget rendering process

OK. Now you know the basic architecture. Let’s take look at the gadget rendering process.

Choosing which gadget to render

First of all, you can’t render a gadget without request :) On iGoogle, user picks one’s favorite gadget from gadget directory, then display it on iGoogle page. The service has to render an iframe to display gadget, then, it needs to know what the gadget is like. Shindig has an API to return detailed information about the gadget. Metadata API.

Retrieving metadata

Receiving request to metadata API, Shindig looks at its cache first of all. If no cache found, it fetches gadget XML and returns information to the service.

Rendering iframe

Once getting information about the gadget, service will render an iframe to display the gadget. By doing this, Shindig will receive request to render the gadget.

Gadget XML’s contents will be rendered as it is basically, but it will be convinient if you know that:

  • Specified features(tab, minimessage, etc.) will be concatenated and added to the HTML.
  • External links to JavaScript, CSS, images will be replaced with cache url inside Shinidig if configured.

That’s all how gadgets are rendered. You can check that requests are sent to Shindig when trying out with Firebug.

External APIs

If you want to use External APIs, you can use gadgets.io.makeRequest. If you choose FEED as content type, JavaScript API will return abstract object as response regardless of content format(RSS, RDF or Atom). If you choose JSON, JS API will return JSON object even if the returned content is stringified.

You have a few choices on security too.

  • Regular Request
  • Signed Request
  • OAuth

Regular Request is chosen when you don’t need any kind of authorizations on accessing API. Signed Request is OAuth Consumer Request in other words. By using it, external server can restrict requests from approved gadgets. OAuth is OAuth Core in other words. External server can know who’s accessing to the API using credential securely, on top of assuring that it’s coming from approved server.

Please refer to articles like this or this, I’ve written regarding OAuth. (If you can read japanese! :P)

Note that all external accesses are using proxy and Shindig has a strong cache functionality. You will have to take care of caches when developing a gadget. I’ll explain in detail about caches on coming entry.

View Comments add to hatena hatena.comment (17) add to del.icio.us (0) add to livedoor.clip (2) add to Yahoo!Bookmark (0) Total: 19

1月 11 2009

Multilingualize your Wordpress blog with WP_Multilingual!

Published by Eiji under Wordpress

Been wanting to make this blog multilingual for a while, I just found a good plugin to do it.

WP_Multilingual is a multilangual plugin for Wordpress. It’s not an auto-translator, you have to post in each languages but, those languages will be tied to the single entry and viewer’s preferred language is automatically detected using request header. This was an ideal functionality I’ve been looking for.

Just one problem, Dean’t FCKEditor doesn’t seem to work quite well on japanese which you must install along with WP_Multilingual. ghh

Anyway, it looks ok just to internationalize. I’ll look for solution about editor.

View Comments add to hatena hatena.comment (1) add to del.icio.us (0) add to livedoor.clip (0) add to Yahoo!Bookmark (0) Total: 1

1月 08 2009

Footprint gadget for your FriendConnect

I developed FriendIntroducer as an experiment and was trying to understand how FriendConnect is different from ordinaly OpenSocial implementation. So this time, I’ve tried to develop a gadget which you can find FriendConnect interesting, Footprints. You know the idea if you’ve tried MyBlogLog before.

What is Footprints?

Footprints is a gadget to track visitor of you blog. Look at the gadget on bottom left of this blog. If you’re not joined or signed in, do it to check what it does.

Footprint is a pretty popular idea on japanese social networks. Once upon a time, SNS were all closed and it was difficult to find people you may know. Footprint functionality was a good tool at that time to find who’s interested in you.

Footprints1

As you could imagine, this gadget records visitor and its time. When viewed by others, timestamp will be displayed how long ago, you’ve visited. Also, you can remove your own footprint if you want. The xml is located at:

http://devlab.agektmr.com/OpenSocial/FriendConnect/Footprints.xml

Feel free to take it and use it on your blog.

View Comments add to hatena hatena.comment (6) add to del.icio.us (0) add to livedoor.clip (1) add to Yahoo!Bookmark (0) Total: 7

1月 06 2009

Google FriendConnect対応ガジェットが完成

Published by Eiji under FriendConnect

FriendConnectのメンバーが友達を紹介し合う文章が書けるFriend Introducerというガジェットを公開しました。このブログの画面左側に表示していますので、メンバーになってくれている方はぜひ、遊んでみてください。(なっていない方はメンバーになって遊んでください!)

FriendIntroducerとは

主に3つのビューが存在します。1つはブログ上で表示されるprofileビュー。

FriendConnect4

FriendConnectメンバーの紹介文を最大5件表示します。ページングが可能で、それぞれのメンバーに書かれた紹介文がランダムで表示されます。

メンバーのサムネイル画像をクリックするとdetailビュー(OpenSocial的なビューではないですけどね)に切り替わります。(※誤解を招きそうなので修正。detailビューは僕が勝手にそう呼んでいるだけで、OpenSocial的にはprofileビューです。)

FriendConnect5

一人に対して複数の人が紹介文を書いている場合がありますので、detailビューでは、その人に関する紹介文をすべて閲覧することができます。

ガジェット上部のボタンをクリックするとcanvasビューに切り替わります。

FriendConnect6

canvasビューでは、ログインユーザーの友達の紹介文を書くことができます。友達がいない方は、同じFriendConnect上の誰かを友達に加えてください。

FriendIntroducerをブログに貼付けるには

まずはこちらでFriendConnectに登録してください。サイト登録済みの状態で・・・

FriendConnect1

Social gadgetsをクリックします。

FriendConnect2

一番下にあるCustom gadgetリンクをクリックします。

FriendConnect3

Gadget URLをhttp://devlab.agektmr.com/OpenSocial/FriendConnect/FriendIntroducer.xmlとしてください。

ガジェットの横幅を調整し、Generate CodeをクリックするとHTMLコードが出力されますので、これをブログ等に貼付けます。

所感

以前のエントリにも書きましたが、FriendConnectガジェット作成のミソは:

  • OWNERはブログという仮想人格
  • requestNavigateToでcanvasビューとprofileビューを行き来できる
  • canvasビューのバックグラウンドは、サイト作成時に取り込んだcanvas.htmlをいじることで変更可能

といったところでしょうか。

今のところOpenSocialにコミュニティ的な考えはないのですが、FriendConnectはちょっとひねったコミュニティ的な応用、と思うと分かりやすいかもしれません。

また、FriendConnectの面白いところは、複数のSNSからインポートした友達リストをマージして利用できることです。例えば僕はorkut、Google、Plaxo、Twitterをインポートしていますが、同じブログに登録している人がこれらのSNS上で友達であれば、FriendConnect上でも友達になります。

いつかGoogleがiGoogleをSNS化する際、これらの友達リストがそのまま利用できるようになるかもしれませんね。

View Comments add to hatena hatena.comment (2) add to del.icio.us (0) add to livedoor.clip (0) add to Yahoo!Bookmark (0) Total: 2