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

はてなと技術研修

shibayu36
December 06, 2015

 はてなと技術研修

shibayu36

December 06, 2015
Tweet

More Decks by shibayu36

Other Decks in Programming

Transcript

  1. ͸ͯͳͱٕज़ݚम
    2015/12/06 ࢣఋొஃ
    @shiba_yu36

    View Slide

  2. ࢣঊ : @shiba_yu36
    ఋࢠ : @amagitakayosi

    View Slide

  3. ࣗݾ঺հ
    • @shiba_yu36
    • 4೥໨͸ͯͳΤϯδχΞ

    View Slide

  4. ຊ೔࿩͢͜ͱ
    • ͸ͯͳͰͷݚमͷߟ͑ํ
    • ݚम಺༰ͷ঺հ
    • ͸ͯͳڭՊॻ
    • ۀ຿Λ௨ͯ͡
    • @amagitakayosi͔Β࣮ࡍʹݚमΛड͚ͯΈͯ

    View Slide

  5. ͸ͯͳͷݚमͷߟ͑ํ

    View Slide

  6. ΤϯδχΞͷ
    ֮͑Δ͜ͱ͸ແݶ

    View Slide

  7. ΤϯδχΞͷ
    ֮͑Δ͜ͱ͸ແݶ
    ࣮ફͰ౎౓
    ਎ʹ෇͚Δ͔͠ͳ͍

    View Slide

  8. ͸ͯͳͷݚमͷߟ͑ํ
    • ࣮ફͰࣗΒߟ͑ͯखΛಈ͔͢͜ͱ
    ͕Ұ൪ͷֶश
    • ര଎Ͱ࠷௿ݶͷ஌ࣝΛ਎ʹ͚ͭɺ
    ͙͢ʹνʔϜʹ഑ଐ

    View Slide

  9. ര଎Ͱ࣮ફ΁ʁ

    View Slide

  10. ര଎Ͱ࣮ફ΁ʁ
    2िؒޙʹνʔϜ഑ଐ

    View Slide

  11. 1. ͸ͯͳڭՊॻͰ1िؒͷݚम
    2. ΦϦδφϧαʔϏεΛ1िؒͰ
    3. ࣮ࡍʹνʔϜ഑ଐ
    ݚमͷྲྀΕ

    View Slide

  12. View Slide

  13. 1.͸ͯͳڭՊॻͰͷݚम
    https://github.com/hatena/Hatena-Textbook

    View Slide

  14. ͸ͯͳڭՊॻͱ͸
    1िؒͰ࠷௿ݶͷWebͷٕज़
    ΛֶͿͨΊͷڭՊॻ

    View Slide

  15. ͸ͯͳڭՊॻͱ͸
    1िؒͰ࠷௿ݶͷWebͷٕज़
    ΛֶͿͨΊͷڭՊॻ
    ग़དྷΔͷ͔ʁ

    View Slide

  16. WebͰ࠷௿ݶඞཁͳٕज़
    ݴޠɺΦϒδΣΫτࢦ޲ɺςετɺDBɺ
    SQLɺURIɺHTTPɺWebαʔόɺHTMLɺ
    JSɺηΩϡϦςΟɺetc…

    View Slide

  17. WebͰ࠷௿ݶඞཁͳٕज़
    ݴޠɺΦϒδΣΫτࢦ޲ɺςετɺDBɺ
    SQLɺURIɺHTTPɺWebαʔόɺHTMLɺ
    JSɺηΩϡϦςΟɺetc…
    ଟ͗͢Δʂʂ

    View Slide

  18. ՝୊Ͱஈ֊తʹ
    ֓೦Λ֮͑ΒΕΔ޻෉
    designed by Freepik

    View Slide

  19. ஈ֊తʹֶͿ
    ϒϩάαʔϏεΛஈ֊తʹ࡞Γ
    ্͛ͯɺ஌ࣝΛੵΈ্͍͛ͯ͘

    View Slide

  20. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    1೔໨.
    2೔໨.
    3೔໨.
    4೔໨.

    View Slide

  21. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    ΦϒδΣΫτͷؔ܎͚ͩͰϒϩά
    DBͳͲͰӬଓԽ͸͠ͳ͍

    View Slide

  22. # ೔هͷ࡞੒
    my $diary = Diary->new('Johnͷ೔ه');
    # هࣄͷ࡞੒
    my $entry1 = $diary->add_entry(
    title => '೔هͩΑ',
    body => '͜Ε͕೔هͷຊจͩΑ',
    );
    my $entry2 = $diary->add_entry(
    title => '͜Ε΋೔هͩΑ',
    body => '΍ͬͺΓ೔هͷຊจͩΑ',
    );
    # ग़ྗ
    $diary->print;

    View Slide

  23. $ object_diary.pl
    # Johnͷ೔ه
    # [1] ೔هͩΑ : ͜Ε͕೔هͷຊจͩΑ
    # [2] ͜Ε΋೔هͩΑ : ΍ͬͺΓ೔هͷຊจͩΑ

    View Slide

  24. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    ϓϩάϥϛϯάͷ֓೦͚ͩΛֶͿ
    • ݴޠͷ࢖͍ํ
    • ઃܭ
    • ΦϒδΣΫτࢦ޲
    • ςετ

    View Slide

  25. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)

    View Slide

  26. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    ΦϒδΣΫτͷؔ܎͚ͩͷϒϩάΛ
    σʔλϕʔεͰӬଓԽɻೖग़ྗ͸CLIɻ

    View Slide

  27. $ db_diary.pl add_entry λΠτϧ1 ຊจ1
    $ db_diary.pl add_entry λΠτϧ2 ຊจ2
    $ db_diary.pl list_entry
    # [1] λΠτϧ1 : ຊจ1
    # [2] λΠτϧ2 : ຊจ2

    View Slide

  28. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    • MySQL
    • SQL
    • ݴޠ͔ΒDBΞΫηε
    • DBηΩϡϦςΟ
    • CLI
    DBͷ֓೦͚ͩΛֶ΂Δ

    View Slide

  29. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)

    View Slide

  30. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    DBͰӬଓ͞ΕͨϒϩάΛ
    Web্Ͱॻ͚ΔΑ͏ʹ͢Δ

    View Slide

  31. View Slide

  32. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    • HTTPɺURLઃܭɺWebαʔό
    • WebαʔϏεͷ࡞Γํ
    • WebͰͷηΩϡϦςΟ
    Webͷ֓೦͚ͩΛֶ΂Δ

    View Slide

  33. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)

    View Slide

  34. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    WebͰॻ͚ΔϒϩάΛ
    JSͰಈ͔ͯ͠࢖͍΍͘͢͢Δ

    View Slide

  35. • JSON APIΛ࢖ͬͨΦʔτϖʔδϟ
    • ͦͷ৔ฤू

    View Slide

  36. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    • JSͷجૅɺDOMͷجૅ
    • Πϕϯτۦಈ
    • JSON APIͰͷ࿈ܞ
    ϑϩϯτΤϯυͷ֓೦͚ͩΛֶ΂Δ

    View Slide

  37. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)

    View Slide

  38. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    εϚϗΤϯδχΞ޲͚ʹ͸͞Βʹ
    Swiftͷ՝୊΋ʂʂ

    View Slide

  39. ϓϩάϥϛϯάجૅ
    σʔλϕʔε
    WebΞϓϦέʔγϣϯ
    JS
    (εϚϗΞϓϦ։ൃ)
    1೔໨.
    2೔໨.
    3೔໨.
    4೔໨.

    View Slide

  40. ௿ϨΠϠʔ͔ΒͷੵΈॏͶͰ
    ஈ֊తʹ֓೦Λֶ΂Δ
    designed by Freepik

    View Slide

  41. ڭՊॻʹΑΔݚमऴྃ

    View Slide

  42. 2. ΦϦδφϧαʔϏε
    ͷ࡞੒

    View Slide

  43. ࣗ෼Ͱاըͯ͠
    ࣗ෼Ͱ࡞Δʂ

    View Slide

  44. ΦϦδφϧαʔϏε࡞੒
    શࣾһͷલͰൃද
    5-9೔໨.
    10೔໨.

    View Slide

  45. ΦϦδφϧαʔϏε࡞੒
    શࣾһͷલͰൃද
    5-9೔໨.
    10೔໨.
    • اը
    • UI
    • ػೳ։ൃͷྲྀΕ
    WebαʔϏε࡞੒ͷখ͞ͳ࣮ફ
    ڭՊॻͰֶΜͩ͜ͱΛ׆͔͢

    View Slide

  46. View Slide

  47. ΦϦδφϧαʔϏε࡞੒
    શࣾһͷલͰൃද
    5-9೔໨.
    10೔໨.

    View Slide

  48. શࣾһͷલͰൃද
    • ࣗ෼ͷαʔϏεΛΞϐʔϧ
    • ίʔυΛಡ·Εٕज़తʹ΋ಥͬࠐ·ΕΔ
    • ઈରʹηΩϡϦςΟϗʔϧΛ୳͞ΕΔ

    View Slide

  49. ΦϦδφϧαʔϏεͷ
    ࡞੒ऴྃ

    View Slide

  50. 3. ۀ຿Λ௨ͨ͡ݚम

    View Slide

  51. 1. ೉ͯ͘͠΋௅ઓͯ͠΋Β͏
    2. αϙʔτମ੍͸ॆ࣮ͤ͞Δ
    ߟ͑ํ

    View Slide

  52. 1.௅ઓͯ͠΋Β͏
    • ࣮ࡍʹಈ͍͍ͯΔαʔϏεΛ৮Δ
    • ͲΜͲΜ࢓ࣄΛ೚ͤΔ
    • ೉͍͠ۀ຿Ͱ΋௅ઓͯ͠΋Β͏

    View Slide

  53. ௅ઓ
    • ͦͷਓ͕ڵຯ͕͋Δ͜ͱ
    • ٕज़తʹ೉͍͠՝୊
    • ΤϯδχΞ͔Βͷӽڥ

    View Slide

  54. 2.αϙʔτମ੍Λॆ࣮
    • νʔϜϝϯλʔ
    • ίʔυϨϏϡʔ
    • γχΞΤϯδχΞ
    • ͦͷଞ

    View Slide

  55. νʔϜϝϯλʔ
    • νʔϜ಺Ͱڭҭ܎
    • ೋਓͰઃܭ૬ஊΛ͠ͳ͕Β։ൃ

    View Slide

  56. ίʔυϨϏϡʔ
    • ίʔυ͸GitHubͰϨϏϡʔ
    • ࢦఠΛडֶ͚ͯश͢Δ
    • ࣗ෼Ͱ΋ଞͷਓͷίʔυΛݟֶͯश

    View Slide

  57. γχΞΤϯδχΞ
    • νʔϜ֎ͷΤϯδχΞ͕Ұਓ෇͘
    • ΤϯδχΞͱͯ͠ͷํ޲ੑΛαϙʔτ

    View Slide

  58. ͦͷଞ
    • ϖΞϓϩ
    • ࣾ಺ษڧձ
    • ٕज़ॻࢧԉ
    • ߹॓
    • னٳΈ

    View Slide

  59. ۀ຿Λ௨ͨ͡ݚम͸
    ͍ͭ·Ͱ΋ଓ͘…

    View Slide

  60. ·ͱΊ

    View Slide

  61. 1. ͸ͯͳڭՊॻ
    2. ΦϦδφϧαʔϏε
    3. νʔϜ഑ଐ
    ݚमͷྲྀΕ

    View Slide

  62. ͸ͯͳͰ͸ര଎Ͱۀ຿ʹ
    ೖΕΔΑ͏޻෉͍ͯ͠·͢

    View Slide

  63. ௅ઓͰ͖Δ؀ڥΛ
    ἧ͍͑ͯ·͢

    View Slide

  64. 13
    • ͸ͯͳͰ͸௅ઓ͍ͨ͠ΤϯδχΞΛื
    ू͍ͯ͠·͢
    • http://hatenacorp.jp/recruit/fresh/

    View Slide