6. Overview
● ウェブサービスに Mobile 用の閲覧機能を作る
ためのアプリケーション
● フレームワークとしてMovable Type Open
Source を利用
● 各携帯キャリアごとに最適化されたHTML
● データソースとして Atom API 経由で取得し
た Atom を利用
10. Atom as DataSource
● XML::Atom::Client
– 今のところ API の URL は MT にマッチしたもの
● 取得した Atom から、MT::Blog /
MT::Entry / MT::Comment オブジェクトも
どきを生成
● Atom Server 側では UserAgent を判別して
meta / link を追加したりも
20. HTML::Split
● HTML を指定文字数で分割
● HTML タグを壊さない
– HTMLタグ途中で分割したりしない
● 改ページしても DOM ツリーを壊さない
● A 要素は終了タグまでをまとめてだす
– テキストノード、子ノードがページ分割文字数を超
えない限りは途中で分割しない
21. HTML::Split Example
my $html = <<HTML;
<div class=quot;pkgquot;>
<h1>HTML::Split</h1>
<p>Splitting HTML by number of
characters.</p>
</div>
HTML;
my @pages = HTML::Split->split(
html => $html, length => 50,
);
27. Where is bottleneck ?
● Atom サーバーに負荷がかかる
– Atom をキャッシュ(in memcached)して Atom
API へのアクセス数を減らす
● HTML生成時に負荷がかかる
– 共通HTMLをキャッシュ(in memcached)して、
HTML生成にかかる処理時間を半分以下に
29. We heading...
● Atom API を持つサービスを広く Mobile 対
応できるように
– Atom API へのアクセス、Atom からのオブジェ
クト生成を抽象化
– More configurable
● Open な Mobile 開発を
30. How to get the TypeCast ?
● Project in Google Code
– http://code.google.com/p/typecastmobile/
● Google Group
– http://groups.google.co.jp/group/typecastmobile