PHPカンファレンス関西2011/スマートフォン時代のWebシステム

3,896 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,896
On SlideShare
0
From Embeds
0
Number of Embeds
684
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

PHPカンファレンス関西2011/スマートフォン時代のWebシステム

  1. 1. Web 2011-04-02
  2. 2. / kumatch
  3. 3. iPhone iPad MacOSX WebiPhone iPad 5 Objective-C 8 MacOSX ( iPhone/iPad App 1 ) for iOS ( & iPad App 1 ) livedoor News ( ) ( ) ( )
  4. 4. : 60
  5. 5. • •• SyncBoard •
  6. 6. × for iOS1 30
  7. 7. Sources CreatesJSON files
  8. 8. Request Page titlehttps://www.url.com/iphone JSON JSON files
  9. 9. • 2150 sources/notice• 100ms-800ms / source
  10. 10. • 350,000 Requests/day• Over 15,000 Requests/hour • AM 7-8, PM 10-12
  11. 11. upload download download download &
  12. 12. upload download download download
  13. 13. • Linux (CentOS)• Apache• MySQL• PHP
  14. 14. •••••
  15. 15. REST• HTTP• Resource• Method• Status Code
  16. 16. REST - Resource • • •
  17. 17. REST - Resource • http://goo.gl/maps/3svI • http://phpcon.php.gr.jp/kansai/ program/ • http://www.ustream.tv/channel/ phpcon-kansai
  18. 18. REST - Resource
  19. 19. REST - Method• GET• POST• PUT• DELETE
  20. 20. REST - Status Code• 200 OK• 401Unauthorized• 404 Not Found• 500 Internal Server Error
  21. 21. PHP URL Routing ex. /users/{username}/bookmarks GET POST PHP class Bookmarks BookmarksPHP class method index() add() args $username $username
  22. 22. PHP URL Routing
  23. 23. PHP URL Routing ex. /users/{username}/bookmarks GET POST PHP class Bookmarks BookmarksPHP class method index() add() args $username $username
  24. 24. SyncBoard REST• JSON••
  25. 25. • •• SyncBoard • REST•
  26. 26. PHP REST 2011-04-02
  27. 27. PHP Requests• $_GET• $_POST• $_FILES
  28. 28. REST RequestsPUT /api/events/42Content-Type: application/json{"name":"PHP ","date":"2011-04-02"}
  29. 29. REST Requests$body = file_get_contents(php://input);
  30. 30. • BASIC Auth• Cookie Session• Challenge Token (ex. oauth)

×