Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
My TDD Speaker: େխ࢙ Event: େߐށRubyձٞ08 Date: 2020-02-11
Slide 2
Slide 2 text
ϝλ • εϥΠυຕɿ44ຕ • ൃද࣌ؒɿ20 • σϞɿ༗Γ
Slide 3
Slide 3 text
okuramasafumi.inspect • ໊લɿେխ࢙ • ॴଐɿϑϦʔϥϯε • ίϛϡχςΟɿGrow.rbओ࠵ɺͦͷଞଟࢀՃ • Rubyྺɿ7 • झຯɿϓϩάϥϛϯάɺొஃɺᘖᘣɺӳޠ
Slide 4
Slide 4 text
࣍ 1. My TDD (first part) 2. My gem 3. My TDD (second part) 4. ࠂ
Slide 5
Slide 5 text
1. My TDD (first part)
Slide 6
Slide 6 text
झຯɿϓϩάϥϛϯά
Slide 7
Slide 7 text
ϓϩάϥϛϯάָ͍͠
Slide 8
Slide 8 text
Ͱɺଞʹ༠͕ଟ͍
Slide 9
Slide 9 text
ͦ͜Ͱ…
Slide 10
Slide 10 text
TDD ➡
Slide 11
Slide 11 text
TDD ➡ Todan Driven Development
Slide 12
Slide 12 text
झຯɿొஃ
Slide 13
Slide 13 text
ࣗͷ࡞ΔιϑτΣΞʹ͍ͭͯൃද͢Δ ͜ͱͰ։ൃʹϓϨογϟʔΛ͔͚Δ
Slide 14
Slide 14 text
ࠓͷॴͱͯޮՌ͕͋Δ
Slide 15
Slide 15 text
͜Ε͕ࢲͷTDD
Slide 16
Slide 16 text
༨ஊɿ ඈߦػ৽װઢͷத࠷ߴͷϓϩάϥϛϯ άڥ
Slide 17
Slide 17 text
༨ஊͷ༨ஊɿ ࠓطʹ৽װઢʹ1ճͱඈߦػʹ2ճͬ ͍ͯ·͢ɻ͍ͩͿḿΓ·ͨ͠ɻ
Slide 18
Slide 18 text
͞Βʹ༨ஊɿ ։ൃΛਐΊΔͨΊͷख๏ͱͯ͠ɺTODO͕ ࣌ݶരʹͳΔΑ͏ͳgemΛॻ͍͍ͯΔਓ ͕͍·ͨ͠Ͷʢૉఢʣ
Slide 19
Slide 19 text
༨ஊऴΘΓ
Slide 20
Slide 20 text
ࠓ͍͑ͨ͜ͱͦͷұ • ϓϩάϥϛϯάָ͍͠ • ొஃָ͍͠ • Έ߹ΘͤͨΒ࠷ڧͰʁ • ΈΜͳͲΜͲΜొஃͯ͠ͲΜͲΜίʔυॻ͜͏
Slide 21
Slide 21 text
ͰɺԿΛ࡞͍ͬͯΔΜͰ͔͢ʁ
Slide 22
Slide 22 text
2. My gem
Slide 23
Slide 23 text
JSONγϦΞϥΠβΛ࡞͍ͬͯ·͢ɻ
Slide 24
Slide 24 text
طଘͷJSONγϦΞϥΠβͷ͜ͱ • jbuilderɿ͍ɺDSL݁ߏ͍͠ • ActiveModelSerializersɿϝϯς͞ΕͯΔͷ͔Θ͔Βͳ͍ɺ ෦ߏෳࡶɺ͋·Γ͘ͳ͍ • fast_jsonapiɿ͍͚ͲJSON:APIܗ͔ࣜ͠αϙʔτ͠ͳ͍
Slide 25
Slide 25 text
γϯϓϧͰɺϝϯς͕؆୯Ͱɺ DSL͕֮͑ͯ͘͢ɺ͍ͦͦ͜͜ɺ JSONγϦΞϥΠβΛ࡞Γ͍ͨʂ
Slide 26
Slide 26 text
Alba https://github.com/okuramasafumi/alba
Slide 27
Slide 27 text
0.1.0૬ͷͷ͕Ͱ͖ͨؾ͕͍ͯ͠·͢
Slide 28
Slide 28 text
ͳͷͰɺϦϦʔε͠·͢
Slide 29
Slide 29 text
Albaͷػೳʢࠓ࣌ʣ • JSONͷϧʔτΩʔΛઃఆՄೳ • attributesϝιουͰJSONʹؚΊΔଐੑΛෳࢦఆՄೳ • attributeϝιουͰJSONʹؚΊΔଐੑΛϒϩοΫͰࢦఆՄೳ • JSONͷόοΫΤϯυʹOjΛࢦఆՄೳ
Slide 30
Slide 30 text
ࠓ͍͑ͨ͜ͱͦͷ್ • Alba͍ͬͯ͏gemΛ࡞͍ͬͯ·͢ • ػೳ·ͩશવΓͳ͍͚Ͳɺ͜Ε͔ΒΨγΨγՃ͍ͨ͠ • طଘͷͷʹෆຬ͕͋ΔͳΒ࡞Ε͍͍͡Όͳ͍ • Ճ͖͢ػೳʹ͍ͭͯͷҙݟɺ͓͍ͪͯ͠·͢
Slide 31
Slide 31 text
ۤ࿑ͨ͠ • ΫϥεϝιουͷDSLͰઃఆͨ͠ใΛΠϯελϯε͔Βࢀর ͢ΔΑ͏ʹ͢ΔΈ • ࣮ޮੑ͕͋Δఔ͋ΔςετΛॻ͘͜ͱ • શମతͳUIͱઃܭ
Slide 32
Slide 32 text
ςετͱUI
Slide 33
Slide 33 text
3. My TDD (second part)
Slide 34
Slide 34 text
طଘͷϥΠϒϥϦʹΛײ͡Δ ≠ ͲΜͳ;͏ʹվળ͢Ε͍͍͔Θ͔Δ
Slide 35
Slide 35 text
ςετΛॻ͖ͳ͕Β୳͍ͬͯ͘
Slide 36
Slide 36 text
TDD ➡ Test Driven Development
Slide 37
Slide 37 text
ࢲͷ࠾༻ͨ͠ํ๏ • ·ͣϢʔεέʔεͷςετΛॻ͘ʢ༷ࡦఆʣ • ͳΜ͔ҧײ͕͋ͬͨΒςετΛॻ͖͢ʢ༷มߋʣ • ςετʹೲಘ͕͍ͬͨΒ࣮͢Δ • ࣮͕ऴΘͬͨΒݸผͷΫϥεͷςετΛޙ͔ΒՃ͢Δʢ࣮ ·ͩॻ͍ͯͳ͍ʣ
Slide 38
Slide 38 text
ϘτϜΞοϓͰͳ͘τοϓμϯ
Slide 39
Slide 39 text
͜Ε͕ࢲͷTDD
Slide 40
Slide 40 text
ࠓ͍͑ͨ͜ͱͦͷࢀ • ༷ͱ͔ɺͲ͏͍͏ΠϯλʔϑΣʔε͕ཧ͔ͳΜͯͦ͏؆୯ ʹΘ͔Βͳ͍ • ϢʔεέʔεΛςετԽͯ͠ɺೲಘߦ͘·Ͱॻ͘ • Ϣχοτςετޙ͚Ͱ͍͍ͷͰ
Slide 41
Slide 41 text
4. ࠂ
Slide 42
Slide 42 text
No content
Slide 43
Slide 43 text
https://kaigionrails.org
Slide 44
Slide 44 text
·ͱΊ • ϓϩάϥϛϯάͱొஃָ͍͠ɺΈ߹ΘͤΔͱͬͱָ͍͠ • Alba͍ͬͯ͏gemɺ࡞ͬͯ·͢ • τοϓμϯͰϢʔεέʔε͔ΒςετΛॻ͘ͱ͍͍͔ • Kaigi on RailsɺΓ·͢