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

ApplaudHerJp.pdf

 ApplaudHerJp.pdf

Transcript

  1. ͓͍͠Έ͖͞!DPF@ .BS "QQMBVE)FS88$5PLZP 3BJMT(JSMT5PLZP 4FFNZl"$)*&7&.&/5z

  2. ࣗݾ঺հ ͓͍͠Έ͖͞!DPF@  ɾ8FCϓϩάϥϚྺ൒೥ͷ։ൃॳ৺ऀ  ɾגࣜձࣾΩϟλϧʹͯ ɹࢠڙ޲͚ӳޠֶश؅ཧγεςϜ$BUBMMPHͷ ɹ։ൃΛ୲౰ ɾઌ݄։࠵ͷ3BJMT(JSMT5PLZPʹ ɹίʔνͱͯ͠ࢀՃͤͯ͞௖͖·ͨ͠

  3. ࠓճͷςʔϚʜ 8PNBO8IP$PEF5PLZPͱ3BJMT(JSMTͰҰॹʹΠϕϯτΛ։࠵͍ͨ͠· ͢ʂ8PNBO8IP$PEFͰ͸"QQMBVE)FSͱ͍͏ɺʮ৽ٕ͘͠ज़৬ʹब ͍ͨʯʮঢਐͨ͠ʯʮΧϯϑΝϨϯεͰొஃͨ͠ʯʮ৽͍͠ϓϩάϥϛ ϯάݴޠΛֶशͨ͠ʯ౳ɺୡ੒ͨ͜͠ͱΛڞ༗ͯ͠শ͑߹͏Π ϕϯτΛߦ͍ͬͯ·͢ɻࠓճ͸8PNBO8IP$PEFɺ3BJMT(JSMTͷͦΕ ͧΕ͔Βܭਓͷঁੑ͕ొஃ͠·͢ɻ ࢀর"QQMBVE)FS&WFOUGFBUVSJOHXJUI3BJMT(JSMT5PLZP

  4. ࠓճͷςʔϚʜ ୡ੒

  5. 8FCϓϩάϥϚྺ൒೥ ·ͩԿ΋ ୡ੒͍ͯ͠ͳ͍ؾ͕͢Δʜ

  6. Θ͕ͨ͠ୡ੒͍ͨ͜͠ͱ ٕज़-5

  7. ͳͥʁ ʮܦݧ͸ઙ͘ͱ΋ɺ ɹɹҰਓͷϓϩάϥϚͱͯ͠ ɹɹٕज़ͷ͓࿩͕͍ͨ͠ʯ

  8. ͱ͍͏͜ͱͰࠓ͔Β "QQMBVE)FSͰٕज़-5Λ͢Δ ʜΛୡ੒͍ͨ͠ͱࢥ͍·͢

  9. 3VCZPO3BJMTͷ ιʔείʔυΛಡΜͰΈΔ ͓࿩ ͲΜͳ͓࿩ʁ

  10. 3VCZPO3BJMT 3VCZPO3BJMTʢϧϏʔΦϯϨΠϧζʣ͸ɺΦʔϓϯιʔεͷ8FCΞϓ ϦέʔγϣϯϑϨʔϜϫʔΫͰ͋Δɻ3P3·ͨ͸୯ʹ3BJMTͱݺ͹Ε Δɻͦͷ໊ʹ΋ࣔ͞Ε͍ͯΔΑ͏ʹ3VCZͰॻ͔Ε͍ͯΔɻ·ͨ.PEFM 7JFX$POUSPMMFSʢ.7$ʣΞʔΩςΫνϟʹج͍ͮͯߏங͞Ε͍ͯΔɻ ࢀরϑϦʔඦՊࣄయʰ΢ΟΩϖσΟΞʢ8JLJQFEJBʣʱ

  11. 3VCZPO3BJMT Ҿ༻ɿ%*7&*/50$0%&%*7& IUUQTEJWFSEJWFJOUPDPEFKQXFC@UFYUTEJWF .7$

  12. ͳͥʁ ᶃ3BJMTΞϓϦͰ։ൃ͍ͯ͠Δͱɺ ɹ಺෦࣮૷Λ஌Γ͍ͨॠ͕ؒ͋Δ ɹۤखҙࣝΛແ͓͖͍ͯͨ͘͠ ᶄ3VCZͱ3BJMTେ޷͖ ɹ޷͖ͳ΋ͷͷ͜ͱ͸΋ͬͱ஌Γ͍ͨ

  13. ͲͷΑ͏ʹʁ 5XJUUFS͔Βը૾Λ͓आΓ͠·ͨ͠ Ͳ͏΍ͬͯ 3BJMTͷιʔείʔυΛ ಡΊ͹ྑ͍Ͱ͠ΐ͏͔ʁ ࠷৽ͷ3BJMTΑΓ΋ 3BJMͷίʔυΛಡΉͷ͕ ͓͢͢ΊͰ͢ 3BJMTίϛολʔͷদా໌͞Μʹ࣭໰ͯ͠Έ·ͨ͠

  14. 3BJMTͱ͸ 3BJMTEJSFDUPSJFT pMFT  ŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠ MT BDUJPONBJMFS BDUJWFSFDPSE QVTIHFNTSC BDUJPOQBDL

     BDUJWFTVQQPSU  SBJMUJFT BDUJPOXFCTFSWJDF DMFBOMPHTTI SFMFBTFSC 3BJMTEJSFDUPSJFT pMFT ࠷৽ίϛοτ͸೥ ˞ͦͷ··Ͱ͸ಈ͖·ͤΜ MT #SFXpMF 3&"%.&NE  BDUJWFKPC  QBDLBHFKTPO $0%&@0'@$0/%6$5NE3&-&"4*/(@3"*-4NE BDUJWFNPEFM SBJMTHFNTQFD $0/53*#65*/(NE  3BLFpMF BDUJWFSFDPSE SBJMUJFT (FNpMF  BDUJPODBCMF  BDUJWFTUPSBHF  UBTLT (FNpMFMPDL BDUJPONBJMFS BDUJWFTVQQPSU  UPPMT .*5-*$&/4&  BDUJPOQBDL  DJ   WFSTJPOSC 3"*-4@7&34*0/ BDUJPOWJFX  HVJEFT
  15. 3BJMTͱ͸ 3BJMTEJSFDUPSJFT pMFT  ŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠŠ MT BDUJPONBJMFS BDUJWFSFDPSE QVTIHFNTSC BDUJPOQBDL

     BDUJWFTVQQPSU  SBJMUJFT BDUJPOXFCTFSWJDF DMFBOMPHTTI SFMFBTFSC 3BJMTEJSFDUPSJFT pMFT ࠷৽ίϛοτ͸೥ ˞ͦͷ··Ͱ͸ಈ͖·ͤΜ MT #SFXpMF 3&"%.&NE  BDUJWFKPC  QBDLBHFKTPO $0%&@0'@$0/%6$5NE3&-&"4*/(@3"*-4NE BDUJWFNPEFM SBJMTHFNTQFD $0/53*#65*/(NE  3BLFpMF BDUJWFSFDPSE SBJMUJFT (FNpMF  BDUJPODBCMF  BDUJWFTUPSBHF  UBTLT (FNpMFMPDL BDUJPONBJMFS BDUJWFTVQQPSU  UPPMT .*5-*$&/4&  BDUJPOQBDL  DJ   WFSTJPOSC 3"*-4@7&34*0/ BDUJPOWJFX  HVJEFT ίϯύΫτʂʂ
  16. ͩΕ͕ʁ Θͨ͠ͷϨϕϧײ ɹ ᶃϓϩάϥϛϯάྺ೥ϲ݄ ɹ ᶄීஈͷۀ຿Ͱ͸3BJMTΞϓϦͷ ɹ؆୯ͳػೳ௥Ճ΍վमΛ୲౰ ɹྫʣ"1*Λ࡞ͬͨΓ ɹɹɹ'PSN0CKFDUΛಋೖͨ͠Γ ɹ

    ᶅʮΦϒδΣΫτࢦ޲ઃܭ࣮ફΨΠυʯ ɹͬ͘͟Γׂ͘Β͍ͷཧղ
  17. ͋Β͔͡Ί΍͓͍ͬͯͨ͜ͱ ᶃ؆୯ͳHFNΛࣗ࡞ͯ͠ΈΔ ɹ‎HFNͷߏ଄ɺ࡞ΓํΛͬ͘͟Γ௫Ή ɹ ᶄখ͞ΊͷHFNͷιʔείʔυΛಡΜͰΈΔ ɹ‎ίʔυϦʔσΟϯάͷྲྀΕɺงғؾΛ௫Ή ɹ ᶅʮϝλϓϩάϥϛϯά3VCZʯΛͬ͘͟ΓಡΉ ɹ‎Ϋϥεͷߏ଄ಈతσΟεύονͱ͸FUD ɹɹϝλϓϩάϥϛϯάͰ

    ɹɹͲΜͳ͜ͱ͕Ͱ͖Δͷ͔ΛֶͿ ɹɹʢཧղ͕௥͍͍͍ͭͯ·ͤΜʜʣ
  18. ૣ଎΍ͬͯΈ·ͨ͠

  19. ࠓճ͸ͪ͜ΒΛௐ΂·͢ 3BJMTΞϓϦͷ 8FCϖʔδ΁ΞΫηεͨ͠ͱ͖ʹ ը໘͕දࣔ͞ΕΔ࢓૊Έ

  20. 3VCZPO3BJMT Ҿ༻ɿ%*7&*/50$0%&%*7& IUUQTEJWFSEJWFJOUPDPEFKQXFC@UFYUTEJWF ͜ͷลΓ͕ొ৔͠·͢ ‑

  21. 3VCZPO3BJMT Ҿ༻ɿ%*7&*/50$0%&%*7& IUUQTEJWFSEJWFJOUPDPEFKQXFC@UFYUTEJWF ͜ͷลΓ͕ొ৔͠·͢ ‑

  22. ஫ҙ⚠ ᶃͨ͘͞Μ༻ҙ͞Ε͍ͯΔํ๏ͷ͏ͪͷҰͭͱ ɹೝ͍͚ࣝͯͨͩ͠Δͱ޾͍Ͱ͢ɻ  ᶄ͔ͳΓ؆ུԽ͍ͯ͠·͢ɻ  ᶅݱࡏͷ3BJMTͰ͸࢖༻͞Ε͍ͯͳ͍ ɹٕज़ͷ͓࿩ؚ͕·Ε·͢ɻ  ᶆ͝ࢦఠɾΞυόΠεେ׻ܴͰ͢ʂʂ

  23. ͸͡Ίʹ ᶃ3BJMTͷιʔείʔυΛ(JU)VC͔ΒDMPOF  ᶄDESBJMT  ᶅλάΛWʹ੾Γସ͑Δ ɹHJUDIFDLPVUSFGTUBHTW  ᶆૣ଎ಡΜͰΈΔ

  24. ը໘Λඳը‎7JFX 'SPN%*7&*/50$0%&%*7& IUUQTEJWFSEJWFJOUPDPEFKQXFC@UFYUTEJWF

  25. WJFXΛදࣔ‎SFOEFSϝιουʁ

  26. WJFXΛදࣔ‎SFOEFSϝιουʁ BDUJPOQBDLMJCBDUJPO@WJFXCBTFSC module ActionView # … class Base # …

    def render(options = {}, old_local_assigns = {}) if options.is_a?(String) render_file(options, true, old_local_assigns) elsif options.is_a?(Hash) # optionsͷkeyʹԠͯ͡෼ذ # ෼ذઌ͸ render_file render_partial_collection render_partial render_template ɹɹɹͷ͍ͣΕ͔ͷϝιουΛݺͼग़͍ͯ͠Δ end end end end ‏WJFXͱ͍͏໊લ͕͍͍ͭͯΔϑΝΠϧΛݟͯΈΔ
  27. WJFXΛදࣔ‎SFOEFSϝιουʁ BDUJPOQBDLMJCBDUJPO@WJFXCBTFSC module ActionView # … class Base # …

    def render(options = {}, old_local_assigns = {}) if options.is_a?(String) render_file(options, true, old_local_assigns) elsif options.is_a?(Hash) # optionsͷkeyʹԠͯ͡෼ذ # ෼ذઌ͸ render_file render_partial_collection render_partial render_template ɹɹɹͷ͍ͣΕ͔ͷϝιουΛݺͼग़͍ͯ͠Δ end end end end ‏WJFXͱ͍͏໊લ͕͍͍ͭͯΔϑΝΠϧΛݟͯΈΔ ‏SFOEFSϝιου
  28. WJFXΛදࣔ‎SFOEFSϝιουʁ BDUJPOQBDLMJCBDUJPO@WJFXCBTFSC module ActionView # … class Base # …

    def render(options = {}, old_local_assigns = {}) if options.is_a?(String) render_file(options, true, old_local_assigns) elsif options.is_a?(Hash) # optionsͷkeyʹԠͯ͡෼ذ # ෼ذઌ͸ render_file render_partial_collection render_partial render_template ɹɹɹͷ͍ͣΕ͔ͷϝιουΛݺͼग़͍ͯ͠Δ end end end end ‏WJFXͱ͍͏໊લ͕͍͍ͭͯΔϑΝΠϧΛݟͯΈΔ ‏SFOEFSϝιου ‐ ࠷ऴతʹSFOEFS@UFNQMBUFΛݺͼग़͍ͯ͠Δ ‑
  29. WJFXΛදࣔ‎SFOEFSϝιουʁ BDUJPOQBDLMJCBDUJPO@WJFXCBTFSC module ActionView # … class Base # …

    def render(options = {}, old_local_assigns = {}) if options.is_a?(String) render_file(options, true, old_local_assigns) elsif options.is_a?(Hash) # optionsͷkeyʹԠͯ͡෼ذ # ෼ذઌ͸ render_file render_partial_collection render_partial render_template ɹɹɹͷ͍ͣΕ͔ͷϝιουΛݺͼग़͍ͯ͠Δ end end end end ‏ͪΐͬͱಛघͳͷͰআ֎ ‏WJFXͱ͍͏໊લ͕͍͍ͭͯΔϑΝΠϧΛݟͯΈΔ ‏SFOEFSϝιου ‐ ࠷ऴతʹSFOEFS@UFNQMBUFΛݺͼग़͍ͯ͠Δ ‑
  30. WJFXΛදࣔ‎SFOEFSϝιουʁ BDUJPOQBDLMJCBDUJPO@WJFXCBTFSC module ActionView # … class Base # …

    def render(options = {}, old_local_assigns = {}) if options.is_a?(String) render_file(options, true, old_local_assigns) elsif options.is_a?(Hash) # optionsͷkeyʹԠͯ͡෼ذ # ෼ذઌ͸ render_file render_partial_collection render_partial render_template ɹɹɹͷ͍ͣΕ͔ͷϝιουΛݺͼग़͍ͯ͠Δ end end end end ‏ͪΐͬͱಛघͳͷͰআ֎ ‏͜ͷϝιουͷத਎͸ʁ ‏WJFXͱ͍͏໊લ͕͍͍ͭͯΔϑΝΠϧΛݟͯΈΔ ‏SFOEFSϝιου ‐ ࠷ऴతʹSFOEFS@UFNQMBUFΛݺͼग़͍ͯ͠Δ ‑
  31. SFOEFS@UFNQMBUFϝιουҎ߱ BDUJPOQBDLMJCBDUJPO@WJFXCBTFSC module ActionView # … class Base # …

    def render_template(…) # Ҿ਺Ͱ༩͑ΒΕͨ৚݅ʹΑͬͯ෼ذ͍ͯ͠Δ # ࠷ऴతʹcompile_and_render_templateͱ͍͏ϝιουΛݺͼग़͍ͯ͠Δ end end ɹ ɹ ɹ ‏ઌ΄Ͳͱಉ͡ϑΝΠϧ ‏SFOEFS@UFNQMBUFϝιου
  32. SFOEFS@UFNQMBUFϝιουҎ߱ BDUJPOQBDLMJCBDUJPO@WJFXCBTFSC module ActionView # … class Base # …

    def render_template(…) # Ҿ਺Ͱ༩͑ΒΕͨ৚݅ʹΑͬͯ෼ذ͍ͯ͠Δ # ࠷ऴతʹcompile_and_render_templateͱ͍͏ϝιουΛݺͼग़͍ͯ͠Δ end end ɹ ɹ ɹ ɹ def compile_and_render_template(…) # viewʹදࣔ͢ΔͨΊͷςϯϓϨʔτΛ࡞੒ end # viewͷϑΝΠϧύεͱදࣔ͢ΔςϯϓϨʔτΛࢦఆ ‏ઌ΄Ͳͱಉ͡ϑΝΠϧ ‏SFOEFS@UFNQMBUFϝιου
  33. SFOEFS@UFNQMBUFϝιουҎ߱ BDUJPOQBDLMJCBDUJPO@WJFXCBTFSC module ActionView # … class Base # …

    def render_template(…) # Ҿ਺Ͱ༩͑ΒΕͨ৚݅ʹΑͬͯ෼ذ͍ͯ͠Δ # ࠷ऴతʹcompile_and_render_templateͱ͍͏ϝιουΛݺͼग़͍ͯ͠Δ end end ɹ ɹ ɹ ɹ def compile_and_render_template(…) # viewʹදࣔ͢ΔͨΊͷςϯϓϨʔτΛ࡞੒ end # viewͷϑΝΠϧύεͱදࣔ͢ΔςϯϓϨʔτΛࢦఆ ‎SFOEFS͕ݺ͹ΕΔ ‎SFOEFS@UFNQMBUF͕ݺ͹ΕΔ ‎DPNQJMF@BOE@SFOEFS@UFNQMBUF͕ݺ͹ΕΔ ‎ը໘ඳը͕׬ྃʂ ‏ઌ΄Ͳͱಉ͡ϑΝΠϧ ‏SFOEFS@UFNQMBUFϝιου
  34. ࠷ॳͷ SFOEFSϝιου͸ Ͳ͔͜Βݺ͹Ε͍ͯΔʁ

  35. SFOEFSϝιου͸Ͳ͔͜Βݺ͹Ε͍ͯΔʁ ɾಉ͡"DUJPO7JFX#BTFΫϥεͷதͰ͸ ɹݺͼग़͞Ε͍ͯͳ͔ͬͨ ɾ͜Ε͸ΠϯελϯεϝιουͳͷͰɺ ɹͲ͔͜Ͱ"DUJPO7JFX#BTFΫϥεͷΠϯελϯεʹରͯ͠ ɹݺͼग़͞Ε͍ͯΔ͸ͣ ɹ ‎ͱ͍͏͜ͱ͸ɺ ɹͲ͔͜Ͱ"DUJPO7JFX#BTFΫϥεͷ ɹΠϯελϯε͕

    ɹੜ੒͞Ε͍ͯΔ͸ͣ
  36. 'SPN%*7&*/50$0%&%*7& IUUQTEJWFSEJWFJOUPDPEFKQXFC@UFYUTEJWF Կ͔Λൃݟ

  37. Կ͔Λൃݟ BDUJPOQBDLMJCBDUJPO@DPOUSPMMFSCBTFSC module ActionController # … class Base # …

    private def self.view_class unless @view_class @view_class = Class.new(ActionView::Base) @view_class.send(:include, master_helper_module) end @view_class end # … end end ɹ ɹ ɹ ɹ ɹɹ ‏BDUJPO@DPOUSPMMFSͱ͍͏ϑΝΠϧͷத
  38. Կ͔Λൃݟ BDUJPOQBDLMJCBDUJPO@DPOUSPMMFSCBTFSC module ActionController # … class Base # …

    private def self.view_class unless @view_class @view_class = Class.new(ActionView::Base) @view_class.send(:include, master_helper_module) end @view_class end # … end end ɹ ɹ ɹ ɹ ɹ ɹ"DUJPO7JFX#BTFΫϥεΛܧঝ͢Δ ‏ແ໊ΫϥεΛੜ੒ ‏BDUJPO@DPOUSPMMFSͱ͍͏ϑΝΠϧͷத
  39. Կ͔Λൃݟ BDUJPOQBDLMJCBDUJPO@DPOUSPMMFSCBTFSC module ActionController # … class Base # …

    private def self.view_class unless @view_class @view_class = Class.new(ActionView::Base) @view_class.send(:include, master_helper_module) end @view_class end # … end end ɹ ɹ ɹ ɹ ɹ ɹ"DUJPO7JFX#BTFΫϥεΛܧঝ͢Δ ‏ແ໊ΫϥεΛੜ੒ ‏BDUJPO@DPOUSPMMFSͱ͍͏ϑΝΠϧͷத ‎TFMGWJFX@DMBTTϝιου͸ ɹͲ͔͜Βݺ͹Ε͍ͯΔʁ ‏
  40. TFMGDMBTTWJFX@DMBTTϝιου͸Ͳ͔͜Βݺ͹Ε͍ͯΔʁ BDUJPOQBDLMJCBDUJPO@DPOUSPMMFSCBTFSC module ActionController # … class Base # …

    private def initialize_template_class(response) # … response.template = self.class.view_class.new(…) # … end # … end end ɹ ɹ ɹ ɹ ɹ ɹ ɹ ‏ઌ΄Ͳͱಉ͡ϑΝΠϧ
  41. TFMGDMBTTWJFX@DMBTTϝιου͸Ͳ͔͜Βݺ͹Ε͍ͯΔʁ BDUJPOQBDLMJCBDUJPO@DPOUSPMMFSCBTFSC module ActionController # … class Base # …

    private def initialize_template_class(response) # … response.template = self.class.view_class.new(…) # … end # … end end ɹ ɹ ɹ ɹ ɹ ɹ ɹ ˞͜͜Ͱ"DUJPO7JFX#BTFΫϥεΛܧঝ͢Δແ໊ΫϥεͷΠϯελϯεΛੜ੒ ‎"DUJPO7JFX#BTFSFOEFSϝιουΛݺͼग़ͤΔΑ͏ʹͳΔ ‏ઌ΄Ͳͱಉ͡ϑΝΠϧ
  42. TFMGDMBTTWJFX@DMBTTϝιου͸Ͳ͔͜Βݺ͹Ε͍ͯΔʁ BDUJPOQBDLMJCBDUJPO@DPOUSPMMFSCBTFSC module ActionController # … class Base # …

    private def initialize_template_class(response) # … response.template = self.class.view_class.new(…) # … end # … end end ɹ ɹ ɹ ɹ ɹ ɹ ɹ ˞͜͜Ͱ"DUJPO7JFX#BTFΫϥεΛܧঝ͢Δແ໊ΫϥεͷΠϯελϯεΛੜ੒ ‎"DUJPO7JFX#BTFSFOEFSϝιουΛݺͼग़ͤΔΑ͏ʹͳΔ ‏ઌ΄Ͳͱಉ͡ϑΝΠϧ ͜ͷޙͷॲཧͷྲྀΕʜ ɹᶃಉ͡"DUJPO$POUSPMMFS#BTFΫϥεͷதʹ ɹɹSFOEFS ಉ໊ ͱ͍͏ϝιου͕ఆٛ͞Ε͍ͯΔ ɹᶄSFOEFSϝιουͷதͰɺ ɹɹ"DUJPO7JFX#BTFSFOEFSϝιουΛݺͿ
  43. TFMGDMBTTWJFX@DMBTTϝιου͸Ͳ͔͜Βݺ͹Ε͍ͯΔʁ BDUJPOQBDLMJCBDUJPO@DPOUSPMMFSCBTFSC module ActionController # … class Base # …

    private def initialize_template_class(response) # … response.template = self.class.view_class.new(…) # … end # … end end ɹ ɹ ɹ ɹ ɹ ɹ ɹ ˞͜͜Ͱ"DUJPO7JFX#BTFΫϥεΛܧঝ͢Δແ໊ΫϥεͷΠϯελϯεΛੜ੒ ‎"DUJPO7JFX#BTFSFOEFSϝιουΛݺͼग़ͤΔΑ͏ʹͳΔ ‏ઌ΄Ͳͱಉ͡ϑΝΠϧ ͜ͷޙͷॲཧͷྲྀΕʜ ɹᶃಉ͡"DUJPO$POUSPMMFS#BTFΫϥεͷதʹ ɹɹSFOEFS ಉ໊ ͱ͍͏ϝιου͕ఆٛ͞Ε͍ͯΔ ɹᶄSFOEFSϝιουͷதͰɺ ɹɹ"DUJPO7JFX#BTFSFOEFSϝιουΛݺͿ ‎JOJUJBMJ[F@UFNQMBUF@DMBTTϝιου͸Ͳ͔͜Βʢུʣ ‏
  44. ϝιουΛḪΔཱྀ ɾ"DUJPO$POUSPMMFS#BTFJOJUJBMJ[F@UFNQMBUF@DMBTT ‎"DUJPO$POUSPMMFS#BTFΫϥεͷQSPDFTTͱ͍͏ ɹɹϝιου͔Βݺͼग़͞Ε͍ͯΔ ‑ /05'06/%⛔ ɾ%JTQBUDI4FSWMFUTFSWJDF ‑

  45. QSPDFTTϝιου͸Ͳ͔͜Βݺ͹Ε͍ͯΔʁ ϝιου໊ QSPDFTT ͰHSFQͯ͠Έ·ͨ͠ $ grep -r ‘process(request, response)’ ./*

    ※rails σΟϨΫτϦ௚Լ … ./railties/lib/dispatcher.rb: ActionController::Routing::Routes.recognize!(request) .process(request, response) .out(output) … ※վߦ͍ͯ͠·͢ ‐͋΍͍͠Կ͔Λൃݟ QSPDFTT͕ݺͼग़͞Ε͍ͯΔ௚લͷSFDPHOJ[FϝιουͷதͰ "DUJPO$POUSPMMFS#BTFΫϥεʹؔΘΔૢ࡞͕͋Δ͸ͣ
  46. SFDPHOJ[FϝιουͷதΛݟʹߦ͖·͢ 'SPN%*7&*/50$0%&%*7& IUUQTEJWFSEJWFJOUPDPEFKQXFC@UFYUTEJWF

  47. BDUJPOQBDLMJCBDUJPO@DPOUSPMMFSSPVUJOHSC module ActionController module Routing class RouteSet # … def

    recognize(request) string_path = request.path # … path = string_path.split ‘/’ # … hash = recognize_path(path) # … controller = hash[‘controller’] # … controller.new end alias :recognize! :recognize end end ɹ ɹ SFDPHOJ[FϝιουͷதΛݟʹߦ͖·͢ ‏SPVUJOH͕ఆٛ͞Ε͍ͯΔϑΝΠϧ
  48. BDUJPOQBDLMJCBDUJPO@DPOUSPMMFSSPVUJOHSC module ActionController module Routing class RouteSet # … def

    recognize(request) string_path = request.path # … path = string_path.split ‘/’ # … hash = recognize_path(path) # … controller = hash[‘controller’] # … controller.new end alias :recognize! :recognize end end ɹ ɹ ‏$POUSPMMFSΒ͖͠΋ͷ͕ΠϯελϯεԽ͞Ε͍ͯΔʂ ‏SFDPHOJ[F͸SFDPHOJ[FͷΤΠϦΞε SFDPHOJ[FϝιουͷதΛݟʹߦ͖·͢ ‏SPVUJOH͕ఆٛ͞Ε͍ͯΔϑΝΠϧ
  49. ͭ·Γ͜͏ SBJMUJFTMJCEJTQBUDIFSSC class Dispatcher class << self def dispatch(…) #

    … ActionController::Routing::Routes.recognize!(request) .process(request, response) .out(output) #… end end end ɹ ɹ ɹ ɹ ɹ ɹ ‏QSPDFTTϝιου͕ݟ͔ͭͬͨϑΝΠϧ
  50. ͭ·Γ͜͏ SBJMUJFTMJCEJTQBUDIFSSC class Dispatcher class << self def dispatch(…) #

    … ActionController::Routing::Routes.recognize!(request) .process(request, response) .out(output) #… end end end ɹ ɹ ɹ ɹ ɹ ɹ ‐"DUJPO$POUSPMMFS#BTFͷΠϯελϯεੜ੒ ‐"DUJPO$POUSPMMFS#BTFQSPDFTTϝιου࣮ߦ ‐ͦͷଞͷॲཧ ‏QSPDFTTϝιου͕ݟ͔ͭͬͨϑΝΠϧ
  51. ͭ·Γ͜͏ SBJMUJFTMJCEJTQBUDIFSSC class Dispatcher class << self def dispatch(…) #

    … ActionController::Routing::Routes.recognize!(request) .process(request, response) .out(output) #… end end end ɹ ɹ ɹ ɹ ɹ ɹ ‐"DUJPO$POUSPMMFS#BTFͷΠϯελϯεੜ੒ ‐"DUJPO$POUSPMMFS#BTFQSPDFTTϝιου࣮ߦ ‐ͦͷଞͷॲཧ ͜͜Ͱ΍͍ͬͯΔ͜ͱʜ ᶃSFDPHOJ[F‎63-ͱ$POUSPMMFSΛੜ੒ ᶄQSPDFTT‎ΞΫγϣϯ ͲΜͳૢ࡞Λߦ͏͔ ͷੜ੒ͱݺͼग़͠ ‏QSPDFTTϝιου͕ݟ͔ͭͬͨϑΝΠϧ
  52. ͭ·Γ͜͏ SBJMUJFTMJCEJTQBUDIFSSC class Dispatcher class << self def dispatch(…) #

    … ActionController::Routing::Routes.recognize!(request) .process(request, response) .out(output) #… end end end ɹ ɹ ɹ ɹ ɹ ɹ ‐"DUJPO$POUSPMMFS#BTFͷΠϯελϯεੜ੒ ‐"DUJPO$POUSPMMFS#BTFQSPDFTTϝιου࣮ߦ ‐ͦͷଞͷॲཧ ͜͜Ͱ΍͍ͬͯΔ͜ͱʜ ᶃSFDPHOJ[F‎63-ͱ$POUSPMMFSΛੜ੒ ᶄQSPDFTT‎ΞΫγϣϯ ͲΜͳૢ࡞Λߦ͏͔ ͷੜ੒ͱݺͼग़͠ ‏QSPDFTTϝιου͕ݟ͔ͭͬͨϑΝΠϧ ‎EJTQBUDIϝιου͸Ͳ͔͜Βݺ͹Ε͍ͯΔʁ ‏
  53. ϝιουΛḪΔཱྀɺ;ͨͨͼ ɾ%JTQBUDIFSEJTQBUDI ‎%JTQBUDI4FSWMFUΫϥε SBJMUJFTMJCXFCSJDL@TFSWFSSC ͷ ɹɹIBOEMF@EJTQBUDIͱ͍͏Πϯελϯεϝιου /05'06/%⛔ ‑ ɾ%JTQBUDI4FSWMFUIBOEMF@EJTQBUDI ‎ಉ͡%JTQBUDI4FSWMFUΫϥεͷ

    ɹɹTFSWJDFͱ͍͏Πϯελϯεϝιου ‑ ɾ%JTQBUDI4FSWMFUTFSWJDF ‑
  54. TFSWJDFϝιου͸Ͳ͔͜Βݺ͹Ε͍ͯΔʁ Ϋϥε໊ %JTQBUDI4FSWMFU ͰHSFQͯ͠Έ·ͨ͠ ‐͋΍͍͠Կ͔Λൃݟ $ grep -r ‘DispatchServlet’ ./*

    ※rails σΟϨΫτϦ௚Լ … ./railties/lib/webrick_server.rb: server.mount(‘/’, DispatchServlet, option) ※վߦ͍ͯ͠·͢ %JTQBUDI4FSWMFUΫϥε͕ݺ͹Ε͍ͯΔ SBJMUJFTMJCXFCSJDL@TFSWFSSCΛݟʹ͍͖·͢
  55. SBJMUJFTMJCXFCSJDL@TFSWFSSC 'SPN%*7&*/50$0%&%*7& IUUQTEJWFSEJWFJOUPDPEFKQXFC@UFYUTEJWF

  56. 8&#SJDL͕ొ৔ SBJMUJFTMJCXFCSJDL@TFSWFSSC class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet # … def self.dispatch(…)

    # … server = WEBrick::HTTPServer.new(…) server.mount(‘/’, DispatchServlet, options) # … end end end ɹ ɹ ɹ %JTQBUDI4FSWMFUΫϥε ʜ8&#SJDL)5514FSWMFU"CTUSBDU4FSWMFUΛܧঝͨ͠Ϋϥε
  57. 8&#SJDL͕ొ৔ SBJMUJFTMJCXFCSJDL@TFSWFSSC class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet # … def self.dispatch(…)

    # … server = WEBrick::HTTPServer.new(…) server.mount(‘/’, DispatchServlet, options) # … end end end ɹ ɹ ɹ ‐8&#SJDLͱ͸ʁ)551αʔόʔϑϨʔϜϫʔΫ ɹ֎෦ϥΠϒϥϦ͔ΒαʔόʔͷػೳΛܧঝ͍ͯ͠Δ ‑8&#SJDLΠϯελϯεΛੜ੒ %JTQBUDI4FSWMFUΫϥε ʜ8&#SJDL)5514FSWMFU"CTUSBDU4FSWMFUΛܧঝͨ͠Ϋϥε
  58. 8&#SJDL͕ొ৔ SBJMUJFTMJCXFCSJDL@TFSWFSSC class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet # … def self.dispatch(…)

    # … server = WEBrick::HTTPServer.new(…) server.mount(‘/’, DispatchServlet, options) # … end end end ɹ ɹ ɹ ‐8&#SJDLͱ͸ʁ)551αʔόʔϑϨʔϜϫʔΫ ɹ֎෦ϥΠϒϥϦ͔ΒαʔόʔͷػೳΛܧঝ͍ͯ͠Δ ‑8&#SJDLΠϯελϯεΛੜ੒ ‏8&#SJDLΠϯελϯε͕ ɹNPVOUϝιουΛݺͼग़͠ %JTQBUDI4FSWMFUΫϥε ʜ8&#SJDL)5514FSWMFU"CTUSBDU4FSWMFUΛܧঝͨ͠Ϋϥε
  59. 8&#SJDL͕ొ৔ SBJMUJFTMJCXFCSJDL@TFSWFSSC class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet # … def self.dispatch(…)

    # … server = WEBrick::HTTPServer.new(…) server.mount(‘/’, DispatchServlet, options) # … end end end ɹ ɹ ɹ ‐8&#SJDLͱ͸ʁ)551αʔόʔϑϨʔϜϫʔΫ ɹ֎෦ϥΠϒϥϦ͔ΒαʔόʔͷػೳΛܧঝ͍ͯ͠Δ ‑8&#SJDLΠϯελϯεΛੜ੒ ‏8&#SJDLΠϯελϯε͕ ɹNPVOUϝιουΛݺͼग़͠ %JTQBUDI4FSWMFUΫϥε ʜ8&#SJDL)5514FSWMFU"CTUSBDU4FSWMFUΛܧঝͨ͠Ϋϥε ‎NPVOUϝιουʁʁʁ
  60. 8&#SJDLͷ࢖͍ํΛ֬ೝͯ͠ΈΔʜ Ҿ༻ɿ3VCZϦϑΝϨϯεϚχϡΞϧ IUUQTEPDTSVCZMBOHPSHKBMBUFTUMJCSBSZXFCSJDLIUNM

  61. 8&#SJDLͷ࢖͍ํΛ֬ೝͯ͠ΈΔʜ Ҿ༻ɿ3VCZϦϑΝϨϯεϚχϡΞϧ IUUQTEPDTSVCZMBOHPSHKBMBUFTUMJCSBSZXFCSJDLIUNM ίʔυྫɿ ղઆɿ

  62. 8&#SJDLͷ࢖͍ํΛ֬ೝͯ͠ΈΔʜ Ҿ༻ɿ3VCZϦϑΝϨϯεϚχϡΞϧ IUUQTEPDTSVCZMBOHPSHKBMBUFTUMJCSBSZXFCSJDLIUNM ίʔυྫɿ ղઆɿ ‑ઌ΄Ͳͷίʔυͱ΄΅ಉ͡ ᶃ63-ͱ8&#SJDLΛܧঝͨ͠Ϋϥε͕ඥ෇͚ΒΕΔ ᶄ63-ʹΞΫηε͕͋Δͨͼɺαʔόʔͷ৘ใΛݩʹΫϥεͷΠϯελϯεΛੜ੒ ᶅΠϯελϯε͕TFSWJDFϝιουΛݺͿ ᶆΠϯελϯε͕αʔόʔͷ৘ใΛݩʹॲཧΛ࣮ߦ

  63. 8&#SJDLͷ࢖͍ํΛ֬ೝͯ͠ΈΔʜ ໰୊ͷՕॴɿ ᶅΠϯελϯε͕TFSWJDFϝιουΛݺͿ 

  64. ͭ·Γʜ ᶃ8&#SJDLαʔόʔ͕ ɹ%JTQBUDI4FSWMFUΫϥεͱඥ෇͚ΒΕΔ  ᶄ63-ʹରͯ͠ΞΫηε͕ൃੜ͢Δͱɺ ɹ%JTQBUDI4FSWMFUΫϥεͷΠϯελϯε͕ ɹੜ੒͞ΕΔ  ᶅᶄͷΠϯελϯε͕ ɹ%JTQBUDI4FSWMFUΫϥεͰఆٛ͞Ε͍ͯΔ

    ɹTFSWJDFϝιουΛݺͿ ɹ‎͜ͷޙͷҰ࿈ͷྲྀΕʹͭͳ͕Δ
  65. ࠷ޙͷٙ໰ SBJMUJFTMJCXFCSJDL@TFSWFSSC class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet # … def self.dispatch(…)

    # … server = Webrick::HTTPServer.new(…) server.mount(‘/’, DispatchServlet, options) # … end end end ɹ ɹ ɹ ɹ ɹ ɹ ɹ ‏ઌ΄ͲͷϑΝΠϧ EJTQBUDIϝιου͸ Ͳ͔͜Βݺ͹ΕΔʁ ‏
  66. ࠷ޙͷٙ໰ SBJMUJFTMJCDPNNBOETXFCSJDLSC SFRVJSFbXFCSJDL` # … OPTIONS = { :port =>

    3000, :ip => “0.0.0.0", # … } # … puts “=> Rails Apprication started on http://#{OPTIONS[:ip]}:#{OPTIONS[:PORT]}” puts “=> Ctrl-C to Shutdown server; call with —help for options” if OPTIONS[:server_type] == WEBrick::SimpleServer DispatchServlet.dispatch(OPTIONS) ɹ ɹ ɹ ɹ ɹ ɹ ɹ ‏3BJMTͷίϚϯυ͕ఆٛ͞Ε͍ͯΔσΟϨΫτϦͷத
  67. ࠷ޙͷٙ໰ SBJMUJFTMJCDPNNBOETXFCSJDLSC SFRVJSFbXFCSJDL` # … OPTIONS = { :port =>

    3000, :ip => “0.0.0.0", # … } # … puts “=> Rails Apprication started on http://#{OPTIONS[:ip]}:#{OPTIONS[:PORT]}” puts “=> Ctrl-C to Shutdown server; call with —help for options” if OPTIONS[:server_type] == WEBrick::SimpleServer DispatchServlet.dispatch(OPTIONS) ɹ ɹ ɹ ɹ ɹ ɹ ɹ ‏3BJMTͷίϚϯυ͕ఆٛ͞Ε͍ͯΔσΟϨΫτϦͷத
  68. ࠷ޙͷٙ໰ SBJMUJFTMJCDPNNBOETXFCSJDLSC SFRVJSFbXFCSJDL` # … OPTIONS = { :port =>

    3000, :ip => “0.0.0.0", # … } # … puts “=> Rails Apprication started on http://#{OPTIONS[:ip]}:#{OPTIONS[:PORT]}” puts “=> Ctrl-C to Shutdown server; call with —help for options” if OPTIONS[:server_type] == WEBrick::SimpleServer DispatchServlet.dispatch(OPTIONS) ɹ ɹ ɹ ɹ ɹ ɹ ɹ ‏3BJMTͷίϚϯυ͕ఆٛ͞Ε͍ͯΔσΟϨΫτϦͷத ‑ݟ֮͑ͷ͋Δهड़
  69. ࠷ޙͷٙ໰ SBJMUJFTMJCDPNNBOETXFCSJDLSC SFRVJSFbXFCSJDL` # … OPTIONS = { :port =>

    3000, :ip => “0.0.0.0", # … } # … puts “=> Rails Apprication started on http://#{OPTIONS[:ip]}:#{OPTIONS[:PORT]}” puts “=> Ctrl-C to Shutdown server; call with —help for options” if OPTIONS[:server_type] == WEBrick::SimpleServer DispatchServlet.dispatch(OPTIONS) ɹ ɹ ɹ ɹ ɹ ɹ ɹ ‏3BJMTͷίϚϯυ͕ఆٛ͞Ε͍ͯΔσΟϨΫτϦͷத ‎ΞϓϦέʔγϣϯαʔόʔΛىಈ͢Δ SBJMTTFSWFS ‑ݟ֮͑ͷ͋Δهड़
  70. ࠷ޙͷٙ໰ SBJMUJFTMJCDPNNBOETXFCSJDLSC SFRVJSFbXFCSJDL` # … OPTIONS = { :port =>

    3000, :ip => “0.0.0.0", # … } # … puts “=> Rails Apprication started on http://#{OPTIONS[:ip]}:#{OPTIONS[:PORT]}” puts “=> Ctrl-C to Shutdown server; call with —help for options” if OPTIONS[:server_type] == WEBrick::SimpleServer DispatchServlet.dispatch(OPTIONS) ɹ ɹ ɹ ɹ ɹ ɹ ɹ ‏3BJMTͷίϚϯυ͕ఆٛ͞Ε͍ͯΔσΟϨΫτϦͷத ‎ΞϓϦέʔγϣϯαʔόʔΛىಈ͢Δ SBJMTTFSWFS ‎%JTQBUDI4FSWMFUEJTQBUDI͕ࣗಈతʹ࣮ߦ͞ΕΔ ‑ݟ֮͑ͷ͋Δهड़
  71. ࠷ޙͷٙ໰ SBJMUJFTMJCDPNNBOETXFCSJDLSC SFRVJSFbXFCSJDL` # … OPTIONS = { :port =>

    3000, :ip => “0.0.0.0", # … } # … puts “=> Rails Apprication started on http://#{OPTIONS[:ip]}:#{OPTIONS[:PORT]}” puts “=> Ctrl-C to Shutdown server; call with —help for options” if OPTIONS[:server_type] == WEBrick::SimpleServer DispatchServlet.dispatch(OPTIONS) ɹ ɹ ɹ ɹ ɹ ɹ ɹ ‎63-ʹΞΫηε͕ൃੜ͢Δͨͼʹ ɹը໘͕ඳը͞ΕΔ ‏3BJMTͷίϚϯυ͕ఆٛ͞Ε͍ͯΔσΟϨΫτϦͷத ‎ΞϓϦέʔγϣϯαʔόʔΛىಈ͢Δ SBJMTTFSWFS ‎%JTQBUDI4FSWMFUEJTQBUDI͕ࣗಈతʹ࣮ߦ͞ΕΔ ‑ݟ֮͑ͷ͋Δهड़
  72. ͓ർΕ༷Ͱͨ͠ 

  73. ײ૝ ೉͍͠

  74. ײ૝ Ͱ΋ ָ͍͠

  75. ࠓճͷ੒Ռ ᶃίʔυϦʔσΟϯάͷྲྀΕΛ௫Μͩ ɹɾ֬ೝ͍ͨ͠ಈ࡞͔ΒϝιουΛ্Լʹḷ͍ͬͯ͘ ɹɾҰߦҰߦஸೡʹಡΉͷͰ͸ͳ͘ɺ ɹɹ·ͣ͸ͬ͘͟ΓͱશମͷྲྀΕΛ௫Ή ɹɾϝλϓϩάϥϛϯά΁ͷ଄ܮ͕૬౰ٻΊΒΕΔ ɹ ᶄιʔείʔυΛಡΉ͜ͱ΁ͷ఍߅ײ͕ݮͬͨɹɹ ɹ ᶅ3BJMTͷଚ͕͞Θ͔ͬͨ

  76. ࠓޙͷ՝୊ ᶃࠓճಡΊͳ͔ͬͨϞσϧपΓͷॲཧΛಡΉ ɹ ᶄ΋ͬͱܰྔͳϑϨʔϜϫʔΫͷ ɹιʔείʔυΛࣸܦͯ͠ΈΔ ɹʢ8FCΞϓϦέʔγϣϯΛ ɹɹ࣮ݱ͢Δ࢓૊ΈΛཧղ͢Δʣ ɹ ᶅʮϝλϓϩάϥϛϯά3VCZʯΛ͔ͬ͠Γ΍Δ

  77. ͱ͍͏͜ͱͰ "QQMBVE)FSͰٕज़-5Λ͢Δ ୡ੒Ͱ͖·ͨ͠

  78. օ͞Μͷୡ੒ͨ͜͠ͱ΋ ͥͻฉ͔͍ͤͯͩ͘͞,

  79. 4QFDJBM5IBOLT ࠓճͷൃදͷ͖͔͚ͬͱखॿ͚Λͩͬͨ͘͞ํʑ ɹ ɹɹদా໌͞Μ ɹɹେ૔խ࢙͞Μ ɹɹͶ͜͞Μ "TBLVTBSC ɹɹ5BNBSC ɹ ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ---

  80. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ