SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
Movable Type 6 Overview
New York Perl Mongers Tech Talk / Oct 18th, 2013

Yuji Takayama
13年10月26日土曜日
AGENDA
•

About Me

•

Six Apart is ...

•

Movable Type is ...

•

Movable Type 6
•
•

New features

•

•

Data API
Loupe

Panel Discussion
•

Fumiaki Yoshimatsu

•

Akira Sawada

•

Yuji Takayama

13年10月26日土曜日
ABOUT ME

Yuji Takayama
1973, Born in Yamagata, Japan
2006, Started working at Six Apart
ytakayama@sixapart.com

@yuji

yuji

Developer for Movable Type 3.2, 3.3, 4.x, 5.x and 6.0 Acted as the Engineer Lead
for the development team starting from 5.1. As a Program Manager, focuses
mostly on development of product specifications.

Cat Lover
My social media links are listed on the left. Feel free to follow me!

swordbreaker

13年10月26日土曜日

This is my second year in a row visiting New York
City.
Do you know “Six Apart”?
Title
13年10月26日土曜日
SIX APART IS...
•

2001, Founded in San Francisco

•

2003, Open Japanese branch

•

2010, Six Apart(US) merged with Video Egg, -> Say MEDIA

•

2011, Six Apart(JP) acquired by infocom, a Japanese information
technology company

•

2013, Six Apart(US) Re-brunch

•

Famous Perl monger from Six Apart

13年10月26日土曜日
SIX APART ALUMNI CLUB

Tatsuhiko Miyagawa
13年10月26日土曜日
SIX APART ALUMNI CLUB

David Recordon
13年10月26日土曜日
SIX APART ALUMNI CLUB

Brad Fitzpatrick
13年10月26日土曜日
13年10月26日土曜日
Do you know “Movable Type”?
13年10月26日土曜日
movable type
13年10月26日土曜日
12th Anniversary
13年10月26日土曜日
MOVABLE TYPE IS...
•

2001, Released Movable Type 1.0

•

Perl based CMS/Blogging tool.

•

Primary development team is in Tokyo with help from American
and European teams
•

Movable Type is available in 6 languages

•

Supported a combination of both Static and Dynamic Publishing

•

Source code available on Github
•

Pull request Welcome!

https://github.com/movabletype/

13年10月26日土曜日
MOVABLE TYPE IS...
•

MTML (Movable Type Markup Language)

•

Available Plugin mechanism that will be able to add new features,
link with web services, and more

•

Support multiple databases
•
•

MS SQL Server, Oracle (Movable Type Advanced)

•

•

MySQL

PostgreSQL, SQLite (technical support not available)

Windows Ready
•

Windows Azure Ready

13年10月26日土曜日
MOVABLE TYPE MARKUP LANGUAGE
•

Simple template markup language

•

Syntax is similar to HTML

•

Learning cost is low

•

High compatibility with old versions

13年10月26日土曜日
MOVABLE TYPE MARKUP LANGUAGE

<MTBlogs>
<MTEntries category=”foo” limit=”10”>
<MTEntryHeader>
<ul>
</MTEntryHeader>
<li><a href=”<MTEntryPermalink>”>
<MTEntryTitle>
</a></li>
<MTEntryFooter>
<ul>
</MTEntryFooter>
</MTEntries>
</MTBlogs>
13年10月26日土曜日
MOVABLE TYPE MARKUP LANGUAGE

<MTBlogs>
<MTEntries category=”foo” limit=”10”>
<MTEntryHeader>
<ul>
</MTEntryHeader>
<li><a href=”<MTEntryPermalink>”>
<MTEntryTitle>
</a></li>
<MTEntryFooter>
<ul>
</MTEntryFooter>
</MTEntries>
</MTBlogs>
13年10月26日土曜日
WORDPRESS TEMPLATE

<ul>
<?php
$cat_id = get_cat_ID('foo');
$postslist = get_posts(
"category=$cat_id&numberposts=10");
foreach ( $postslist as $post ) {
?>
<li><a href=<?php echo get_permalink( $post->ID ); ?
>><?php echo $post->post_title; ?></a></li>
<?php
}
?>
</ul>
13年10月26日土曜日
WORDPRESS TEMPLATE

<ul>
<?php
$cat_id = get_cat_ID('foo');
$postslist = get_posts(
"category=$cat_id&numberposts=10");
foreach ( $postslist as $post ) {
?>
<li><a href=<?php echo get_permalink( $post->ID ); ?
>><?php echo $post->post_title; ?></a></li>
<?php
}
?>
</ul>
13年10月26日土曜日
WHICH ONE IS SIMPLE
FOR NON DEVELOPER?

18
13年10月26日土曜日
MOVABLE TYPE IS...
•

Data::ObjectDriver

•

Memcached

•

PSGI/Plack

•

OpenID

•

TheSchwartz

•

Perl 5.8.1+

•

CGI.pm

13年10月26日土曜日
MT::OBJECT
use MT;
use MT::Entry;

use MT;
use MT::Entry;

my $mt = MT->new;
my $e = MT::Entry->new;

my $mt = MT->new;
my @entries = MT::Entry->load({
title => { like => ‘%foo%’ },
}, {
sort_by => ‘title’,
});
foreach my $e ( @entries ) {
print $e->text;
}

$e->title(‘foo’);
$e->text(‘bar’);
$e->blog_id(1);
$e->save or die;

13年10月26日土曜日
Oct 16th, 2013 Movable Type 6 Debut
13年10月26日土曜日
WHAT’S NEW IN MOVABLE TYPE 6
•

New APIs
•
•

•

Movable Type Data API
Movable Type Chart API

Website management improvements
•

Entries can be created and posted directly on a website

•

New feature for scheduled unpublish entry

•

Google Analytics API integration
•

•

Page view stats accessible on the Dashboard

Loupe, a mobile web app
•

Monitors site stats and offers basic administrative abilities

13年10月26日土曜日
MOVABLE TYPE DATA API
•

REST/JSON API

•

MT Authentication

•

JavaScript Library

•

Pluggable

•

CGI based API

13年10月26日土曜日
MOVABLE TYPE DATA API - REST API

Entry
Comment
Trackback
User
Site(Blog, Website)
Category
Site Statistics
Asset

Create
P
P

Read
P
P
P
P
P
P
P

Update
P
P
P
P

Delete
P
P
P

P

ex) http(s)://<your-server>/<your-mt>/mt-data-api.cgi/v1/sites/2/entries
13年10月26日土曜日
https://github.com/movabletype/Documentation/wiki/Quick-reference
13年10月26日土曜日
curl -i http://localhost/cgi-bin/mt/mt-data-api.cgi/v1/sites/1
HTTP/1.1 200 OK
Date: Fri, 02 Aug 2013 13:12:10 GMT
Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15
X-content-type: nosniff
Cache-control: no-cache
Transfer-Encoding: chunked
Content-Type: application/json; charset=UTF-8
{"name":"First Website","archiveUrl":"http://localhost/blogs/
20130731-1/","url":"http://localhost/blogs/
20130731-1/","id":"1","class":"website","description":null}

13年10月26日土曜日
curl -i http://localhost/cgi-bin/mt/mt-data-api.cgi/v1/users/me
HTTP/1.1 401 Authorization Required
Date: Fri, 02 Aug 2013 13:14:54 GMT
Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15
X-content-type: nosniff
Cache-control: no-cache
Transfer-Encoding: chunked
Content-Type: application/json; charset=UTF-8
{"error":{"code":401,"message":"Unauthorized"}}

13年10月26日土曜日
curl -i -d clientId=test -d username=takayama -d password=password
http://localhost/cgi-bin/mt/mt-data-api.cgi/v1/authentication
HTTP/1.1 200 OK
Date: Fri, 02 Aug 2013 13:20:08 GMT
Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15
X-content-type: nosniff
Cache-control: no-cache
Transfer-Encoding: chunked
Content-Type: application/json; charset=UTF-8
{"accessToken":"MAQgv0HhhN82CQm88aP6r0QjtYpvRtMm8cS0av7
E","sessionId":"Z9STct7OztObi6Bd4aDMH8qcZBbPh6mlxpkh5yQo","e
xpiresIn":3600,"remember":false}
13年10月26日土曜日
curl -H "X-MT-Authorization: MTAuth
accessToken=MAQgv0HhhN82CQm88aP6r0QjtYpvRtMm8cS0av7E"
-i http://localhost/cgi-bin/mt/mt-data-api.cgi/v1/users/me
HTTP/1.1 200 OK
Date: Fri, 02 Aug 2013 13:31:13 GMT
Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15
X-content-type: nosniff
Cache-control: no-cache
Transfer-Encoding: chunked
Content-Type: application/json; charset=UTF-8
{"email":"ytakayama@sixapart.com","userpicUrl":null,"language":"ja","url":null,"
name":"takayama","updatable":true,"id":"1","displayName":"Yuji Takayama"}
13年10月26日土曜日
curl -i http://localhost/cgi-bin/mt/mt-data-api.cgi/v1/users/1
HTTP/1.1 200 OK
Date: Fri, 02 Aug 2013 13:34:34 GMT
Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15
X-content-type: nosniff
Cache-control: no-cache
Transfer-Encoding: chunked
Content-Type: application/json; charset=UTF-8
{"email":"ytakayama@sixapart.com","userpicUrl":null,"language":"ja","url":
null,"updatable":false,"displayName":"Yuji Takayama"}

13年10月26日土曜日
MOVABLE TYPE DATA API - JAVASCRIPT LIBRARY
•

JavaScript library for Data API is available

•

MIT license

13年10月26日土曜日
var	
  api	
  =	
  new	
  MT.DataAPI({
	
  	
  baseUrl:	
  	
  "https://your-­‐host/mt/mt-­‐data-­‐api.cgi",
	
  	
  clientId:	
  "your-­‐client-­‐id"
});
api.listEntries(siteId,	
  function(response)	
  {
	
  	
  if	
  (response.error)	
  {
	
  	
  	
  	
  //	
  Handle	
  error
	
  	
  	
  	
  return;
	
  	
  }
	
  	
  for	
  (var	
  i	
  =	
  0;	
  i	
  <	
  response.items.length;	
  i++)	
  {
	
  	
  	
  	
  	
  	
  var	
  entry	
  =	
  response.items[i];
	
  	
  	
  	
  	
  	
  //	
  Render	
  an	
  entry
	
  	
  }
});

13年10月26日土曜日
var	
  api	
  =	
  new	
  MT.DataAPI({
	
  	
  baseUrl:	
  	
  "https://your-­‐host/mt/mt-­‐data-­‐api.cgi",
	
  	
  clientId:	
  "your-­‐client-­‐id"
});
api.getToken(function(response)	
  {
	
  	
  if	
  (response.error)	
  {
	
  	
  	
  	
  if	
  (response.error.code	
  ===	
  401)	
  {
	
  	
  	
  	
  	
  	
  //	
  You	
  have	
  not	
  been	
  authenticated	
  yet.
	
  	
  	
  	
  	
  	
  location.href	
  =	
  api.getAuthorizationUrl(location.href);
	
  	
  	
  	
  }	
  else	
  {	
  /*	
  Handle	
  error	
  */	
  }
	
  	
  }	
  else	
  {
	
  	
  	
  	
  //	
  You	
  have	
  been	
  authenticated.
	
  	
  	
  	
  api.listEntries(siteId,	
  {status:	
  'Draft'},	
  function(response)	
  {
	
  	
  	
  	
  	
  	
  if	
  (response.error)	
  {	
  /*	
  Handle	
  error	
  */	
  return;	
  }	
  	
  
	
  	
  	
  	
  	
  	
  //	
  Fetched	
  a	
  list	
  of	
  drafts.
	
  	
  	
  	
  	
  	
  for	
  (var	
  i	
  =	
  0;	
  i	
  <	
  response.items.length;	
  i++)	
  {
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  var	
  entry	
  =	
  response.items[i];
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  //	
  Render	
  an	
  entry
	
  	
  	
  	
  	
  	
  }
	
  	
  	
  	
  });
	
  	
  }
});
13年10月26日土曜日
var	
  api	
  =	
  new	
  MT.DataAPI({
	
  	
  baseUrl:	
  	
  "https://your-­‐host/mt/mt-­‐data-­‐api.cgi",
	
  	
  clientId:	
  "your-­‐client-­‐id"
});
var	
  params	
  =	
  {
	
  	
  search:	
  "foo",
	
  	
  searchFields:	
  "title,body",
	
  	
  fields:	
  "assets,author,title,permalink,body,categories"
};
api.listEntries(siteId,	
  params,	
  function(response)	
  {
	
  	
  if	
  (response.error)	
  {
	
  	
  	
  	
  //	
  Handle	
  error
	
  	
  	
  	
  return;
	
  	
  }
	
  	
  for	
  (var	
  i	
  =	
  0;	
  i	
  <	
  response.items.length;	
  i++)	
  {
	
  	
  	
  	
  	
  	
  var	
  entry	
  =	
  response.items[i];
	
  	
  	
  	
  	
  	
  //	
  Render	
  an	
  entry
	
  	
  }
});
13年10月26日土曜日
https://github.com/movabletype/mt-data-api-sdk-js
13年10月26日土曜日
MOVABLE TYPE DATA API - PLUGGABLE
•

REST API endpoints can be added via plugin

•

Output formats can be added via plugin (Default is JSON format)

•

Create your own custom object with endpoints via plugin

13年10月26日土曜日
YAML
applications:
data_api:
endpoints:
- id: list_foobar
route: /sites/:site_id/foobars
verb: GET
version: 1
handler: $Core::MT::API::Endpoint::FooBar::list
requires_login: 0
default_params:
limit: 10
offset: 0
sort_by: authored_on
sort_order: descend
search_fields: title,text,text_more,keywords
error_codes:
403:blah blah blah

13年10月26日土曜日
LOUPE - MOBILE WEB APPLICATION
•

A reference app created with JavaScript + Movable Type Data API
+ Chart API

•

Available for iPhone and Android

•

MIT License

https://github.com/movabletype/mt-plugin-Loupe
13年10月26日土曜日
LOUPE - FEATURES
•

Monitor your Movable Type site stats
•
•

•

Today's page views
Page views from over the past 10 days

Comment management
•

Leave responses

•

Delete spam comments

•

Upload image files

•

Manage entries

13年10月26日土曜日
ANY QUESTIONS?

13年10月26日土曜日
THANK YOU FOR LISTING
13年10月26日土曜日

Weitere ähnliche Inhalte

Ähnlich wie Movable Type 6 Overview - New York Perl Mongers Tech Talk

Movable Type 6 Overview SPEC2
Movable Type 6 Overview SPEC2Movable Type 6 Overview SPEC2
Movable Type 6 Overview SPEC2Yuji Takayama
 
Mtddc2013: Movable Type 6 Overview
Mtddc2013: Movable Type 6 OverviewMtddc2013: Movable Type 6 Overview
Mtddc2013: Movable Type 6 OverviewYuji Takayama
 
意図を表現するプログラミング
意図を表現するプログラミング意図を表現するプログラミング
意図を表現するプログラミングAtsuhiro Kubo
 
Nodejsによるapiサーバ構築事例
Nodejsによるapiサーバ構築事例Nodejsによるapiサーバ構築事例
Nodejsによるapiサーバ構築事例Hidetoshi Mori
 
初めての Data API CMS どうでしょう - 仙台編 -
初めての Data API   CMS どうでしょう - 仙台編 -初めての Data API   CMS どうでしょう - 仙台編 -
初めての Data API CMS どうでしょう - 仙台編 -Yuji Takayama
 
Sqale の Puppet と Chef (と テスト)
Sqale の Puppet と Chef (と テスト)Sqale の Puppet と Chef (と テスト)
Sqale の Puppet と Chef (と テスト)hiboma
 
Data apiで実現 進化するwebの世界
Data apiで実現 進化するwebの世界Data apiで実現 進化するwebの世界
Data apiで実現 進化するwebの世界Yuji Takayama
 
初めての Data api
初めての Data api初めての Data api
初めての Data apiYuji Takayama
 
Complex Event Processing on Ruby, Fluentd and Norikra #rubykaigi
Complex Event Processing on Ruby, Fluentd and Norikra #rubykaigiComplex Event Processing on Ruby, Fluentd and Norikra #rubykaigi
Complex Event Processing on Ruby, Fluentd and Norikra #rubykaigiSATOSHI TAGOMORI
 
早稲田大学授業 - モバイルプログラミング
早稲田大学授業 - モバイルプログラミング早稲田大学授業 - モバイルプログラミング
早稲田大学授業 - モバイルプログラミングIppei Arita
 
Mtddc kyusyu-lightningtalks
Mtddc kyusyu-lightningtalksMtddc kyusyu-lightningtalks
Mtddc kyusyu-lightningtalksYuji Takayama
 
Google Dev Fest 2010 Japan LT: OpenSocial JavaScript API is good, Lightweight...
Google Dev Fest 2010 Japan LT: OpenSocial JavaScript API is good, Lightweight...Google Dev Fest 2010 Japan LT: OpenSocial JavaScript API is good, Lightweight...
Google Dev Fest 2010 Japan LT: OpenSocial JavaScript API is good, Lightweight...Nobuhiro Nakajima
 
SparqlEPCUが提供するlod開発プラットフォーム
SparqlEPCUが提供するlod開発プラットフォームSparqlEPCUが提供するlod開発プラットフォーム
SparqlEPCUが提供するlod開発プラットフォームChubu University
 
Reladomo in Scala #scala_ks
Reladomo in Scala #scala_ks Reladomo in Scala #scala_ks
Reladomo in Scala #scala_ks Hiroshi Ito
 
かんたん Twitter アプリをつくろう
かんたん Twitter アプリをつくろう かんたん Twitter アプリをつくろう
かんたん Twitter アプリをつくろう Shuhei Iitsuka
 
Develop Web Application with Node.js + Express
Develop Web Application with Node.js + ExpressDevelop Web Application with Node.js + Express
Develop Web Application with Node.js + ExpressAkinari Tsugo
 
Google Apps Scirpt勉強会 #1
Google Apps Scirpt勉強会 #1Google Apps Scirpt勉強会 #1
Google Apps Scirpt勉強会 #1ikikko
 
長いの
長いの長いの
長いのemasaka
 
20101106 ramaze発表
20101106 ramaze発表20101106 ramaze発表
20101106 ramaze発表Fukui Osamu
 

Ähnlich wie Movable Type 6 Overview - New York Perl Mongers Tech Talk (20)

Movable Type 6 Overview SPEC2
Movable Type 6 Overview SPEC2Movable Type 6 Overview SPEC2
Movable Type 6 Overview SPEC2
 
Mtddc2013: Movable Type 6 Overview
Mtddc2013: Movable Type 6 OverviewMtddc2013: Movable Type 6 Overview
Mtddc2013: Movable Type 6 Overview
 
意図を表現するプログラミング
意図を表現するプログラミング意図を表現するプログラミング
意図を表現するプログラミング
 
Nodejsによるapiサーバ構築事例
Nodejsによるapiサーバ構築事例Nodejsによるapiサーバ構築事例
Nodejsによるapiサーバ構築事例
 
初めての Data API CMS どうでしょう - 仙台編 -
初めての Data API   CMS どうでしょう - 仙台編 -初めての Data API   CMS どうでしょう - 仙台編 -
初めての Data API CMS どうでしょう - 仙台編 -
 
Sqale の Puppet と Chef (と テスト)
Sqale の Puppet と Chef (と テスト)Sqale の Puppet と Chef (と テスト)
Sqale の Puppet と Chef (と テスト)
 
Data apiで実現 進化するwebの世界
Data apiで実現 進化するwebの世界Data apiで実現 進化するwebの世界
Data apiで実現 進化するwebの世界
 
初めての Data api
初めての Data api初めての Data api
初めての Data api
 
Complex Event Processing on Ruby, Fluentd and Norikra #rubykaigi
Complex Event Processing on Ruby, Fluentd and Norikra #rubykaigiComplex Event Processing on Ruby, Fluentd and Norikra #rubykaigi
Complex Event Processing on Ruby, Fluentd and Norikra #rubykaigi
 
早稲田大学授業 - モバイルプログラミング
早稲田大学授業 - モバイルプログラミング早稲田大学授業 - モバイルプログラミング
早稲田大学授業 - モバイルプログラミング
 
Mtddc kyusyu-lightningtalks
Mtddc kyusyu-lightningtalksMtddc kyusyu-lightningtalks
Mtddc kyusyu-lightningtalks
 
Google Dev Fest 2010 Japan LT: OpenSocial JavaScript API is good, Lightweight...
Google Dev Fest 2010 Japan LT: OpenSocial JavaScript API is good, Lightweight...Google Dev Fest 2010 Japan LT: OpenSocial JavaScript API is good, Lightweight...
Google Dev Fest 2010 Japan LT: OpenSocial JavaScript API is good, Lightweight...
 
SparqlEPCUが提供するlod開発プラットフォーム
SparqlEPCUが提供するlod開発プラットフォームSparqlEPCUが提供するlod開発プラットフォーム
SparqlEPCUが提供するlod開発プラットフォーム
 
Reladomo in Scala #scala_ks
Reladomo in Scala #scala_ks Reladomo in Scala #scala_ks
Reladomo in Scala #scala_ks
 
かんたん Twitter アプリをつくろう
かんたん Twitter アプリをつくろう かんたん Twitter アプリをつくろう
かんたん Twitter アプリをつくろう
 
Develop Web Application with Node.js + Express
Develop Web Application with Node.js + ExpressDevelop Web Application with Node.js + Express
Develop Web Application with Node.js + Express
 
Google Apps Scirpt勉強会 #1
Google Apps Scirpt勉強会 #1Google Apps Scirpt勉強会 #1
Google Apps Scirpt勉強会 #1
 
OpenStack on Softlayer
OpenStack on SoftlayerOpenStack on Softlayer
OpenStack on Softlayer
 
長いの
長いの長いの
長いの
 
20101106 ramaze発表
20101106 ramaze発表20101106 ramaze発表
20101106 ramaze発表
 

Mehr von Yuji Takayama

Movable Type 7 のすべて
Movable Type 7 のすべてMovable Type 7 のすべて
Movable Type 7 のすべてYuji Takayama
 
詳説 Movable type 7
詳説 Movable type 7詳説 Movable type 7
詳説 Movable type 7Yuji Takayama
 
Data API ことはじめ
Data API ことはじめData API ことはじめ
Data API ことはじめYuji Takayama
 
詳説 Data api mtddc 拡張版 v3対応
詳説 Data api mtddc 拡張版   v3対応詳説 Data api mtddc 拡張版   v3対応
詳説 Data api mtddc 拡張版 v3対応Yuji Takayama
 
Movable Type for AWS Hands-on
Movable Type for AWS Hands-onMovable Type for AWS Hands-on
Movable Type for AWS Hands-onYuji Takayama
 
Movable Type for AWS - JAWS-UG 沖縄 CMS祭り!
Movable Type for AWS - JAWS-UG 沖縄 CMS祭り!Movable Type for AWS - JAWS-UG 沖縄 CMS祭り!
Movable Type for AWS - JAWS-UG 沖縄 CMS祭り!Yuji Takayama
 
MT東京03 - Movable Type for AWS
MT東京03 - Movable Type for AWSMT東京03 - Movable Type for AWS
MT東京03 - Movable Type for AWSYuji Takayama
 
Mtとクラウドと私
Mtとクラウドと私Mtとクラウドと私
Mtとクラウドと私Yuji Takayama
 
Phpで作るmovable typeプラグイン
Phpで作るmovable typeプラグインPhpで作るmovable typeプラグイン
Phpで作るmovable typeプラグインYuji Takayama
 
ダイナミック:Plugin
ダイナミック:Pluginダイナミック:Plugin
ダイナミック:PluginYuji Takayama
 

Mehr von Yuji Takayama (13)

Movable Type 7 のすべて
Movable Type 7 のすべてMovable Type 7 のすべて
Movable Type 7 のすべて
 
詳説 Movable type 7
詳説 Movable type 7詳説 Movable type 7
詳説 Movable type 7
 
Data API ことはじめ
Data API ことはじめData API ことはじめ
Data API ことはじめ
 
概説 Data API v3
概説 Data API v3概説 Data API v3
概説 Data API v3
 
詳説 Data api mtddc 拡張版 v3対応
詳説 Data api mtddc 拡張版   v3対応詳説 Data api mtddc 拡張版   v3対応
詳説 Data api mtddc 拡張版 v3対応
 
Movable Type for AWS Hands-on
Movable Type for AWS Hands-onMovable Type for AWS Hands-on
Movable Type for AWS Hands-on
 
Data API 2.0
Data API 2.0Data API 2.0
Data API 2.0
 
Movable Type for AWS - JAWS-UG 沖縄 CMS祭り!
Movable Type for AWS - JAWS-UG 沖縄 CMS祭り!Movable Type for AWS - JAWS-UG 沖縄 CMS祭り!
Movable Type for AWS - JAWS-UG 沖縄 CMS祭り!
 
MT東京03 - Movable Type for AWS
MT東京03 - Movable Type for AWSMT東京03 - Movable Type for AWS
MT東京03 - Movable Type for AWS
 
Mtとクラウドと私
Mtとクラウドと私Mtとクラウドと私
Mtとクラウドと私
 
Phpで作るmovable typeプラグイン
Phpで作るmovable typeプラグインPhpで作るmovable typeプラグイン
Phpで作るmovable typeプラグイン
 
ダイナミック:Plugin
ダイナミック:Pluginダイナミック:Plugin
ダイナミック:Plugin
 
20070824 MT-DEVCON
20070824 MT-DEVCON20070824 MT-DEVCON
20070824 MT-DEVCON
 

Movable Type 6 Overview - New York Perl Mongers Tech Talk

  • 1. Movable Type 6 Overview New York Perl Mongers Tech Talk / Oct 18th, 2013 Yuji Takayama 13年10月26日土曜日
  • 2. AGENDA • About Me • Six Apart is ... • Movable Type is ... • Movable Type 6 • • New features • • Data API Loupe Panel Discussion • Fumiaki Yoshimatsu • Akira Sawada • Yuji Takayama 13年10月26日土曜日
  • 3. ABOUT ME Yuji Takayama 1973, Born in Yamagata, Japan 2006, Started working at Six Apart ytakayama@sixapart.com @yuji yuji Developer for Movable Type 3.2, 3.3, 4.x, 5.x and 6.0 Acted as the Engineer Lead for the development team starting from 5.1. As a Program Manager, focuses mostly on development of product specifications. Cat Lover My social media links are listed on the left. Feel free to follow me! swordbreaker 13年10月26日土曜日 This is my second year in a row visiting New York City.
  • 4. Do you know “Six Apart”? Title 13年10月26日土曜日
  • 5. SIX APART IS... • 2001, Founded in San Francisco • 2003, Open Japanese branch • 2010, Six Apart(US) merged with Video Egg, -> Say MEDIA • 2011, Six Apart(JP) acquired by infocom, a Japanese information technology company • 2013, Six Apart(US) Re-brunch • Famous Perl monger from Six Apart 13年10月26日土曜日
  • 6. SIX APART ALUMNI CLUB Tatsuhiko Miyagawa 13年10月26日土曜日
  • 7. SIX APART ALUMNI CLUB David Recordon 13年10月26日土曜日
  • 8. SIX APART ALUMNI CLUB Brad Fitzpatrick 13年10月26日土曜日
  • 10. Do you know “Movable Type”? 13年10月26日土曜日
  • 13. MOVABLE TYPE IS... • 2001, Released Movable Type 1.0 • Perl based CMS/Blogging tool. • Primary development team is in Tokyo with help from American and European teams • Movable Type is available in 6 languages • Supported a combination of both Static and Dynamic Publishing • Source code available on Github • Pull request Welcome! https://github.com/movabletype/ 13年10月26日土曜日
  • 14. MOVABLE TYPE IS... • MTML (Movable Type Markup Language) • Available Plugin mechanism that will be able to add new features, link with web services, and more • Support multiple databases • • MS SQL Server, Oracle (Movable Type Advanced) • • MySQL PostgreSQL, SQLite (technical support not available) Windows Ready • Windows Azure Ready 13年10月26日土曜日
  • 15. MOVABLE TYPE MARKUP LANGUAGE • Simple template markup language • Syntax is similar to HTML • Learning cost is low • High compatibility with old versions 13年10月26日土曜日
  • 16. MOVABLE TYPE MARKUP LANGUAGE <MTBlogs> <MTEntries category=”foo” limit=”10”> <MTEntryHeader> <ul> </MTEntryHeader> <li><a href=”<MTEntryPermalink>”> <MTEntryTitle> </a></li> <MTEntryFooter> <ul> </MTEntryFooter> </MTEntries> </MTBlogs> 13年10月26日土曜日
  • 17. MOVABLE TYPE MARKUP LANGUAGE <MTBlogs> <MTEntries category=”foo” limit=”10”> <MTEntryHeader> <ul> </MTEntryHeader> <li><a href=”<MTEntryPermalink>”> <MTEntryTitle> </a></li> <MTEntryFooter> <ul> </MTEntryFooter> </MTEntries> </MTBlogs> 13年10月26日土曜日
  • 18. WORDPRESS TEMPLATE <ul> <?php $cat_id = get_cat_ID('foo'); $postslist = get_posts( "category=$cat_id&numberposts=10"); foreach ( $postslist as $post ) { ?> <li><a href=<?php echo get_permalink( $post->ID ); ? >><?php echo $post->post_title; ?></a></li> <?php } ?> </ul> 13年10月26日土曜日
  • 19. WORDPRESS TEMPLATE <ul> <?php $cat_id = get_cat_ID('foo'); $postslist = get_posts( "category=$cat_id&numberposts=10"); foreach ( $postslist as $post ) { ?> <li><a href=<?php echo get_permalink( $post->ID ); ? >><?php echo $post->post_title; ?></a></li> <?php } ?> </ul> 13年10月26日土曜日
  • 20. WHICH ONE IS SIMPLE FOR NON DEVELOPER? 18 13年10月26日土曜日
  • 22. MT::OBJECT use MT; use MT::Entry; use MT; use MT::Entry; my $mt = MT->new; my $e = MT::Entry->new; my $mt = MT->new; my @entries = MT::Entry->load({ title => { like => ‘%foo%’ }, }, { sort_by => ‘title’, }); foreach my $e ( @entries ) { print $e->text; } $e->title(‘foo’); $e->text(‘bar’); $e->blog_id(1); $e->save or die; 13年10月26日土曜日
  • 23. Oct 16th, 2013 Movable Type 6 Debut 13年10月26日土曜日
  • 24. WHAT’S NEW IN MOVABLE TYPE 6 • New APIs • • • Movable Type Data API Movable Type Chart API Website management improvements • Entries can be created and posted directly on a website • New feature for scheduled unpublish entry • Google Analytics API integration • • Page view stats accessible on the Dashboard Loupe, a mobile web app • Monitors site stats and offers basic administrative abilities 13年10月26日土曜日
  • 25. MOVABLE TYPE DATA API • REST/JSON API • MT Authentication • JavaScript Library • Pluggable • CGI based API 13年10月26日土曜日
  • 26. MOVABLE TYPE DATA API - REST API Entry Comment Trackback User Site(Blog, Website) Category Site Statistics Asset Create P P Read P P P P P P P Update P P P P Delete P P P P ex) http(s)://<your-server>/<your-mt>/mt-data-api.cgi/v1/sites/2/entries 13年10月26日土曜日
  • 28. curl -i http://localhost/cgi-bin/mt/mt-data-api.cgi/v1/sites/1 HTTP/1.1 200 OK Date: Fri, 02 Aug 2013 13:12:10 GMT Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 X-content-type: nosniff Cache-control: no-cache Transfer-Encoding: chunked Content-Type: application/json; charset=UTF-8 {"name":"First Website","archiveUrl":"http://localhost/blogs/ 20130731-1/","url":"http://localhost/blogs/ 20130731-1/","id":"1","class":"website","description":null} 13年10月26日土曜日
  • 29. curl -i http://localhost/cgi-bin/mt/mt-data-api.cgi/v1/users/me HTTP/1.1 401 Authorization Required Date: Fri, 02 Aug 2013 13:14:54 GMT Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 X-content-type: nosniff Cache-control: no-cache Transfer-Encoding: chunked Content-Type: application/json; charset=UTF-8 {"error":{"code":401,"message":"Unauthorized"}} 13年10月26日土曜日
  • 30. curl -i -d clientId=test -d username=takayama -d password=password http://localhost/cgi-bin/mt/mt-data-api.cgi/v1/authentication HTTP/1.1 200 OK Date: Fri, 02 Aug 2013 13:20:08 GMT Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 X-content-type: nosniff Cache-control: no-cache Transfer-Encoding: chunked Content-Type: application/json; charset=UTF-8 {"accessToken":"MAQgv0HhhN82CQm88aP6r0QjtYpvRtMm8cS0av7 E","sessionId":"Z9STct7OztObi6Bd4aDMH8qcZBbPh6mlxpkh5yQo","e xpiresIn":3600,"remember":false} 13年10月26日土曜日
  • 31. curl -H "X-MT-Authorization: MTAuth accessToken=MAQgv0HhhN82CQm88aP6r0QjtYpvRtMm8cS0av7E" -i http://localhost/cgi-bin/mt/mt-data-api.cgi/v1/users/me HTTP/1.1 200 OK Date: Fri, 02 Aug 2013 13:31:13 GMT Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 X-content-type: nosniff Cache-control: no-cache Transfer-Encoding: chunked Content-Type: application/json; charset=UTF-8 {"email":"ytakayama@sixapart.com","userpicUrl":null,"language":"ja","url":null," name":"takayama","updatable":true,"id":"1","displayName":"Yuji Takayama"} 13年10月26日土曜日
  • 32. curl -i http://localhost/cgi-bin/mt/mt-data-api.cgi/v1/users/1 HTTP/1.1 200 OK Date: Fri, 02 Aug 2013 13:34:34 GMT Server: Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 X-content-type: nosniff Cache-control: no-cache Transfer-Encoding: chunked Content-Type: application/json; charset=UTF-8 {"email":"ytakayama@sixapart.com","userpicUrl":null,"language":"ja","url": null,"updatable":false,"displayName":"Yuji Takayama"} 13年10月26日土曜日
  • 33. MOVABLE TYPE DATA API - JAVASCRIPT LIBRARY • JavaScript library for Data API is available • MIT license 13年10月26日土曜日
  • 34. var  api  =  new  MT.DataAPI({    baseUrl:    "https://your-­‐host/mt/mt-­‐data-­‐api.cgi",    clientId:  "your-­‐client-­‐id" }); api.listEntries(siteId,  function(response)  {    if  (response.error)  {        //  Handle  error        return;    }    for  (var  i  =  0;  i  <  response.items.length;  i++)  {            var  entry  =  response.items[i];            //  Render  an  entry    } }); 13年10月26日土曜日
  • 35. var  api  =  new  MT.DataAPI({    baseUrl:    "https://your-­‐host/mt/mt-­‐data-­‐api.cgi",    clientId:  "your-­‐client-­‐id" }); api.getToken(function(response)  {    if  (response.error)  {        if  (response.error.code  ===  401)  {            //  You  have  not  been  authenticated  yet.            location.href  =  api.getAuthorizationUrl(location.href);        }  else  {  /*  Handle  error  */  }    }  else  {        //  You  have  been  authenticated.        api.listEntries(siteId,  {status:  'Draft'},  function(response)  {            if  (response.error)  {  /*  Handle  error  */  return;  }                //  Fetched  a  list  of  drafts.            for  (var  i  =  0;  i  <  response.items.length;  i++)  {                    var  entry  =  response.items[i];                    //  Render  an  entry            }        });    } }); 13年10月26日土曜日
  • 36. var  api  =  new  MT.DataAPI({    baseUrl:    "https://your-­‐host/mt/mt-­‐data-­‐api.cgi",    clientId:  "your-­‐client-­‐id" }); var  params  =  {    search:  "foo",    searchFields:  "title,body",    fields:  "assets,author,title,permalink,body,categories" }; api.listEntries(siteId,  params,  function(response)  {    if  (response.error)  {        //  Handle  error        return;    }    for  (var  i  =  0;  i  <  response.items.length;  i++)  {            var  entry  =  response.items[i];            //  Render  an  entry    } }); 13年10月26日土曜日
  • 38. MOVABLE TYPE DATA API - PLUGGABLE • REST API endpoints can be added via plugin • Output formats can be added via plugin (Default is JSON format) • Create your own custom object with endpoints via plugin 13年10月26日土曜日
  • 39. YAML applications: data_api: endpoints: - id: list_foobar route: /sites/:site_id/foobars verb: GET version: 1 handler: $Core::MT::API::Endpoint::FooBar::list requires_login: 0 default_params: limit: 10 offset: 0 sort_by: authored_on sort_order: descend search_fields: title,text,text_more,keywords error_codes: 403:blah blah blah 13年10月26日土曜日
  • 40. LOUPE - MOBILE WEB APPLICATION • A reference app created with JavaScript + Movable Type Data API + Chart API • Available for iPhone and Android • MIT License https://github.com/movabletype/mt-plugin-Loupe 13年10月26日土曜日
  • 41. LOUPE - FEATURES • Monitor your Movable Type site stats • • • Today's page views Page views from over the past 10 days Comment management • Leave responses • Delete spam comments • Upload image files • Manage entries 13年10月26日土曜日
  • 43. THANK YOU FOR LISTING 13年10月26日土曜日