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.
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日土曜日
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日土曜日
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日土曜日
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日土曜日
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日土曜日
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日土曜日