WP REST API とJavaScriptで作るスマートフォンアプリの話とか

WP REST API とJavaScriptで作るスマートフォンアプリの話とか

WordBench vol5 での発表資料です。

E03953e0c18d776fead147601fdc3899?s=128

Toro_Unit (Hiroshi Urabe)

October 08, 2016
Tweet

Transcript

  1. WP REST APIͱJavaScriptͰ࡞Δε ϚʔτϑΥϯΞϓϦͷ࿩ͱ͔ 2016.10.08 @WordBench௕໺ vol5 2016.10.08 @WordBench௕໺ vol5

    1
  2. whoami ͜͡͠ΐ͏͔͍ 2016.10.08 @WordBench௕໺ vol5 2

  3. Toro_Unit ઎෦ ߛ (͏Β΂ ͻΖ͠) দຊࢢࡏॅ 9೥໨ ϑϦʔϥϯε Frontend Engineer

    / Plugin Developer / Web Designer Github: @torounit Twitter: @Toro_Unit Facebook: fb.me/torounit Blog: https://torounit.com 2016.10.08 @WordBench௕໺ vol5 3
  4. WordPressͱͷؔΘΓ WordPress ͱ ࢲ 2016.10.08 @WordBench௕໺ vol5 4

  5. WordBench Nagano Moderator let's JOIN US! 2016.10.08 @WordBench௕໺ vol5 5

  6. WordPress Plugin Developer Custom Post Type Permalinks ΧελϜ౤ߘλΠϓͷύʔϚϦϯΫΛ؅ཧը໘͔Βมߋग़དྷΔ ϓϥάΠϯ •

    Active Installs: 60,000+ • Total Downloads: 290,000+ 2016.10.08 @WordBench௕໺ vol5 6
  7. Other Plugins • Simple Post Type Permalinks • Powerful Posts

    Per Page • etc... 2016.10.08 @WordBench௕໺ vol5 7
  8. WordPres Theme Developer • Vanilla (ݱࡏެࣜσΟϨΫτϦ΁ਃ੥த) • torounit.com/vanilla 2016.10.08 @WordBench௕໺

    vol5 8
  9. Contribute • 4.3 ~ 4.5 ίΞίϯτϦϏϡʔλʔ • ϓϥάΠϯɺؔ࿈ϓϩδΣΫτ΁ͷίϯτϦϏϡʔτ • WordCamp

    Kansai 2015 / Tokyo 2015 εϐʔΧʔ • WordCamp Kansai 2016 / Tokyo 2016 εϐʔΧʔɾ࣮ߦҕһ • ֤஍ͷ WordBench ͰͷొஃɺWordBash Kyoto 2016.10.08 @WordBench௕໺ vol5 9
  10. ͪ͘͜ 2016.10.08 @WordBench௕໺ vol5 10

  11. 2016.10.08 @WordBench௕໺ vol5 11

  12. WordWine 10/22ɾ23. উপͰϫΠϯΛҿΈͳ͕Βษڧձɻ 2016.10.08 @WordBench௕໺ vol5 12

  13. WordBash JUSO 11/2 @JUSO Coworking 2016.10.08 @WordBench௕໺ vol5 13

  14. ͸͍ɻ 2016.10.08 @WordBench௕໺ vol5 14

  15. What's REST API? 2016.10.08 @WordBench௕໺ vol5 15

  16. ඇৗʹͬ͘͟Γͱ͍͏ͱɺ URLͱHTTPϝιουʢϑΥʔϜͰΑ͘࢖͏GETͱ͔POSTͱ͔ʣ Λ࢖ͬͯσʔλΛऔಘͨ͠Γɺมߋͨ͠Γग़དྷΔ࢓૊Έɻ ࠷ۙ͸JSONͰσʔλ͕औಘग़དྷΔ͜ͱ͕ଟ͍ɻؼͬͯ͘Δσʔ λ͕ѻ͑Ε͹ɺͲΜͳݴޠͰ΋ѻ͑Δɻ 2016.10.08 @WordBench௕໺ vol5 16

  17. ͨͱ͑͹ɺ Twitter REST API 2016.10.08 @WordBench௕໺ vol5 17

  18. ࢖͍ಓ • Twitter ΫϥΠΞϯτ΍ɺεϚϗΞϓϦɻ • ͍ͭͬ΀ΔͳͲͷ֎෦ΫϥΠΞϯτ౳ɻ • ֎෦ͷΞϓϦέʔγϣϯͱͷ࿈ܞɻ • Tiwtter

    Ͱೝূ͢ΔαʔϏεɾΞϓϦͱ͔ɻ • هࣄ౤ߘ࣌ʹɺTwitterʹࣗಈతʹγΣΞͨ͠Γɻ • etc... 2016.10.08 @WordBench௕໺ vol5 18
  19. Other APIs • Instagram API • Cybozu REST API •

    Github API • LINE REST API • ... and more more more!!! 2016.10.08 @WordBench௕໺ vol5 19
  20. and... 2016.10.08 @WordBench௕໺ vol5 20

  21. WP REST API 2016.10.08 @WordBench௕໺ vol5 21

  22. WP REST API • WordPress Ͱ࢖͑Δ REST APIɻϓϥάΠϯೖΕΔ͚ͩʂ • 4.4͔ΒҰ෦ػೳ͸ຊମʹϚʔδࡁΈɻকདྷతʹ͸ຊମʹ౷߹

    ͞ΕΔ༧ఆɻ 2016.10.08 @WordBench௕໺ vol5 22
  23. Twitter ΍ ଞͷAPIͰ΋ग़དྷΔΜ͔ͩ Β౰વɾɾɾ 2016.10.08 @WordBench௕໺ vol5 23

  24. εϚϗΞϓϦ࡞ΕΔΑͶɻ 2016.10.08 @WordBench௕໺ vol5 24

  25. Ͱ΋ɹJava ͱ͔ Swift ͱ͔ Objective-C ͱ͔ɾɾɾɾɻ xcode ॏ͍͠ɾɾɾ 2016.10.08 @WordBench௕໺

    vol5 25
  26. ϋΠϒϦοτΞϓϦͳΒHTML/CSS/ JavaScriptͰͭ͘ΕΔʂ 2016.10.08 @WordBench௕໺ vol5 26

  27. ϋΠϒϦοτΞϓϦͱ͸ɻ • WebView Λ࢖ͬͯωΠςΟϒΞϓϦʹWEBٕज़Λ૊ΈࠐΜ ͩΞϓϦɻ • ඇৗʹࡶʹݴ͏ͱɺத਎ʹϒϥ΢βΛಥͬࠐΜͰHTML/ CSS/JSͰΞϓϦΛ࡞ΕΔΑ͏ʹͨ͠ײ͡ 2016.10.08 @WordBench௕໺

    vol5 27
  28. 2016.10.08 @WordBench௕໺ vol5 28

  29. ͜ΕΒͷϑϨʔϜϫʔΫΛ࢖͏͚ͩ͜ ͱͰ؆୯ʹ࡞ΕΔɻ 2016.10.08 @WordBench௕໺ vol5 29

  30. • PhoneGap Build ʹࢸͬͯ͸ɺHTML/CSS/JS Λѹॖͨ͠zip ϑΝΠϧΛϒϥ΢β͔ΒΞοϓϩʔυ͢Δ͚ͩɻʢCCϢʔβ ʔͳΒ༗ঈϓϥϯ͕࢖͑Δʣखܰʹ΍ΔͳΒ͜ΕͰे෼ɻ • CORDOVA౳࢖͏ͱɻiOS Simulator

    ্Ͱಈ࡞ͤͨ͞Γɺσ όοά͢Δ͜ͱ΋؆୯ʹͰ͖Δɻ • ։ൃ΋ී௨ʹWEBαΠτΛ࡞ΔΑ͏ͳײ͡Ͱϒϥ΢β্Ͱߦ ͑Δɻ 2016.10.08 @WordBench௕໺ vol5 30
  31. www ҎԼʹHTML/CSS/JS౳Λઃஔͯ͠ ΍Δ͚ͩͰ΄΅OK. 2016.10.08 @WordBench௕໺ vol5 31

  32. ͱ͍͏Θ͚Ͱͭͬͯ͘Έͨ΋ͷ͕ͪ͜Βɻ torounit/wp-app-torounit-com: onsenui-redux-wp-rest-api sample 2016.10.08 @WordBench௕໺ vol5 32

  33. DEMO 2016.10.08 @WordBench௕໺ vol5 33

  34. ࡞ͬͯΈͨײ૝ɻ • WordPress + HTML/CSS/JS ͚ͩͰεϚϗΞϓϦ͕࡞ΕΔɻ ʢ͜ͷఔ౓ͳΒ໿1೔͘Β͍ͰͰ͖ͨʣ • දࣔ͢Δ͚ͩͰ΋े෼ΞϓϦͱͯ͠ػೳ͢ΔɻʢϝσΟΞ ܥɺχϡʔεܥͷαΠτͷΞϓϦͱ͔ʣ

    2016.10.08 @WordBench௕໺ vol5 34
  35. ΄͔ʹ΍ͬͯΈͨ͜ͱɹ • WordPress ͷ౤ߘ/ฤूը໘Λ࡞Γସ͑Δ torounit/wp-markdown-blogging 2016.10.08 @WordBench௕໺ vol5 35

  36. DEMO 2016.10.08 @WordBench௕໺ vol5 36

  37. • ΍Ζ͏ͱࢥ͑͹ɺWordPress ͷ؅ཧը໘Λશ෦࡞Γସ͑ͨΓ ΋ग़དྷΔɻ 2016.10.08 @WordBench௕໺ vol5 37

  38. WordPress αΠτ಺ ͰɺΞϓϦͬΆ͍දݱ 2016.10.08 @WordBench௕໺ vol5 38

  39. DEMO 2016.10.08 @WordBench௕໺ vol5 39

  40. Other use cases. • ֎෦αʔϏεͱͷ༰қͳ࿈ܞ • ϑϩϯτΤϯυٕज़ͱ૊Έ߹ΘͤͨϦονͳදݱ • https://ustwo.com/ •

    http://gms.life/ • PHP ॻ͚ͳͯ͘΋ WordPress ͰͷαΠτߏங͕Ͱ͖ΔΑ͏ʹ ͳΔ͔΋͠Εͳ͍ɻ 2016.10.08 @WordBench௕໺ vol5 40
  41. ࠓ·Ͱͷ৘ใɺࢿ࢈͕ແବʹͳΔΘ͚Ͱ͸ͳ͍ɻ 2016.10.08 @WordBench௕໺ vol5 41

  42. Ͱ΋WEBαΠτͷ͋Γํɾ࡞Γํ͸มԽ͠ଓ͚͍ͯ͘͸ͣɻ 2016.10.08 @WordBench௕໺ vol5 42

  43. CMS ʹٻΊΒΕͯΔ͜ͱ΋ɾɾɾ ੍࡞ऀʹٻΊΒΕΔ͜ͱ΋ɾɾɾ 2016.10.08 @WordBench௕໺ vol5 43

  44. ΈΜͳͰཱͪ޲͔͍ͬͯ͜͏ɻ 2016.10.08 @WordBench௕໺ vol5 44

  45. Let's Join WordPress Community! Let's Join WordBench!! 2016.10.08 @WordBench௕໺ vol5

    45
  46. ͓ΘΓɻ Thanks! Github: @torounit Twitter: @Toro_Unit Facebook: fb.me/torounit WEB Site:

    https://torounit.com 2016.10.08 @WordBench௕໺ vol5 46