SlideShare a Scribd company logo
1 of 245
Download to read offline
Movable Type 6 で
できること(仮)
SixApart KK
Movable Type Engineer
Seiichiro Hazama
改め
Data API で
遊ぼう(仮)
SixApart KK
Movable Type Engineer
Seiichiro Hazama
発表させて
頂きます。
はじめまして。
間(はざま)
誠一郎と
申します。
Movable Type
エンジニア
です。
ネットでは
太鉄(たいてつ)
という名前で
活動しています。
MT4i の
中の人です。
(MT4i については
後述)
まずは
自己紹介
がわりに、
私と
Movable Typeの
出会いの話を
させてください。
私が
Movable Type と
出会ったのは
2002年11月頃
カテゴリ分けの
できる
日記スクリプトを
探していて、
Movable Typeと
出会う
まだ
「ブログ」という
言葉も
無い頃
「ウェブログ」
なのか
「ブログ」
なのか
そんな議論が
なされていた
時代のこと。
version は確か
2.51 とか 2.52 とか
そしてこの頃の
Movable Type には
日本語版など
存在せず
日本語化
する為には
有志による
パッチを
適用する必要が
ありました。
Japanese
Language Pack
http://uva.jp/dh/mt/archives/000190.html
daiji hirata
そして
2003年7月
バレーボールの
ブログを
始める
翌年が
アテネ五輪
女子バレーの
復興ムードに乗り
そこそこの
PVを
稼ぎ
なんとなく
ブログブームに
乗っかった
その年末
その年の
ベストblogを
選出する
blog of the yeah!
2003
が開催され、
その
スポーツ部門に
何故か私の
ブログが
ノミネートされる
という事故発生。
のこのこと
会場へ
でかけ、
惜しくも(?)
受賞は
逃すが
ここで
人生を変える
出会いをする
誰に会ったのか
というと
daiji hirata
Japanese
Language
Packで
お世話になって
いたので
挨拶して
名刺交換させて
頂いた
これが
縁で
その約2年半後の
2006年6月
シックス・アパートへ
転職
Movable Typeが
縁で
転職したので
当然
Movable Type を
担当することに
なる
と
思うじゃ
ないですか
履歴書にも
「MovableType
やりたい」
って
書きましたし。
ところが
その履歴書を
見た
面接担当者
daiji hirata
「Movable Type
じゃなきゃ
だめですか?」
とか
言うんですよ。
咄嗟に
「いや
かまいません。
なんでも
やります!」
って
応えたん
ですけど、
内心、
「え」
って感じでした。
そんな経緯で、
2006年~2010年
TypePad
(現Lekumo
Business Blog)
担当でした。
そして
2011年~2012年
Lekumo
キャンペーン
ビルダー
を担当。
そして
2012年10月
遂に
満を持して
Movable Type
担当へ。
使う側から
作る側に。
文句
言う側から
言われる側に
なりました。
しかし
開発担当
エンジニア
である前に
一ユーザーでも
あるわけなので、
自分でも
より
使いたく
なるような
そんな
魅力的な製品に
皆さんと一緒に
育てて
行けたらなと
思っております。
閑話休題
さて本題へ
Movable Type の
長所と言えば
長らく
静的コンテンツの
生成
と
言われてきました
もちろん、
それは MT6 に
おいても
顕在で
それに対する
一つの回答が
2014年01月15日に
リリースされた
新しい
Movable Type
Advanced
の
サーバー
配信機能です。
MT で生成された
静的コンテンツを
外部のサーバーへ
配信して
公開できる機能
公開サーバーと
アプリケーション
サーバーを
分離したり、
その公開サーバーを
ロード
バランシング
したり、
ステージング
環境として
使ったり、
コンテンツの
バックアップ元
として
利用したり。
静的コンテンツ
としての長所を
最大活用する
機能が、
サーバー配信
機能なんです。
これがまず、
CMSプラットホーム
としての
MT6 の
回答の一つ。
そして
もう一つの
回答が、
Data API
です。
Web を
取り巻く環境は
日々変化
しています。
ユーザーの
環境は
PC
スマートフォン
タブレット
携帯電話
etc...
様々。
これまでは
必死に
それらの環境に
最適な
コンテンツを
サーバーサイドで
用意しようと
躍起になっていた
昨今のトレンド
サーバーサイド
では
REST API などで
データを
配信する
だけ
コンテンツの
生成は
データを
受け取った
クライアント
(Web ブラウザ)
側で
デバイスに
合わせて
構築する
それに対する
回答が
Data API
なんです
さて、
皆さんは
MT4i
って
ご存知でしょうか
MT4i を
知ってる人は
挙手 ノシ
知らない
人の為に
ざっくり
説明すると
MT = Movable Type
4 = for
i = i-mode
当時
主流だった
i-mode
しかし前述の
Japanese
Language Pack
http://uva.jp/dh/mt/archives/000190.html
daiji hirata
UTF-8
or
EUC-JP
を選択する
必要があり
EUC-JPを
選択していた
i-modeは
Shift_JISしか
理解できない
さて
どうしよう
無いなら
作ってしまえ
で
できたのが
MT4i
でした
なにを
しているかというと
MT::Objectで
データを取得
文字コードを
Shift_JISに変換
全角カタカナを
半角カタカナに
変換
(データ量削減)
指定バイト数で
ページネーション
絵文字の
入出力
なんか
それっぽい
レイアウトで
出力
コメントも
投稿
できるよ
適用すると
これが
こんな風に
結構
色んな方に
使って頂きました
で、
Data API で
何か作ると
考えた時に
まず最初に
思いついたのが
Data API を
使って
MT4i を
作り直すこと
実は過去、
XML-RPC API で
チャレンジ
したことがあった
しかし
XML-RPC API は
あくまで
編集用
Entryの
Statusが
取れない
(公開or下書)
コメントが
投稿できない
など、
様々な
問題に直面し
断念
でも
Data::APIなら
できるよね
できるんじゃ
ないかな
ということで
作ってみた
DEMO
AngularJS
+
Bootstrap
で開発
当初は
jQuery Mobile で
チャレンジ
動的コンテンツに
向いてないかも…
そこで
なにやら
流行ってるらしい
AngularJS
所謂
Javascript の
MVC フレームワーク
長所は
Model
View
Controller
が分離できて
比較的
見通しの良い
コードが
書けること
かつ
非エンジニアでも
使える
(分かり易い)
と
言われている模様
そして
Data API との
相性も
良い
さて
開発中に
Data API の
問題を
一つ発見
Entries: get で
取って来た
body(本文)及び
more(続き)に
Text Filter
(フォーマット)が
適用されていない
リッチテキストで
書いていれば
問題ないが
MarkDown や
改行を変換、
独自の Filter など
使っていると
Filter 適用前の
素の Text が
帰ってくる
これは困る
こう表示して
欲しいのに
改行が
無視されちゃう
そこで
callback
ですよ
Data API は
callback を
使って
カスタマイズが
可能です
post_run_data_api.
get_entry
にて、
API が値を返す前に
Filter を適用する
すると
さて、
どのように
表示されるか。
こうだった
戻り値が
<p>さて、</p>
<p>どのように</p>
<p>表示されるか。</p>
こうなって
返ってくるように
なりました
また、
Entries: get の
返す
Object には
next や
previous が
無く
Newer や
Older の
ボタン
これ
が
実装できない
ので、
これも
callback を
使用し、
nextId と
previousId という
field を
Entries: get の
戻り値に
追加しました。
このように
Data API は
callback を
駆使して
様々な用途に
柔軟に対応
できる
実は、
独自の
Endpoint も
生やせる?
まだ
試してない
けど。
ではまとめ。
サーバーサイドで
なんでもかんでも
コンテンツを生成
するのではなく、
サーバーは
データを
返すだけ、
コンテンツの構築は
クライアント
サイドで、
というのが
今のトレンド
というのは
前述の通り。
だからこそ、
AngularJS のような
Javascript の
 フレームワーク
が
重宝がられて
いる。
そんな時代に
Movable Type が
Data API を
実装したのは
まさに時代の
要求であり、
これからの
Movable Type の
歴史は
Data API の歴史と
なって行くのだ
ろうなと、
エンジニアとしても
ユーザーとしても
ファンとしても、
感じている
次第です。
そんな Data API で
皆さん、
是非是非
遊んで
みてください。
作るのは、
なんでも
良いと思います。
最初は
個人で
欲しいなと
思ったもので。
MT4i も
最初は
そうでした。
そうやって
色んな人の
色んな何かが、
たくさん
出てくることを
願っています。
以上、
ご清聴
ありがとう
ございました。
ちなみに
さっきの
アプリは
MT4i の
焼き直しと
言いつつ
携帯電話では
動きません。
おしまい

More Related Content

Recently uploaded

SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 

Recently uploaded (10)

SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

MTDDC Meetup NAGOYA 2014-01-18 Seiichiro Hazama