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

授業でWebアプリを作っている?話

 授業でWebアプリを作っている?話

Dentoo.LT #14 のスライドです。

Mikio Fujita

June 13, 2016
Tweet

More Decks by Mikio Fujita

Other Decks in Programming

Transcript

  1. तۀͰWebΞϓϦΛ
    ࡞͍ͬͯΔ? ࿩
    @benevolent0505
    Dentoo.LT #14

    View full-size slide

  2. ͜Μʹͪ͸!!!!

    View full-size slide


  3. • @benevolent0505
    • ૯߹৘ใֶՊ3೥
    • Scala/JS/Ruby?
    • Ͱ΋ࠓճ͸PHP
    • ॕΩϯϓϦ4DX

    View full-size slide

  4. तۀͰWebΞϓϦΛ
    ࡞͍ͬͯΔ? ࿩
    @benevolent0505
    Dentoo.LT #14

    View full-size slide

  5. ͲΜͳतۀʁ
    ίϛϡχέʔγϣϯ͸,ݸਓͷ೔ৗձ࿩͔Β૊৫ͷ৘ใ఻ୡ,ࣾձ΁ͷ৘ใൃ৴ͳͲଟذʹΘͨͬ
    ͓ͯΓ,ਓؒͷ࠷΋ීวతͰॏཁͳ׆ಈͰ͢.ίϛϡχέʔγϣϯͷܗଶɾػೳ͸,ίϯϐϡʔλ
    ωοτϫʔΫ΍ܞଳి࿩ωοτϫʔΫΛ༻͍ͨWeb,ιʔγϟϧϝσΟΞ/ήʔϜ,ಈը഑৴αʔ
    Ϗε,ϏσΦձٞγεςϜ,ϝʔϧʹΑͬͯٸ଎ʹ֦େ͠ଟ༷Խ͍ͯ͠·͢.
    ○○○○○○○○○○○ͷओ୊͸,͜ΕΒͷίϛϡχέʔγϣϯπʔϧΛཧղ͠,৽͍͠ίϛϡχέʔγϣ
    ϯπʔϧΛࣗΒൃ૝ɾݚڀ͢ΔೳྗΛ਎ʹ͚ͭΔ͜ͱͰ͢.ͦͷͨΊʹ,ݱ୅ͷ༷ʑͳίϛϡχ
    έʔγϣϯπʔϧͷجૅͱͳ͍ͬͯΔWebγεςϜΛཧղ͢Δ͜ͱ͓Αͼ,ࠓޙ·͢·͢ॏཁʹ
    ͳΔωοτϫʔΫϓϩάϥϛϯάͷशಘΛ໨ඪͱ͠·͢.
    Ճ͑ͯ,৘ใηΩϡϦςΟͷଟ͘ͷ໰୊,ͨͱ͑͹,ݸਓ৘ใͷ࿙͍͑,Ϛϧ΢ΣΞײછ,ෆਖ਼৵ೖ͸
    WebΛ௨ͯ͡ߦΘΕ·͢ͷͰ,Webͷ࢓૊ΈΛཧղ͢Δ͜ͱ͸,৘ใηΩϡϦςΟͷशಘͷલఏ
    ͱͯ͠΋ॏཁͰ͢.

    View full-size slide

  6. ௕͍ɺࡾߦ
    • PHPΛ࢖ͬͯ

    View full-size slide

  7. ௕͍ɺࡾߦ
    • PHPΛ࢖ͬͯ
    • WebΞϓϦΛ࡞ͬͯ

    View full-size slide

  8. ௕͍ɺࡾߦ
    • PHPΛ࢖ͬͯ
    • WebΞϓϦΛ࡞ͬͯ
    • Webͷ࢓૊ΈΛษڧ͠ͳ͞Ε

    View full-size slide

  9. ௕͍ɺࡾߦ
    • PHPΛ࢖ͬͯ
    • WebΞϓϦΛ࡞ͬͯ
    • Webͷ࢓૊ΈΛษڧ͠ͳ͞Ε
    • ͋ͱ৘ใηΩϡϦςΟͷ͜ͱʹ΋৮ΕΒΕΔ
    ͱͳ͓ྑ͍

    View full-size slide

  10. ΍͖ͬͯͨ͜ͱ
    • ϩʔΧϧ։ൃ؀ڥߏங
    • ϧʔςΟϯάϑϨʔϜϫʔΫͷ࡞੒

    View full-size slide

  11. ϩʔΧϧ։ൃ؀ڥߏங

    View full-size slide

  12. ࣮श؀ڥ
    • PHP 5.○.3 ( < 5.4ܥ )
    • apache 2.○.15 ( < 2.4ܥ )
    • ϓϩάϥϜ͸֤Ϣʔβͷpublic_htmlʹ഑ஔ
    • ↑ֶ಺͔ΒͰ͔͠ΞΫηε͕ग़དྷͳ͍ʂ

    View full-size slide

  13. ๻ʮֶ಺ΞΫηε͡Όͳ͍ͱ͸
    ෆศ͔ͩΒPCʹPHPΛ
    Πϯετʔϧͯ͠։ൃ͠Α͏ʯ

    View full-size slide

  14. PHP 5.○.3 install battle

    View full-size slide

  15. ഊ๺
    Ubuntu 16.04ͰphpenvΛ࢖ͬͯೖΕΑ͏ͱͨ͠Β
    Πϯετʔϧ͞ΕͯΔ͸ͣͷϥΠϒϥϦ͕ແ͍ͱ͔ݴΘΕͯ
    ϏϧυͰ͖ͳ͔ͬͨ………

    View full-size slide

  16. ࢓ํ͕ͳ͍ͷͰVagrantͰߏங
    • Vagrantbox͔Β࣮श؀ڥʹ͍ۙOSΛ࣋ͬͯདྷΔ
    • httpd.conf΍php.iniΛ࣮श؀ڥΛ”ࢀߟʹ”഑ஔ
    • Apache΍PHPͷΠϯετʔϧ͸itamaeͰࣗಈԽ
    (࢝Ί͔Β͜͏͓͚ͯ͠͹………)

    View full-size slide

  17. ϧʔςΟϯάϑϨʔϜϫʔΫ
    ͷ࡞੒

    View full-size slide

  18. ࢿྉͰ͸͜͏͍͏URL͹͔ΓݟΔ……

    View full-size slide

  19. ͬͪ͜ͷํ͕ΠέͯΔ͡ΌΜ?

    View full-size slide

  20. WAFΛಋೖͯ͠
    ΠέͯΔURLʹ͠Α͏
    ࢝Ί

    View full-size slide

  21. ͍͍ײ͡ʹϧʔςΟϯάͯ͘͠ΕΔ
    ϑϨʔϜϫʔΫΛ࡞Ζ͏
    (ؾΛऔΓͳ͓ͯ͠)

    View full-size slide

  22. http://qiita.com/tadsan/items/bcaa14504d0ecdd9e096
    ҒେͳΔઌਓ (?) ༷

    View full-size slide

  23. Ͱ΋৭ʑਏ͍……
    • ഑ྻͷએݴํ๏͕μϧ͍ : array(val1, val2, …)
    • ࠓͷόʔδϣϯͩͱී௨ : [val1, val2, …]
    • ͦ΋ͦ΋PHPࣗମ͕μϧ͍
    • isset(value), unset(value)ͱ͔ͳΜͳΜ…

    View full-size slide

  24. ࠓޙ΍Γ͍ͨ͜ͱ

    View full-size slide

  25. • SQL࢖͍͍ͨ (࢖͍ͨ͘ͳ͍?)
    • (࣮श؀ڥ͸SQL࢖͑ͳ͍Έ͍ͨ)
    • ଞͷWAFͷίʔυ΋ࢀߟʹ͍ͨ͠
    • RubyͷSinatraͱ͔
    • ηΩϡϦςΟ΋ߟ͑ͳ͍ͱͶ

    View full-size slide

  26. ·ͱΊ
    • ϩʔΧϧ։ൃ؀ڥͷ੔͑ํ͔Β
    • HTTPͷ࢓૊Έ,
    • PHPΛ࢖ͬͨϓϩάϥϛϯάʹ
    • ৘ใηΩϡςϦςΟ
    ϝσ˓Ξω˓τϫʔΫ͸
    ͷ͜ͱ·Ͱֶ΂Δͱͬͯ΋͓ಘͳतۀͰ͢ɻ

    View full-size slide