Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PHPer人生、一度はフレームワークを作っておこう!

uzulla
April 16, 2016

 PHPer人生、一度はフレームワークを作っておこう!

PHPカンファレンス北海道 2016 発表資料
20160416

uzulla

April 16, 2016
Tweet

More Decks by uzulla

Other Decks in Programming

Transcript

  1. PHPerਓੜɺ
    Ұ౓͸ϑϨʔϜϫʔΫΛ࡞͓ͬͯ͜͏ʂ
    » at: PHPΧϯϑΝϨϯε๺ւಓ
    » date: 20160415
    » speaker: uzulla

    View Slide

  2. ʢ஫ҙɺຊεϥΠυ͸ޱ಄Ͱ఻͑ͨࣄ͕͔ͳΓൈ͚͍ͯ
    ·͢ʣ

    View Slide

  3. "who are you ?"
    UZULLA
    PHPer
    ʮ౦ژํ໘͔Β͖·ͨ͠ʯ

    View Slide

  4. PHPerਓੜɺ
    Ұ౓͸ϑϨʔϜϫʔΫΛ
    ࡞͓ͬͯ͜͏ʂ

    View Slide

  5. 201X೥ʂ
    ੈք͸ن໿ͷԌʹแ·Εͨʂʂ

    View Slide

  6. » ʮҪށ͸ރΕɺാ͸ߥΕɺ͋ΒΏΔ$_GET͸ઈ໓ͨ͠
    ͔ʹݟ͑ͨɻ ͕ͩɺΦϨΦϨϑϨʔϜϫʔΫ͸ࢮ໓
    ͍ͯ͠ͳ͔ͬͨ…ʯ

    View Slide

  7. » ʮ͕͞ΕʂಓΛ͚͋Ζʙʂʯ
    » ʮʢ༗໊FWʣ༷ͷ͓௨Γͩʙʂʯ
    » ʰ΅͘ϑϨʔϜϫʔΫ࡞Γ·ͨ͠ʈʈʱ
    » ʮԚ෺͸ফಟͩʙʙʂʂʯ
    » ʰΪϟʔʂʂʂʱ
    » ʮΘ͸͸͸౔Լ࠲͠Ζʂʂফಟ͞Ε͔ͯ͑ʔʔʂʂʯ

    View Slide

  8. ʢօ͞Μ͍͖ͭͯ
    ͍͚ͯͨͩͯ·
    ͢ʁʣ

    View Slide

  9. » ཱ೿ͳFW͕૿͑ͨݱࡏɺϚοτ΢ͳFWΛ࢖Θͳ͍
    ͜ͱ͸(ৗࣝతPHPerͱͯ͠ͷ)ࢮΛҙຯ͢Δͷͩɺί
    ϫΠʂʂ
    » ΦϨΦϨϑϨʔϜϫʔΧʔ͸ΦϨΦϨङΓʹૺΘ͵Α
    ͏ɺଉΛͻͦΊɺެʹ͢Δ͜ͱͳ͘ɺΦϨΦϨϑϨ
    ʔϜϫʔΫΛѪͰΔͷͰ͋ͬͨ…ɻ

    View Slide

  10. » ͔ͯ͘͠ʮΦϨΦϨϑϨʔϜϫʔΫਓޱʯ͸ݮগ͠ɺ
    Ұ౓΋ΦϨΦϨͨ͜͠ͱͷͳ͍ඇΦϨΦϨਓͷ૿Ճ
    Λࢲ͸ײ͍ͯ͡Δ…
    » ʮڐͤΜʂΦϨΦϨϑϨʔϜϫʔΫѪ޷Ոͱͯ͠͸அ
    ݻઓ͍͍ͨʂʢݸਓͷײ૝Ͱ͢ʣʯ
    » ͱ͍͏ͷ͕ɺ͜ͷτʔΫͷΞϯάϧͰ͢

    View Slide

  11. ·ͣ࠷ॳʹɺࠓ೔ࢲ͕ͲΕ͘
    Β͍ఢΛͭ͘Δͷ͔஌͓ͬͯ
    ͖͍ͨΜͰ͕͢ɺ
    » օ͞Μ͸
    » ʮΦϨΦϨͬͯͳʹʁʯͰ͔͢ʁ
    » ʮҰ౓͸ΦϨΦϨʯͰ͔͢ʁ
    » ʮωόʔΦϨΦϨʯͰ͔͢ʁ
    » ʮҰੜΦϨΦϨʯͰ͔͢ʁ

    View Slide

  12. ʮͳΔ΄Ͳʯ
    » Ͱ͸ຊ୊ʹೖ͍͖ͬͯ·͢ɻ

    View Slide

  13. FWΛ࡞Δલʹ
    FWͱ͸ͳΜͳͷ͔

    View Slide

  14. ϑϨʔϜϫʔΫͱ͸ʁ
    Ŗ PHPͰ͸ʮ΢ΣϒΞϓϦέʔγϣϯ੡࡞࣌ʹ໾ཱͭϥ
    ΠϒϥϦͷηοτͱੈք؍ʴΤίγεςϜʯΛࢦ͢ࣄ͕
    ଟ͍
    - աڈ͸ಛʹલऀ͕ͩͬͨɺࡢࠓ͸ޙऀ΋ॏཁʹ
    - ʢҎޙɺFWͱུশ͠·͢ʣ

    View Slide

  15. ༗໊ͳFW
    Symfony, Laravel, Lumen, Slim Framework, Yii,
    PHPixie, FuelPHP, CodeIgniter, CakePHP,
    ZendFramework, Phalcon, Nette, Silex, fatfree,
    limonade, DietCake, DietCube, Lithium, Aura,
    Ethna, etc. etc.
    㙽ʹ֯୔ࢁ

    View Slide

  16. ΋ͬͱ͋Δʂଟ
    ͍ʂ
    » 2016-04-12ௐ΂
    » ͲΜͲΜ૿͑ͯΔ
    » (ແ࿦ɺ͜ͷ਺ࣈ͸ϊΠζ
    ΛؚΉ)
    » ͜ͷ΄͔ʹɺηϯύΠ͔Β
    ౉͞ΕͨFWͱ͔΋͋ΔͰ
    ͠ΐ͏

    View Slide

  17. ໨తಛԽܕFW΋
    » ϒϩάΤϯδϯͷWordpress ౳
    » CMSͷDrupal ౳
    » ECαΠτͷECCUBE ౳

    View Slide

  18. FWΛ࢖͏ཧ༝
    - ੜ࢈ੑͷ޲্
    - ܾ·Γ੾ͬͨίʔυΛॻ͔ͣʹࡁΉ
    - ྑ͋͘Δػೳ͸ϓϥάΠϯ͕͋Δ͜ͱ΋
    - ʮ੍ݶʯ͕Ͱ͖Δ͜ͱͰɺઃܭ͕͠΍͍͢
    - ඼࣭ͷ޲্
    - ϩδοΫʹूதͰ͖ɺ৽نίʔυྔΛݮΒͤΔ
    - ʮྑ͍ઃܭʯ͔Βဃ཭ͮ͠Β͘ͳΔ
    - ηΩϡϦςΟϗʔϧ͕উखʹຒΊΒΕ͍ͯΔࣄ΋ଟ͍
    - େن໛։ൃͷجૅʹͳΓ΍͍͢
    - νʔϜʹن໿Λཁٻ͠΍͍͢
    - ʢେ఍ʣγοΧϦͨ͠υΩϡϝϯτ͕ଘࡏ͢ΔͷͰֶशɾڭҭ͠΍͍͢

    View Slide

  19. ॴͰɺFW͸ඞਢͳͷ͔ʁ
    » (PHP<=3ͷࣄ͸লུ)
    » PHP4͔ΒɺPHPࣗମ͕ϑϨʔϜϫʔΫʹͳͬͨ
    » DBαϙʔτ΋Sessionαϙʔτ΋͋Δʂ
    » PHP͚ͩͰେମͷࣄ͸ॻ͚Δ
    » ͍·ͩʹ͜ͷૉ๿ͳੈք͸Ұ෦Ͱ݈ࡏ

    View Slide

  20. ࣌͸ྲྀΕ…
    ʮৗࣝʯ͕มΘΔ

    View Slide

  21. ʮPHPͰ΋ϧʔλʔ͕ඞཁͰ͸ʁʯ
    » ʢURLʹ͋Θͤͯॲཧ಺༰Λม͑Δʣ
    » PHPͰͷϧʔςΟϯά͸HTTPD೚ͤ
    » form.php,confirm.phpͳͲʹผ͚Δݹ͖Ώ͔͍͠ε
    λΠϧ͸ʮμα͍ʯʮඇޮ཰తʯ
    » SEOͩͳΜͩͰɺྑ͍ײ͡ͷURL͕ٻΊΒΕΔ࣌୅
    » RESTʂRESTʂ

    View Slide

  22. ʮςϯϓϨʔτΤϯδϯ΋ॏཁͩʯ
    » ςϯϓϨʔτΤϯδϯͱͯ͠PHP͸ΞϧςΟϝοτ
    » ηΩϡΞ͞Λపఈ͢Δͷ͕Ή͔ͣ͗͢͠Δ

    » ͜͜ʹ͍Δਓ͕ॻ͘ͱ͸ࢥ͑ͳ͍͕ɺ΢οΧϦॻ͚
    ͪΌ͏
    » ʢBlogΧελϜҊ݅ͩͱׂͱݟΔ…ίϫΠ…ʣ
    » ʮੈքฏ࿨ͷҝʹPHPͷྗΛ෧ҹ͢Δඞཁ͕͋Δʯ

    View Slide

  23. ηΩϡϦςΟ͕௿ͯ͘ةݥ
    » ݱ୅͸༷ʑͳରࡦΛ͠ͳ͍ͱੈքฏ࿨͕อͯͳ͍
    » ಙؙຊ͸جຊΫϦΞ͠ͳ͍ͱ͍͚ͳ͍
    » PHP͚ͩͰ͸҆શͷͨΊͷ࢓૊Έ͸օແ
    » ໪࿦࣮૷͸Ͱ͖Δɺ͔͠͠ݸਓͷೳྗࠩ͸ܹ͍͠
    » htmlspecialcharsͱ͍͏ਖ਼࿐ؙ͔͠ͳ͍ਓ΋…
    » ਖ਼࿐ؙ͢Βͳ͍ݱ৔΋͠͹͠͹ݟ·͢
    » FWΛਖ਼͔ͭ͑͘͠͹ɺ݁ߏԡ͑͞ࠐΊΔ(ཁग़య

    View Slide

  24. ͦͷޙ΋ଓʑͱ
    » ʮ˓˓(ྫ:ORM)͕͋ΔͱΑͦ͞͏ʯʮ࡞Ζ͏ʯ
    » ͦΕΒϥΠϒϥϦ͕·ͱ·͍͖ͬͯɺ͍͔ͭ͠օ͕஌
    ΔFWͱ͍͏ू߹ମʹ
    » ͞ΒʹFWؒɺݴޠؒͰݚᮎ͠ɺύΫϦ͋ͬͨΓͯ͠
    ྑ͍෺͕Ͱ͖Δ
    » ݱࡏ͸Ұൠਓ͸Α͍FWΛ૪͏Α͏ʹબͿ

    View Slide

  25. ͳΜ΍͔Μ΍͋Γ
    » ͔ͯ͘͠ੈք͸༷ʑͳFWʹͭͭ·ΕɺΤϯδχΞ͸
    ฏ࿨ͷ಺ʹ฻Βͨ͠ͷͩͬͨ…
    » ʢͲͷFW͕͍͍͔બͿͷ͕େมͳࣄ͸আ͘ʣ

    View Slide

  26. ׬!

    View Slide

  27. ׬Ͱ͸ͳ͍
    » ͱ͍͏͜ͱͰɺFW͸ͭ͘Δ΋ͷͰͳ͘બͿͷ͕ݱ୅
    » ࣗ෼Ͱۤ࿑͢Δඞཁ͸ͳ͍
    » ඞཁ͸ͳ͍ͷʹ…
    » ΦϨΦϨϑϨʔϜϫʔΫΛ࡞ͬͯ͠·͏ਓ͸͍Δ
    » ࢲͱ͔

    View Slide

  28. ΦϨΦϨϑϨʔϜϫʔΫͱ͸ʁ
    » ੈͷதʹ͸ྑ͍FW͕୔ࢁ͋Δͷʹɺ
    Θ͟Θࣗ͟࡞ͯ͠͠·ͬͨFW
    » ओʹݸਓ΍ɺ৬৔ͳͲڱ͍ͱ͜ΖͰͷΈ࢖ΘΕ͍ͯΔ
    ࣄ͕ଟ͍
    » ʮΦϨΦϨFW͸߹๏Ͱ͢ʂʯ
    » ͦ΋ͦ΋ଟ͘ͷ༗໊FW΋ΦϨΦϨ͔Β࢝·ͬͨΖ͏

    View Slide

  29. ΦϨΦϨͱϊοτΦϨΦϨͷҧ͍͸ʁ
    » ϑϨʔϜϫʔΫͱͯ҆͠ఆ͍ͯ͠Δʢയવʣ
    » օ͕ͦͷ࢓༷Λֶ΂ͯʢυΩϡϝϯτ͕੔උ
    » Ͱ͖Ε͹୔ࢁͷ໨ͱɺݱ৔Ͱࢼ͞Ε͍ͯͯ
    » Ͱ͖Ε͹σΩ͕Α͚Ε͹Α͍
    » Ͱ͖Ε͹೔ຊޠॻ੶ͳΜ͔΋ͰͯΕ͹࠷ߴ
    » ʢఆٛͳΜͯͳ͍ɺͱ͍͏͜ͱͰ͢ʣ

    View Slide

  30. ΦϨΦϨϑϨʔϜϫʔΫѪ޷Ոͷห
    » ʮΦϨͳΒͦ͜ΒͷFWΑΓྑ͍෺͕ͭ͘ΕΔʂʯ
    ʢ…ͳΜͯਓ͸গͳ͍ʣ
    » ʮෳࡶͳFWʹख़ୡ͢ΔΑΓɺ࡞ͬͨํ͕ૣ͍ʯ
    » ʮ࡞ͬͯΔਓ͕ԣʹ͍Δ͔Βָʯ
    » ʮઌ૆୅ʑड͚ܧ͕Ε͖ͯͨ͜ͷFW͸࠷ߴʯ
    » ʮOSSΛಋೖ͢ΔͷʹελϯϓϦϨʔ͕஍ࠈʯ
    » ʮ࡞ͬͯΈ͔ͨͬͨʯ

    View Slide

  31. ΦϨΦϨϑϨʔϜϫʔΫʹର
    ͢Δ൷൑ྫ
    » ʮ඼࣭͕ѱ͍ʯ
    » ʮ΄͍͠ػೳ͕ͳ͍ʯ
    » ʮܧ͗઀͗ઃܭ͕ଟ͘ɺ೺Ѳͮ͠Β͍ʯ
    » ʮηΩϡϦςΟʹ໰୊͕͋Δʯ
    » ʮυΩϡϝϯτ͕ͳ͍͠ɺ࡞ͬͨਓ͕ୀ৬ͯ͠஍ࠈʯ
    » ʮPHPͷόʔδϣϯ্͕͛ΒΕͳ͍ʯ

    View Slide

  32. ͲΕ΋΋ͬͱ΋ͳ͝൷൑
    » ͔ͦ͠͠ΕΒ͸੹೚͋ΔॴͰͷ࿩
    » झຯͷ୳ڀ৺ͷͨΊͳΒ໰୊ʹͳΒͳ͍
    » ࡞ͬͯΈ͍ͨͳΒ࡞Δ΂͖
    » ʢ͍ͬͯ͏͔࡞ͬͨ͜ͱͳ͍ͷʁϗϯτʹʁʣ
    » ΦϨΦϨΛ࡞ΔࣄͰ͔Β͔ΘΕΔʢʁʣͷ͸
    ͓͔͍͠ʂ

    View Slide

  33. ͱ͍͏͜ͱͰʢʁʣ
    » օ͞ΜΦϨΦϨϑϨʔϜϫʔΫΛ࡞Γ·͠ΐ͏ʂ
    » Ͱ΋ɺҰ౓΋ͭͬͨ͘͜ͱ͕ͳ͍ਓ΋͍ͦ͏
    » ͱ͍͏͜ͱͰɺຊ೔͸ΦϨʹΑΔΦϨΦϨϏΪφʔ
    ʹΉ͚ͨΦϨྲྀΦϨΦϨϑϨʔϜϫʔΫ࡞੒ྫΛ঺
    հ

    View Slide

  34. ΦϨΦϨϏΪφʔ޲͚৘ใ
    » ΦϨΦϨϑϨʔϜϫʔΫͷ࡞Γํ
    » ඞཁͳ΋ͷ
    » ͋Δͱྑ͍΋ͷ
    » ͓͢͢Ίࢦ਑

    View Slide

  35. ඞཁͳ΋ͷ
    » ΍Δؾ
    » ࢀߟʹͳΔଞͷFW
    » ࠷ۙݟͨΦγϟϨͳTipsͱ͔ͷϒΫϚ

    View Slide

  36. ͋Δͱྑ͍෺
    » ϝʔϧϑΥʔϜ΍ܝࣔ൘Έ͍ͨͳΞϓϦ
    » ීஈ͔͔͍͑ͯΔطଘFWʹର͢Δෆຬ
    » ΦϒδΣΫτࢦ޲ϓϩάϥϛϯάͷڭՊॻ
    » gitɺPHPStormͳͲ

    View Slide

  37. ͓͢͢Ίͳࢦ਑
    » ແܭը
    » ແ੹೚
    » ແςετ
    » ༗ݶ࣌ؒ

    View Slide

  38. Ͱ͸ૣ଎…
    ͦͷલʹ

    View Slide

  39. ҎԼͷࣄ͸ආ͚Α͏ʂ
    » ଞਓʹ࢖ΘͤΔ
    » ࢓ࣄ΍ݸਓαʔϏεͷ੹೚͕͔͔Δॴʹ࢖͏
    » ׬੒ͤ͞ΒΕͳ͍͜ͱΛޙչ͢Δ
    » ʢͦ͏͓͚ͯ͠͹ɺ୭΋൵͠·ͳ͍ʣ

    View Slide

  40. Ͱ͸࡞ͬͯΈ·͢

    View Slide

  41. ʮͳʹ͕͋Ε͹FW͔ͳʁʯ
    » FW͕ͲΜͳ΋ͷ͔օ͞Μ஌ͬͯΔͱ͸ࢥ͍·͕͢ɺ
    ͲΜͳFWΛͭ͘Δ͔ͪΐͬͱߟ͑·͠ΐ͏
    » ͱΓ͋͑ͣLaravelͷػೳҰཡΛݟͯΈͨ

    View Slide

  42. Routing, Middleware, Controllers, Requests,
    Responses, Views, Blade Templates,
    Authentication, Authorization, Artisan Console,
    Billing, Cache, Collections, Elixir, Encryption,
    Errors & Logging, Events, Filesystem / Cloud
    Storage, Hashing, Helpers, Localization, Mail,
    Package Development, Pagination, Queues, Redis,
    Session, SSH Tasks, Task Scheduling, Testing,
    Validation, Query Builder, Migrations, Seeding,
    Eloquent ORM,

    View Slide

  43. ແཧ

    View Slide

  44. ΦϨΦϨϑϨʔϜϫʔΫ੡࡞
    ৺ಘΛࢥ͍ग़͢
    » ༗ݶ࣌ؒʹऴΘΒͤΔ
    » ࠷ॳʹࢭΊॴΛܾΊ͓ͯ͘
    » ྫʮ߹ܭ˓೔Ҏ಺ʹͰ͖ΔΑ͏ʹ͢Δʯ
    » ྫʮ͋Δ࣮૷ʹ਺࣌ؒ೰ΜͩΒࠓճ͸ఘΊΔʯ
    » ྫʮ͓खຊΛ౔೔Ͱཧղग़དྷͳ͍ͳΒ࣍ճʹʯ

    View Slide

  45. ϏΪφʔ͸·ͣ͸ϚΠΫϩϑ
    ϨʔϜϫʔΫ
    » ϧʔλʔʢίϯτϩʔϥʔʣ
    » ςϯϓϨʔτΤϯδϯʢϏϡʔʣ
    ͜ͷೋͭͰϑϨʔϜϫʔΫͱݴ͍ுΕΔͷͰΦτΫʂ

    View Slide

  46. ϧʔλʔ
    » URLˍMethod౳ͷ൑ఆύλʔϯΛొ࿥ɾอ࣋
    » ࣮ߦ࣌ʹରԠ͢Δ΋ͷΛܾఆͯ͠ฦ͢

    View Slide

  47. ςϯϓϨʔτΤϯδϯ
    » ϧʔλʔͰ࣮ߦͨ͠ίʔυͷ݁ՌΛ੔ܗ͢Δɺओʹ
    HTMLΛग़ྗ͢Δͷʹ࢖ΘΕΔͷ͸͝ଘ͡ͷ௨Γ
    » PHPࣗମ͕΄ͱΜͲςϯϓϨʔτΤϯδϯ

    View Slide

  48. ͜ͷೋ͚ͭͩͰ͢ΑɺͳΜ͔͙͢ʹͰ͖ͦ͏Ͱ͢Ͷʂ͍
    ·͙ͭͬͯ͘͢Έ·͠ΐ͏ʂ

    View Slide

  49. ͱ͍͏͜ͱͰ׬੒
    ͨ͠΋ͷ͕ίνϥ
    Ͱ͢

    View Slide

  50. Ore frameworkര஀ʂʂ
    » ΦϨϑϨʔϜϫʔΫʂ
    » ࡞੒೔਺͸̍೔͘Β͍ʂ
    » https://github.com/uzulla/Ore

    View Slide

  51. ػೳ
    » ૉ๿ͳϧʔλʔ
    » '/post/:post_id' Έ͍ͨͳࢦఆ΋ҰԠͰ͖Δ
    » ૉࡐΛ׆͔ͨ͠ςϯϓϨʔτΤϯδϯ
    » ͍ͬͯ͏͔΄΅PHPͦͷ··

    View Slide

  52. ಛ௃
    » 10೥͘Β͍લʹΈͨײ͡Λ࠶ݱʂ
    » ݱ୅ͷFW͔ΒΈΕ͹ҟ༷ʹγϯϓϧʂ
    » 1ϑΝΠϧɺؔ਺10ݸ͘Β͍ͰͰ͖ͯΔͧʂ
    » ॳ৺ऀʹΉ͔͍ͣ͠OOP΋ແ͠ʂؔ਺Ͱ͓̺ʂ

    View Slide

  53. require_once(dirname(dirname(__FILE__)) . "/app/ore.php");
    define("DB_DSN",
    'sqlite:' . dirname(dirname(__FILE__)) . "/db.sqlite");
    option('HTML_TITLE', "ͳ͔ͭ͠ͷੈքͰ͢");
    route('/', 'post_list');
    route('/post/create', 'post_create');
    route('/post/:id', 'post_show');
    route('/reset', 'post_reset');
    run();
    ?>

    View Slide

  54. View Slide

  55. route('/', 'post_list');
    route('/post/create', 'post_create');
    route('/post/:id', 'post_show');
    route('/reset', 'post_reset');
    run();

    View Slide

  56. function route($path = null, $func_name = null)
    { // ؔ਺ऴྃ࣌ʹ΋ফ͑ͳ͍഑ྻͱͯ͠$route_listΛએݴ
    static $route_list = array();
    // $keyͱ$val྆ํʹԿ͔ೖ͍ͬͯΕ͹ɺ$pathΛΩʔʹ$func_nameΛอଘ
    if (!is_null($path) && !is_null($func_name))
    $route_list[$path] = $func_name;
    // Ҿ਺ࢦఆແ͠ͳΒɺ$route_listΛ·Δ͝ͱฦ͢
    if (is_null($path)) return $route_list;
    // $pathҾ਺͕༗ΓɺͦͷΩʔ͕route_listʹ͋Ε͹ɺͦΕΛฦ͢
    if (isset($route_list[$path])) return $route_list[$path];
    // Έ͔ͭΒͳ͔ͬͨͷͰɺnullΛฦ͢
    return null;
    }

    View Slide

  57. function run()
    {
    // ݱࡏͷΞΫηεʹରԠ͢ΔPathΛݕࡧ
    $path = find_match_path();
    // pathʹରԠ͢Δؔ਺໊ΛͱΓͩ͠ɺ࣮ߦ
    call_user_func(route($path));
    }

    View Slide

  58. function find_match_path()
    {
    $uri = $_SERVER['REQUEST_URI'];
    foreach (path_regex() as $path => $regex) {
    if (preg_match($regex, $uri, $matches)) {
    $match_path = $path; break;
    }
    }
    if (!isset($match_path)) { return 'notfound'; }
    foreach ($matches as $k => $v) {
    if (preg_match('/^[0-9]/u', $k)) { continue; }
    option($k, urldecode($v));
    }
    return $match_path;
    }

    View Slide

  59. function path_regex()
    {
    $regex_list = array();
    foreach (route() as $route => $cb) {
    $regex_list[$route] =
    '#\A' .
    preg_replace_callback(
    '#:([\w]+)#',
    function ($m) {
    return "(?P[^/]+)";
    },
    $route
    ) .
    '\z#'; // ex: #\A/post/(?P[^/]+)\z#
    }
    return $regex_list;
    }

    View Slide

  60. function render($template, $params = array())
    {
    extract($params);
    ob_start();
    include(TEMPLATE_DIR . $template);
    $html = ob_get_clean();
    echo $html;
    }

    View Slide

  61. // ݺͼग़͠
    render('ʙʙ',array('name'=>$name));

    // include͞ΕΔςϯϓϨ಺ͷίʔυ

    // ↑Ͱ͸ͳ͘ɺ↓Έ͍ͨʹ͔͖͍ͨΑͶʁ

    View Slide

  62. ௕͘ͳΔͷͰ͜ͷ΁ΜͰ
    » Githubʹʢ͸͔ͣ͠ͳ͕Βʣ͕͍͋ͬͯ·͢ͷͰɺ
    ޙͰಡΜͰস͍ͬͯͩ͘͞ɻ

    View Slide

  63. ʮͨͷ͍͠ʂʯ
    » ͳ͔ͭ͠ςΫχοΫΛͻ͞ͼ͞ʹ͔ͭ͏ͱ৽઱ʂ
    » ͳΜ͔ͩΜͩମ͕͓΅͑ͯͯεΠεΠ͔͚ͯͨͷ͠
    ͍ʂ
    » Ͳ͏Ͱ͢ʁ10೥લͷςΫχοΫ΋झ͕͋Γ·͢Α
    Ͷʁ
    » ʮΦϨΦϨFW࡞Γͬͯͨͷ͍ͦ͠͏ʙʂʯ
    » Ͳ͏Ͱ͢ʁͨͷͦ͠͏Ͱ͠ΐ͏ʁ

    View Slide

  64. Έͳ͞Μͷײ૝
    ʮੲ࿩͡Όͳ͍͔ʂ;͚͟Μͳʂʯ

    View Slide

  65. ͜ͷ··ͩͱՈʹؼΕͳ͘ͳ
    Γͦ͏ͳͷͰ
    » ΋͏ҰͭϑϨʔϜϫʔΫΛ࡞Γ·ͨ͠

    View Slide

  66. Ore2 Framework ര஀ʂ
    » ΦϨΦϨϑϨʔϜϫʔΫʂ
    » ੡࡞೔਺͸̏ഒͷ໿ࡾ೔ʂ
    » https://github.com/uzulla/Ore2

    View Slide

  67. ಛ௃
    » OreͱҧͬͯOOPରԠʢʁʣʂ
    » PSR-3,4,7,11(Draft)ʹ(ଟ෼)४ڌʂ
    » ྲྀߦΔ͔΋͠Εͳ͍PSR-7Λ࢖ͬͨϛυϧ΢ΣΞʹ
    ରԠʂ
    » PHP7ରԠʂͱ͍͏͔7Ҏ߱Ͱ͔͠͏͔͝ͳ͍ʂ

    View Slide

  68. ػೳ (໺๬)
    » ϧʔλʔ
    » TwigͬΆ͍ςϯϓϨʔτΤϯδϯ
    » ϩΨʔ
    » PSR-7ɺMiddlewareରԠ
    » ίϯςφʢϩέʔλʣ
    » ηογϣϯ

    View Slide

  69. ػೳ (ݱ࣮)
    » ϧʔλʔ
    » TwigͬΆ͍ςϯϓϨʔτΤϯδϯ ×
    » ϩΨʔ
    » PSR-7ɺMiddlewareରԠ˚
    » ίϯςφʢϩέʔλʣ
    » ηογϣϯ ˚

    View Slide

  70. ʮࡾ೔Ͱ͸ແཧ!!ʯ
    » ςϯϓϨʔτΤϯδϯ
    » ύʔαʔϨΩαʔτʔΫφΠβʔ
    » Request/ResponseInterface
    ʢͱ෇ਵ͢ΔServerRequestInterface౳ʣ࣮૷େม
    » ZendઌੜʹཔΓ·ͨ͠
    » ηογϣϯ
    » ੜࣽ͑ʢਅͷPSR-7ରԠͷηογϣϯ໘౗ʂʣ

    View Slide

  71. declare(strict_types=1);
    include __DIR__."/../vendor/autoload.php";
    // Route ొ࿥
    $router = new \Ore2\Router();
    $router->get('/', function(){
    return $this->html('123');
    });
    $router->get('/name/:name', function(){
    return $this->html("hello {$this->c->routeParams['name']}");
    });
    $router->get('/sample', '\\MyApp\\SampleAction::sample');
    $router->get('/sample_json', '\\MyApp\\SampleAction::sampleJson');
    // PSR-7ΦϒδΣΫτͷϑΝΫτϦΛ࣮૷͢ΔͷఘΊ·ͨ͠
    $request = \Zend\Diactoros\ServerRequestFactory::fromGlobals();
    $response = new \Zend\Diactoros\Response();
    // route ղܾ
    $match_result = $router->findMatch($request->getMethod(), $request->getRequestTarget());
    // ֤छϔϧύʔΛίϯςφʹ͍ΕΔ
    $container = new \Ore2\Container();
    $container->config = require __DIR__."/../settings.php";
    $container->session = new \Ore2\Session(new \Ore2\Session\Storage\PHPSession());
    $container->template = new \Ore2\Template($container->config['template']);
    $container->logger = new \Ore2\Logger();
    // ΞΫγϣϯΛ࡞੒
    $action = $match_result->buildAction($container);
    // Middlewareͱ࣮ͯ͠ߦ
    $seqencer = new \Ore2\MiddlewareSequencer([
    new \Ore2\Transmitter(),
    $action
    ]);
    $seqencer($request, $response);

    View Slide

  72. View Slide

  73. Ͱ͸ίʔυ঺հ…
    » ͱ͍͕ͨ͠ɺ͕͢͞ʹεϥΠυͰͭΒͭΒ঺հ͢Δ
    ͷ͕ݫ͍͠ίʔυྔ
    » ͳͷͰμΠδΣετͰ঺հ
    » ڵຯ͕͋Δํ͸GithubͰݟ͍ͯͩ͘͞

    View Slide

  74. » PHP7લఏͰ૊Έ࢝Ίͨ͠ɺ͔ͤͬ͘ͳͷͰ
    declare(strict_types=1);ɺҾ਺ܕࢦఆ΍ฦ஋ܕ
    ࢦఆ΋υϯυϯ෇༩
    » PSR-4ରԠͳͷͰComposerͷAutoloader
    » ϧʔλʔ͸ؔ਺໊Ͱͳ͘Ϋϩʔδϟɺ·ͨ͸Ϋϥεϝ
    ιου໊ࢦఆ͕Մೳ
    » ྲྀੴʹHTTPϝιουʹରԠ
    » Logger͸PSR-3४ڌ

    View Slide

  75. » ίϯςφ͸ҙຯͳ͘PSR-11(Draft)ʹ΋ରԠ͠ɺ
    ArrayAccessͱ__get/set΋࣮૷
    » Session͸(ҰԠ)PSR-7Ͱಈ͘Α͏ʹ࡞੒
    » CSRFΨʔυ΍ྫ֎τϥοϓ౳ΛPSR-7 Middleware
    ͱ࣮ͯ͠૷
    » relay(relayphp.com)෩ͷϛυϧ΢ΣΞ࣮ߦػೳΛ
    ༻ҙ
    » ϧʔτઃఆͰɺΞΫγϣϯʹΫϩʔδϟΛ౉ͯ͠΋
    bindToͰ$thisܦ༝Ͱ৭ʑ৮ΕΔ
    » etc,etc

    View Slide

  76. PSRͰॻ͚ͦ͏ͳ΋ͷશ෦ॻ
    ͍ͯΈͨ
    » ͱ͍͏͜ͱͰɺݸਓతʹ͸ຬ଍Ͱ͢ʂ
    » ʢԿΛ͍ͬͱΔΜ͍ͩͭ͜͸ʣ

    View Slide

  77. PSR-7ʹ͍ͭͯͪΐͬͱ঺հLT

    View Slide

  78. PSR-7ʹ͍ͭͯ
    » Request/Response ObjectͷInterface࢓༷
    » ϒϥ΢β͔ΒͷϦΫΤετ৘ใ͕શ෦͸͍ͬͨΦϒδ
    ΣΫτ
    » PerlͰ͸PSGIɺRubyͩͱRackΈ͍ͨͳ΋ͷ
    » PHPͰ΋աڈͳ͔ͬͨΘ͚Ͱ͸ͳ͍͕ɺFWຖʹޓ׵
    ੑ͸ͳ͔ͬͨ

    View Slide

  79. ͳʹ͕خ͍͠ͷʁ
    » ී௨͸ɺಛʹ͏Ε͘͠ͳ͍
    » ݸਓతʹ͸
    » ΦϨΦϨFWѪ޷Ոతʹ͸ָʹςετͰ͖ͦ͏
    » ଞͷݴޠͬΆͯࣗ͘વʹײͯ͡خ͍͠
    » ReactPHP౳ΞϓϦέʔγϣϯαʔόʔ͕ରԠ͢
    Ε͹ָͦ͠͏ʂ=>࣮ࡍπΠʔτΛݟͨ
    » Middleware͕ͨͷͦ͠͏

    View Slide

  80. ͳʹ͕خ͘͠ͳ͍ͷʁ
    » ʢ౰໘͸ʣແବ͕૿͑ΔͷͰ஗͘ͳΔ
    » $_*Λ௚Ͱ৮Δࠓ·Ͱͱޓ׵ੑ͕ແ͍
    » PHP७ਖ਼ͷsession͕(ຊདྷͳΒ)ແ͘ͳΔ
    » ·ͩ࢖͑Δ࣮૷͕બ΂ͳ͍

    View Slide

  81. ·͋ɺී௨ͷਓ͸ؾʹ͠ͳ͍
    » FWͷϔϧύ΍γϣʔτΧοτͰӅṭ͞ΕΔͩΖ͏
    » FW੍࡞ऀ͚͕ͩؾʹ͍ͯ͠Ε͹͍͍ͷͰ͸…
    » ͦ͏ɺΦϨΦϨFW੍࡞ऀͳΒؾʹ͠ͳ͍ͱͶʂʈʈ

    View Slide

  82. // ZendͷPSR-7࣮૷
    $request = \Zend\Diactoros\ServerRequestFactory::fromGlobals();
    $response = new \Zend\Diactoros\Response();
    // ΞΫγϣϯΛϧʔλʔͰܾఆ
    ΞΫγϣϯ = ϧʔλʔ($request);
    // ࣮ߦ
    $response = ΞΫγϣϯ($request, $response);
    // ԿΒ͔ͷํ๏Ͱ$responseΛૹ৴
    ૹ৴͢Δ܅($response);

    View Slide

  83. // request͔ΒPOSTऔಘྫ
    $name = $request->parsedBody['name'] ?? '';
    // ϨεϙϯεΦϒδΣΫτ࡞੒
    $response = $response
    ->withStatus(200);
    ->withHeader('Content-Type', 'text/html');
    $body = new \Zend\Diactoros\Stream('php://memory', 'w');
    $body->write("Hello world");
    $response = $response->withBody($body);
    return $response; // ͜ͷޙͰૹ৴܅ͳͲͰૹ৴͞ΕΔ

    View Slide

  84. PSR-7 middlewareʹ͍ͭͯ
    » ঢ়ଶ͕άϩʔόϧม਺͔ΒҾ͖͸͕͞ΕͨͷͰɺϑΟ
    ϧλʔΈ͍ͨͳ͜ͱ͕΍Γ΍͍͢
    » Rack Middleware΍Plack Middleware
    » ʮͦ͜ΒͷFWʹ΋ϛυϧ΢ΣΞ͋Δ͡ΌΜʁʯ
    ʮͦΕ͕શ෦ͷFWͰڞ௨ͷIFʹͳΕ͹ɺເ͕ʁʯ
    ʮʮ޿͕Δʂʂʯʯ

    View Slide

  85. ϛυϧ΢ΣΞͷ֓೦ਤ
    (A,B,C,D͸ϛυϧ΢ΣΞ)
    A B C D
    |-req&res->|
    |-req&res->|
    |-req&res->|
    |
    |||

    View Slide

  86. ༻్͸ແ਺ɺΦϨΦϨతʹ͸
    ເ͕͋Δ
    » ೖྗ/ग़ྗͷՃ޻
    » CSRFରࡦ
    » ೝূ
    » ҆શੑ޲্ʹ༗༻ͳϔομʔͷૹ৴
    » ग़ྗ࣌ʹஔ׵

    View Slide

  87. » ϑοΫ
    » Ωϟογϡ
    » ϩΨʔ
    » ྫ֎Ωϟον

    View Slide

  88. PSR-7ͷ͠ΜͲ͍ͱײͨ͡ॴ
    » ͋͘·Ͱ΋HTTPϦΫΤετͷঢ়ଶͳͷͰ…
    » ஌ͬͯ͸͍͕ͨɺ$_SESSION͕ͳ͍ʂ
    » Ore2Ͱ͸ޡຐԽ࣮ͯ͠૷
    » ͦ΋ͦ΋immutableͳPSR-7ͱ૬ੑ͕ѱ͍
    » ͏͏ʔʔΜ…

    View Slide

  89. ·͋Ͱ΋ָ͍͠ʂ
    » mod_phpͱ͔php-fpmͱ͔๞͖ͨͥʂ
    » ͱ͍͏ํ͸ੋඇ΍ͬͯΈͯ͸͍͔͕Ͱ͠ΐ͏͔

    View Slide

  90. ׬!!!

    View Slide

  91. ׬Ͱ͸ͳ͍

    View Slide

  92. ʮΦϨΦϨϑϨʔϜϫʔΫͷ࿩ͩͬͨ͠ͷͰ͸ʁʯ
    » ͜͜·Ͱ͢΂ͯ༨ஊʂ
    » ͜ͷΑ͏ʹɺੜࣽ͑ͷٕज़ΛάΠάΠ࢖ͬͯࢼ͢ͷ
    ΋ɺΦϨΦϨͷָ͠͞ͳͷͰ͢ʂʂ
    » Ͳ͏Ͱ͔͢ʁͨͷͦ͠͏Ͱ͠ΐ͏ʁ

    View Slide

  93. ͯ͞ɺOreͱOre2ΛৼΓฦͬ
    ͯΈ·͠ΐ͏
    » Ore͸ͱʹ͔͘࠷খݶͰ͔͔Ε͍ͯΔ
    » Ore2͸ڽͬͯ͸͍ͳ͍͚Ͳཉுͬͨ
    » Ͱɺ࣮ࡍ͜ΕͲΕ͘Β͍େมͳͷʁ

    View Slide

  94. View Slide

  95. » Ore
    » 9 commits / 588 ++ / 168 --
    » Ore2
    » 62 commits / 4,106 ++ / 1,063 --

    View Slide

  96. ͱɺΈΔͱɺͲ͏Ͱ͔͢
    » ʮॴḨ͜Μͳ΋ͷʢʣͳͷʹɺͦΕͬΆ͘͢Δͷ໘౗
    ͦ͏…ʯ
    » ͦ͏͓΋͍·ͤΜ͔ʁ
    » ʮΘͨ͠ʹ΋౔೔Ͱ࡞ΕΔ͔ͳʁʯ
    » ͦ͏ࢥ͏͔΋͠Ε·ͤΜ…

    View Slide

  97. ͦΜͳ͜ͱͳ͍ʂ
    ͋ͳͨ΋ࠓ໷தʹ
    ͋ͳ͚ͨͩͷ
    FWʂʂ

    View Slide

  98. ࡢࠓͷPHP͸…
    » ϥΠϒϥϦ͕ΊͬͪΌͦΖͬͯΔʂ

    View Slide

  99. » ʮϧʔλʔ͸ʁʯ
    » ୔ࢁ͋Γ·͢ʂ
    » ʮςϯϓϨʔτΤϯδϯ͸ʁʯ
    » ୔ࢁ͋Γ·͢ʂ
    » ʮ˓˓͸ʁʯ
    − ʢଟ෼ʣ୔ࢁ͋Γ·͢ʂ

    View Slide

  100. େ஍(OSS)ͷܙΈʹײँ…ʂ
    » ΠέͯΔϥΠϒϥϦΛެ։ͯ͠Βͬ͠ΌΔํʑ
    » ຊ೔΋Կਓ΋͍Βͬ͠Ό͍ͬͯΔ

    View Slide

  101. બͿͷ͸͠ΜͲ͍ͷͰ͸
    » ·͋ΦϨΦϨ͔ͩΒαϯϓϧͷงғؾ͔Βؾܰʹ͑Β
    ΅͏ʂ

    View Slide

  102. ͱ͍͏͜ͱͰ΍ͬͯΈͨ
    » ຊ೔ࡾͭ໨!
    » Oredakedenai FW!
    » ςϯϓϨʔτΤϯδϯ͸Twig
    » ϧʔλʔ͸zonuexe/simple-routing

    View Slide

  103. include __DIR__."/../vendor/autoload.php";
    \MyApp\Db::$pdo = new \PDO("sqlite:".__DIR__."/../db.sqlite");
    $container = [
    'template' => new Twig_Environment(
    new Twig_Loader_Filesystem(__DIR__."/../template")
    )
    ];
    $routing_map = [
    ['GET', '/', '\MyApp\Post::showList' ],
    ['GET', '/post/:id', '\MyApp\Post::show', ['id' => '/^(\d+)$/']],
    ['POST', '/post/create', '\MyApp\Post::create' ],
    ['GET', '/reset', '\MyApp\Post::reset' ],
    '#404' => '\MyApp\Post::notfound'
    ];
    $router = new \Teto\Routing\Router($routing_map);
    $action = $router->match($_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI']);
    if (!preg_match('|\A([\\a-zA-Z0-9_]*)::([a-zA-Z0-9_]+)\z|u', $action->value, $matches))
    throw new \InvalidArgumentException('invalid action string:' . $action->value);
    $method_name = $matches[2];
    (new $matches[1]($container))->$method_name($action->param);

    View Slide

  104. » 2 commits / 398 ++ / 0 --
    » ੡࡞࣌ؒ30෼͆ʂ
    » ୹͍ʂ

    View Slide

  105. » ެ։͞Ε͍ͯΔϥΠϒϥϦΛ͔ͭͬͯFWΛͭ͘Δͷ
    खܰʂʂʂ

    View Slide

  106. ͡Ό͋ͳΜͰࠓճૉखͰೋͭ
    ΋ॻ͍ͨͷʁ
    » झຯͰ͢

    View Slide

  107. ͪΐͬͱ·ͬͯɺͦΕͰΦϨΦϨͱ͍͑Δͷ͔ʁ
    » ॻ͍ͨॴ͸5ʙ10ߦ͘Β͍ͳͷʹΦϨΦϨʁ
    » ΋ͪΖΜ͜Ε΋وํ͚ͩͷΦϨΦϨͱ͍͑·͢
    » ʢ·͋ɺOre2ͩͬͯTwig͔ͭͬͯΔ͠…ʣ
    » ͍·΍֎෦ͷϥΠϒϥϦ΋͔ͭ͏ͷ͕౰વͰ͋Δ
    » ͋ΜͳFW΍͜ΜͳFWͩͬͯɺͳΜ͔ͩΜͩ
    Symfony͋ͨΓͷίϯϙʔωϯτΛ͔͍ͭͬͯΔ

    View Slide

  108. ͜ΕͰखܰʹΦϨΦϨͰ͖Δʂ
    » ࣗ෼͕ॻ͚ͳ͍ͱ͜Ζ͸ؾܰʹआΓΔ
    » Githubͷ͓ӄͰʮਓؾʯ͸ελʔͰՄࢹԽ
    » ʢਓؾ≠ग़དྷʣ
    » ΦϨΦϨϑϨʔϜϫʔΫ࡞੒ʹ͸࠷ߴͷ࣌୅Ͱ͸ʁ
    » Ͱ͖Δͱ͜Ζ͔ΒؾܰʹΦϨΦϨʂ

    View Slide

  109. » ͱ͍͏͜ͱͰɺ΍Βͳ͍ཧ༝͕͋Γ·ͤΜͶʂ(ʁ)

    View Slide

  110. ·ͱΊʹೖ͍͖ͬͯ·͢
    » ʢ࣌ؒௐ੔ͱ΋͍͍·͢ʣ

    View Slide

  111. ϛογϯάϐʔεʹؾ෇͚Δ
    » ϗϯτʹ0͔Β͔͚Δʁҙ֎ͱ͔͚ͳ͍
    » ຊ౰ʹ0͔Βͭͬͯ͘Έͳ͍ͱɺΘ͔Βͳ͍΋ͷ͕Θ
    ͔Βͳ͍
    » ੒Ռ෺ͦͷ΋ͷΑΓɺաఔͰ৭ʑͳ෺͕ಘΒΕΔ
    » ͔ͭ͏͚ͩɺಡΉ͚ͩͰ͸ͳ͍
    » ීஈ࢖͏͚ͩͷϥΠϒϥϦͷҙຯͱԞਂ͞Λ஌ΕΔ
    » PHP͚ͩͰͳ͍஌͕ࣝඞཁʹͳ͖ͬͯͨΓ

    View Slide

  112. ໪࿦ྗ΋্͕Δ
    » ίʔυಡղྗ্͕Δ
    » ίʔυΛ໨త࣋ͬͯಡΉͷ͸ޮՌత
    » యܕతͳελΠϧΛ͓΅͑ΒΕΔ
    » ෳ਺ͷFWͰ͔ͭΘΕ͍ͯͨΒఆ൪ͬΆ͍
    » ઃܭྗ΋্͕Δ

    View Slide

  113. ޻෉Λແࢹ͠ɺγϯϓϧॻ͖௚͢ͱ
    » ʢࣗ෼Ͱॻ͚ΔϨϕϧʹམͱ͠ࠐΉͱʣ
    » ٯʹطଘFWͷ޻෉͕ݟ͑Δ
    » ෳࡶͳͷ͸ಛผͳέʔεʹରԠ͢ΔҝͩͬͨΓ
    » ʮ஗͍ʯʮॏ͍ʯͷʹ͸ཧ༝͕͋ͬͨΓ
    » ʮ଎͍ʯϥΠϒϥϦ͕৭ʑ޻෉͍ͯ͠Δͷʹؾ෇͘

    View Slide

  114. ݹ͍ٕज़΋ॏཁͱվΊͯؾ෇͘
    » ࠓ෩ͳFWͰ΋ɺ࣮૷͸౰વͲΖ͔ͬͨ͘͞Γ
    » ྫɿ݁ہͳΜͰ΋Ͱ͖Δਖ਼نදݱ͸ਖ਼ٛʂ
    » ʢࠓճϧʔλʔͷਖ਼نදݱ͸࢖͍ճ͠ʣ
    » ͳΜ͔ͩΜͩྺ࢙͋Δٕज़͸௕͘࢖͑Δٕज़ͩͱؾ
    ෇͘
    » ʮ͕Μ͹ͬͯΉ͔ͭͦ͠͏ͳࣄΛษڧ͍ͯͧ͘͠ʂʯ
    ʮύʔαϨΩαʔτʔΫφΠβʔεςʔτϚγϯʯ
    ʮ΢ο΢οʯ

    View Slide

  115. ͱֶ͍ͬͨͼ͕͋Δ
    » PHPΧϯϑΝϨϯεʹ͍Βͬ͠ΌΔ΄Ͳɺͳʹֶ͔
    Ϳͷ͕޷͖ͳਓͳΒ͖ͬͱͨͷ͍͠
    » ͳΜ͔ͩΜͩͰΈΜͳ΍ͬͯΔͬͯɺͨͷ͍ͬͯ͠ʂ
    » ͱ͍͏͜ͱͰ
    » ΦϨΦϨ͠Α͏ͥʂ

    View Slide

  116. ΦϨΦϨ্ڃऀϓϨΠ
    » ΋͏ΦϨΦϨʹ๞͖ͨ(௄Γͨ)ํ΁
    » റΓϓϨΠʢม਺ΛҰݸ΋࢖Θͳ͍ͱ͔ʣ
    » ৽͍͠࢓༷Λ࣮૷ϓϨΠʢࠓճ͸Ore2͕PSR7ʣ
    » ͋ΔFWͷίϐʔϓϨΠʢࠓճOre͕͔ͳΓLimonde
    ͷϚωʣ
    » ੍ݶ࣌ؒͰͲ͜·Ͱͭ͘ΕΔ͔ʢػೳΛఘΊΒΕΔ
    ͔ʣϋοΧιϯϓϨΠ
    ϫΠϫΠ΍Δͷ΋ͨͷ͍͠Ͱ͢Αʂʂ

    View Slide

  117. ͦ͏͍͑͹ɺΦϨΦϨͨ͠ޙ
    ʹͳʹΛ͢Ε͹͍͍ͷ͔ʁ
    » τʔΫͷԠืͷ࠷ޙʹॻ͍ͯ·͕ͨ͠…

    View Slide

  118. ࣺͯΑ͏ʂʂʂ

    View Slide

  119. ΦϨΦϨΛ࢖͏ͷ͸ඍົ
    » ʮ࢖͍͍ͨΦϨΦϨFW΋࢖͑ͳ͍ɺ
    ͜Μͳੈͷத͡Όʢʣʯ
    » ΦϨΦϨ͸ઑΓ͕ͪ
    » ΦϨΦϨ͸ଞਓʹ͸ཧղ͞ΕͮΒ͍
    » ੹೚͕ͱ΋ͳ͏ͱɺΦϨΦϨͷࣗ༝ָ͕ͭ͞͠͞Β
    ͞ʹͳΔ
    » ͍͔ͭ͸ϝδϟʔʁͰ΋ࠓͰ͸ͳ͍ͦͬͱด͡Α͏

    View Slide

  120. ͭ·Γ
    » ਓੜҰ౓Ҏ্͸ΦϨΦϨͯ͠
    » ͙͢ʹࣺ͍ͯͯ͜͏ͥʂ
    » લ͚ͩΛ޲͍ͯʂ
    » ΤϯδϣΠʂΦϨΦϨʂ

    View Slide

  121. ΦϨΦϨτʔΫ͸Ҏ্Ͱ͢ʂ
    օ͞·ͷ͝ਗ਼ௌ
    ΦϨ͍ਃ্͛͠·͢ʂ

    View Slide

  122. ׬

    View Slide