Download - PHPカンファレンス関西2011/スマートフォン時代のWebシステム
![Page 1: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/1.jpg)
スマートフォン時代のWebシステム
株式会社フィードテイラー熊倉洋介
2011-04-02
![Page 2: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/2.jpg)
自己紹介
熊倉洋介 / kumatch
![Page 3: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/3.jpg)
所在地 大阪市北区
事業iPhone・iPad・MacOSX アプリ開発これらに付随するWebシステム開発
iPhone・iPadアプリ 企画コンサルティング
従業員 5名
理念 まだ世にないモノを開発・提供して世界を変える
特徴Objective-C暦8年のエンジニアが在籍社内の開発環境は全て基本MacOSX
直近の実績
路線図アプリ「まるごと路線図」(ヴァル研究所様 iPhone/iPad無料App総合1位)
天気予報アプリ「そら案内 for iOS」(弊社&日本気象協会様 iPad無料App総合1位)
ニュースリーダーアプリ「livedoor News」(ライブドア様)
ポッドキャストアプリ「きくカネ?」(ソニー銀行様)
ポッドキャストアプリ「こちカブ」(ラジオ日経社様)
株式会社フィードテイラー
![Page 4: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/4.jpg)
公開終了アプリ実績数 : 60以上
![Page 5: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/5.jpg)
アジェンダ•そら案内
•天気予報アプリケーション
• SyncBoard
•サーバ連動型ドキュメント共有アプリケーション
![Page 6: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/6.jpg)
×
そら案内 for iOS
一般財団法人 日本気象協会
公開1ヶ月半で30万ダウンロード
![Page 7: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/7.jpg)
Sources
CreatesJSON files
![Page 8: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/8.jpg)
JSON
Request
JSON files
https://www.url.com/iphone
Page title
![Page 9: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/9.jpg)
•2150 sources/notice
•100ms-800ms / source
![Page 10: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/10.jpg)
•350,000 Requests/day
•Over 15,000 Requests/hour
•AM 7-8, PM 10-12
![Page 11: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/11.jpg)
![Page 12: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/12.jpg)
サーバ連携型のドキュメント共有アプリケーション
![Page 13: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/13.jpg)
クライアント側に同期され、オフラインで閲覧可能
ユーザ管理・グループ管理により適切な範囲に配布される
営業部 企画部
営業部 営業部 & 企画部 企画部
ドキュメント管理者upload
downloaddownload download
![Page 14: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/14.jpg)
オンラインストレージセキュリティ監視
![Page 15: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/15.jpg)
打ち合わせの資料の共有
upload
downloaddownload download
![Page 16: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/16.jpg)
•Linux (CentOS)
•Apache
•MySQL
•PHP
![Page 17: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/17.jpg)
•ユーザ認証
•ドキュメント同期
•ドキュメントツリー
•ファイルデータ
•クライアント通知
![Page 18: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/18.jpg)
•HTTP
•Resource
•Method
• Status Code
REST
![Page 19: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/19.jpg)
•産創館の場所
•今日のカンファレンスのプログラム
•この発表の生放送動画
REST - Resource
![Page 20: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/20.jpg)
• http://goo.gl/maps/3svI
• http://phpcon.php.gr.jp/kansai/program/
• http://www.ustream.tv/channel/phpcon-kansai
REST - Resource
![Page 21: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/21.jpg)
REST - Resource
http://api.twitter.com/1/statuses/home_timeline.xml
![Page 22: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/22.jpg)
•GET
• POST
• PUT
•DELETE
REST - Method
![Page 23: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/23.jpg)
• 200 OK
• 401Unauthorized
• 404 Not Found
• 500 Internal Server Error
REST - Status Code
![Page 24: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/24.jpg)
![Page 25: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/25.jpg)
PHPで使うURL Routing
ex. /users/{username}/bookmarks
GET POST
PHP class Bookmarks Bookmarks
PHP class method index() add()
args $username $username
![Page 26: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/26.jpg)
PHPで使うURL Routing
![Page 27: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/27.jpg)
PHPで使うURL Routing
ex. /users/{username}/bookmarks
GET POST
PHP class Bookmarks Bookmarks
PHP class method index() add()
args $username $username
![Page 28: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/28.jpg)
SyncBoardRESTによる応答
• JSONによるドキュメントの構造情報
•ドキュメントファイル
•エラーコードによるハンドリング
![Page 29: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/29.jpg)
スマートフォン:主役サーバ:裏方
![Page 30: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/30.jpg)
まとめ•そら案内
•解析済み静的ファイルによる通知
• SyncBoard
•REST アーキテクチャの採用
•スマートフォン向けのサーバは裏方として
![Page 31: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/31.jpg)
PHPでRESTを組んでわかったこと株式会社フィードテイラー
熊倉洋介
2011-04-02
![Page 32: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/32.jpg)
PHP Requests
• $_GET
• $_POST
• $_FILES
![Page 33: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/33.jpg)
REST Requests
PUT /api/events/42Content-Type: application/json
{"name":"PHPカンファレンス関西","date":"2011-04-02"}
![Page 34: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/34.jpg)
REST Requests
$body = file_get_contents('php://input');
![Page 35: PHPカンファレンス関西2011/スマートフォン時代のWebシステム](https://reader033.vdocuments.pub/reader033/viewer/2022060110/55615186d8b42a780d8b4f2a/html5/thumbnails/35.jpg)
認証
•BASIC Auth
•Cookie Session = NG
•Challenge Token (ex. oauth)