Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails Developers Meetup
Search
AKAMATSU Yuki
November 16, 2017
Technology
6
3.3k
Rails Developers Meetup
AKAMATSU Yuki
November 16, 2017
Tweet
Share
More Decks by AKAMATSU Yuki
See All by AKAMATSU Yuki
今年できたチームの生産性を向上させたプラクティスの紹介 / Kaigi on Rails 2022
ukstudio
4
4.7k
Cookpad Tech Kitchen #24
ukstudio
0
660
Cookpad Summer Internship 2019 Day 1 Git
ukstudio
0
9.8k
Cookpad Summer Internship 2019 Day 1 Ruby TypeScript
ukstudio
0
9.7k
sdevtalks.org開発報告 / reporting that sdevtalks.org was launched
ukstudio
0
300
GraphQL on Rails
ukstudio
1
390
「なんでも」をしよう / 2018-12-19 s-dev talks LT
ukstudio
2
490
Rails Developers Meetup 2018 Extreme
ukstudio
0
3k
機能追加時における 仮説検証/s-dev-talks-01
ukstudio
0
860
Other Decks in Technology
See All in Technology
音声AIエージェントの世界とRetell AI入門 / Introduction to the World of Voice AI Agents and Retell AI
rkaga
3
460
waitany と waitall を作った話
mrkn
0
110
[RSJ24] Object Segmentation from Open-Vocabulary Manipulation Instructions Based on Optimal Transport Polygon Matching with Foundation Models
keio_smilab
PRO
0
120
ログラスが面白いと思う理由をマネージャーがエモく語ってみる / 20240829 vs LT
yoshikiiida
1
520
20240828_EM_Fest
kzkmaeda
4
360
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
0
3.1k
Estrategias de escalabilidade para projetos web
jessilyneh
1
150
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
9
41k
スーパーマリオRPGのリメイク版の変更点からみるUX
nishiharatsubasa
1
110
Datadogの便利な使い方 - 意外と知らない?CoScreenとCloudcraft
taijihagino
PRO
1
600
Oracle Database Backup Service:サービス概要のご紹介
oracle4engineer
PRO
0
4k
Eventual Detection Engineering
ken5scal
0
390
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.2k
Art, The Web, and Tiny UX
lynnandtonic
294
20k
Creatively Recalculating Your Daily Design Routine
revolveconf
215
12k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
27
7.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
52k
What's in a price? How to price your products and services
michaelherold
241
11k
Speed Design
sergeychernyshev
18
400
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
24
2k
Robots, Beer and Maslow
schacon
PRO
157
8.1k
Designing on Purpose - Digital PM Summit 2013
jponch
113
6.8k
Adopting Sorbet at Scale
ufuk
72
8.9k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.4k
Transcript
3BJMTͰ&$αʔϏεΛ θϩ͔Β࡞ͬͯΈͯ גࣜձࣾTQJDFMJGF $5045&&34ϓϩμΫτϚωʔδϟʔদ༞ر
45&&34ʹ͍ͭͯ w ΦϦδφϧ5γϟπൢചαʔϏε w ը૾ΞοϓϩʔυαʔϏε্ͷσβΠϯΤσΟλͰ5γϟπ ΛσβΠϯɾൢച w ઃఆͨ͠ൢചՁ֨ʹԠͯ͡จ͝ͱʹऩӹ͕ൃੜ
45&&34ʹ͍ͭͯ w ΦϦδφϧ5γϟπൢചαʔϏε w ը૾ΞοϓϩʔυαʔϏε্ͷσβΠϯΤσΟλͰ5γϟπ ΛσβΠϯɾൢച w ઃఆͨ͠ൢചՁ֨ʹԠͯ͡จ͝ͱʹऩӹ͕ൃੜ
νʔϜߏ w ϓϩμΫτϚωʔδϟʔ݉ΞϓϦέʔγϣϯΤϯδχΞ w Πϯϑϥ݉ΞϓϦέʔγϣϯΤϯδχΞ w σβΠφ
1E.ͱ։ൃऀ͕ಉҰਓͰ͋ΔϝϦοτ w ҙࢥૄ௨ͷίετ͕େ෯ݮ w Ϗδωεͱ։ൃͱͰೝࣝͷҧ͍ͱ͍͏ͷ͕جຊతʹൃੜ͠ͳ ͍
ೝࣝҧ͍ͷൃੜͱ w ྫ͑ w ϏδωεଆͷࢥʮͱΓ͋͑ͣ.71ͱͯ͠ϦϦʔεͯ͠ػೳͱͯ͠ඞཁ͔֬ ೝ͍ͨ͠ʯ w ։ൃଆͷࢥʮͱ͘ʹԿݴΘΕͯͳ͍͠ɺ࡞ΓࠐΜͰ͠·͍͍ͬͯΜͩΖ ͏ʯ w
Ϗδωεͱ։ൃͷརͷෆҰகͱ͔͋Δ w Ϗδωεച্ϦϦʔεεϐʔυΛؾʹ͢Δ͕ɺ։ൃଆকདྷతʹࣗୡ ͕ۤ࿑͠ͳ͍͔Ͳ͏͔Λؾʹ͢Δ w ։ൃʮԾઆݕূ͕͏·͍ͬͨ͘Β࡞Γͳ͓࣌ؒ͢Λ࡞Δ͘ΕΔͱݴ͚ͬͨͲ ͍ͭ͘Εͳ͍Μ͚ʜʯ w ҆શࡦͰෛ࠴Λ࡞Γ͜·ͳ͍ํΛͱΓ͕ͪ
ಉҰਓͷ߹ w ෛ࠴ΛੵΉͱͯ͠ͲΕ͙Β͍ۤ࿑ͦ͠͏͔ɺϏδωεతʹ ࠓޙͲ͏͍ͨ͠ͷ͔͕ࣗΘ͔͍ͬͯΔͷͰஅ͕ϥΫ w ۤ࿑͢ΔͷࣗͳͷͰɺͦ͜ΒΜʹର͢Δؾෛ͍͋· Γͳ͍
ͱ͍͑ʜ w ΓϢʔβʔͷߦಈ͕ࣗͱఆ͠ͳ͍ͷͩͬͨΓ͢Δ ͷͰɺ༧ఆ֎ͷ༷มߋ͕ൃੜ͢Δ w 45&&34ͷ߹ɺ࠷ॳγϯϓϧʹճͷจͰͻͱͭͷαΠ ζ͔͠ങ͑ͳ͔ͬͨ w ࣗͷΛങ͏ʹࣗͷαΠζ͚ͩങ͑ΕΑ͍ͱࢥͬ ͨ
w ͚ͩͲఆ֎ʹෳαΠζΛങ͍͍ͨਓ͕ଟ͔ͬͨ w ͳΔ΄ͲͶ͍ͬͯ͏͜ͱͰ%#ͷߏΛม͑ͯෳαΠζߪೖ ͷϦϦʔεΛߦͬͨ
ͭ·Γʜ w ߟ͑Δਓͱ࡞Δਓ͕ಉ͡ͰϢʔβʔ͕͍ΔҎ্ͯ͢εϜʔ ζʹߦ͘Θ͚Ͱͳ͍ w ࣗͻͱΓͩͱͦ͜ΒΜͷ༷มߋͷཧ༝ͱ͔ٕज़తͳΉͣ ͔͠͞Θ͔ΔͷͰೲಘײ͕͋Δ w ෳਓͷ߹ɺཧ༝͕։ൃʹΘΒ༷ͣมߋͷࢦ͚ࣔͩΘ Δͱඃऀతͳؾ࣋ͪʹͳΓ͕ͪ
w ͦ͜ΒΜͷίϛϡχέʔγϣϯ͕͏·͍͔͘ͳ͍ͱۭؾΘ Δ͘ͳΓ͕ͪ w ͜ͷลΓʹରͯࣗ͠ಛʹ͑Λ͍࣋ͬͯΔΘ͚Ͱͳ͍ ͚Ͳɺҙ͓ࣝͯ͘͠ͱΑͦ͞͏
3BJMTͷ w 3BJMT%FWFMPQFST.FFUVQͳͷͰ։ൃଆͷΛ w ͋·ΓίΞٕज़తͳ͕͋ΔΘ͚Ͱͳ͍ͷͰτϐοΫগ ͠ࢄؾຯʹͳΔ͔ w ಛผͳʹ͔͍͜͠ͱΛ͍ͯ͠ΔΘ͚͡Όͳ͍ͷͰɺ͋Δҙ ຯۙͳʹͳΔͱࢥ͏
։ൃʹ͓͍ͯߟ͍͑ͯͨ͜ͱ w ࣭ͱεϐʔυͷόϥϯεΛऔΓ͍ͨͱߟ͍͑ͯͨ w εϐʔυॏࢹ͗ͣ͢͠ɺ ࣗʹͱͬͯ ͋ͨΓ·͑ͷ͜ͱ ͋ͨΓ·͑ʹͪΌΜͱΔ w ػೳݸผͷઃܭ͋Δఔͬ͘͟ΓͰ0,ɻ࣍ΠδΔػձ͕
͋Εͦͷ࣌ʹ͢ w ٯʹશମͷઃܭํͳΔ͘ߟ͓͖͔͑ͯͨͬͨ
σʔλϕʔεઃܭ w ͪΌΜͱਖ਼نԽͱ֎෦ΩʔΛΔ w σʔλϕʔεͱσʔλͷෛ࠴ղফ͢Δͷ͕େมͳͷͰ࠷ ݶ͜Ε͙Β͍Δ w ͍Βͳ͍ςʔϒϧΓ͍ͨ͜ͱͱ߹Θͳ͍ઃܭʹͳͬͨΒ ͪΌΜͱ͢ w
ΞΫηε͕ଟ͘ͳ͚Εมߋʹରͯͦ͜͠·ͰγϏΞʹ ͳΔ͜ͱͳ͍ w ͦΕΑΓΑ͘Θ͔ΒΜઃܭͷςʔϒϧ͢ํ͕ࠔΔ
σʔλϕʔεͷ7JFX w ਖ਼نԽ͍ͯ͘͠ͱ/ ͷղফ+0*/ͷ͕ଟͯ͘3BJMT্ͷίʔ υͷݟ௨͕͠ΘΔ͘ͳΔ͜ͱ͕͋Δ w ͦͷͱ͖7JFXΛ༻ҙͯ͠ରॲ͢Δ w IUUQTHJUIVCDPNUIPVHIUCPUTDFOJD w
7JFXΛଟஈʹ͢Δͱ͋Δ7JFXͷߏΛม͍͑ͨͱ͖ʹ໘ʹͳ ΔͷͰҙ w ࣅͨཧ༝ͰΧϥϜՃ࣌ʹ͜·ΔͷͰ7JFXʹ࠷ݶͷΧϥϜ Λࢦఆ͢Δ΄͏͕Α͍ w ΞϓϦଆͱ%#ଆʹϩδοΫ͕͔ΕΔͷͪΐͬͱΈͲ͜Ζ
ϚΠάϨʔγϣϯ w εΩʔϚͷมߋͱσʔλͷೖͷཧΛΘ͚ΔΑ͏ʹͨ͠ w σʔλೖIUUQTHJUIVCDPNIBSSZTUFDI TFFE@NJHSBUJPOͰ w εΩʔϚͷมߋʹIUUQTHJUIVCDPNBOLBOF TUSPOH@NJHSBUJPOTΛೖΕͯΈͨ w
ةݥͳ%#มߋʹରͯ͠ܯࠂΛग़͢ w ৭ʑษڧʹͳ͚ͬͨͲɺࠓճෆཁ͔ͩͬͨͳͱࢥ͏
αʔϏεϨΠϠ w αʔϏεϨΠϠѱ͘ͳ͍͕ɺಋೖॳͷαʔϏεϨΠϠʹ ର͢ΔෆษڧͰඍົͳײ͡ʹ w "3ͷΠϯελϯεΛෳ͏Α͏ͳॲཧαʔϏεϨΠ ϠΈ͍ͨʹͯͨ͠
ߪೖॲཧ·ΘΓΛαʔϏεΫϥεʹ w ߪೖॲཧΔ͜ͱ͕ͨ͘͞Μ w ΫϨΧͷܾࡁॲཧɺจใͷӬଓԽɺϢʔβʔͷϝʔϧ ௨ͳͲͳͲʜ w ѻ͏Ϟσϧ͕ଟ͍͠ɺΔ͜ͱଟ͍ͷͰɺͦΕΛ·Δͬͱ αʔϏεΫϥε w
ॳίʔυ͕खଓ͖తʹࣗવͱͳΔͷͰͦΕͦΕͰϝϦο τ͕͋ͬͨ w ίʔυΛ࠶ར༻͢Δͱͳͬͨͱ͖ʹ͍·Θ͕͠Ͱ͖ͣʹࠔ ΔΊʹʜ
Ͳ͏͢ΕΑ͔ͬͨͷ͔ w αʔϏεϨΠϠग़དྷΔݶΓബ͘͢Δ w ͦ͏͢Δͱ3BJMTͷ߹ɺίϯτϩʔϥʔʹॻ͚͍͍ͬ ͍ͯ͏ͷଟʑ͋Δ w υϝΠϯϞσϧͷઃܭྗΛ͑Δ
ϑΥʔϜΫϥε w ਖ਼نԽ͢Δͱେମʹ͓͍ͯϑΥʔϜͱϞσϧ͕ʹͳΒͳ͍ w ϑΥʔϜ͝ͱʹϑΥʔϜΫϥεΛ࡞Δͷ͕݁ہϥΫ w ࣮IUUQUFDINFEQFFSDPKQFOUSZ Λࢀߟʹ͢Εେମ0,
όϦσʔγϣϯΛͲ͜Ͱߦ͏͔ w ͋ͱ͔ΒϑΥʔϜΫϥεΛಋೖͨ͠ͷͰॳϞσϧʹόϦ σʔγϣϯ͕͋ͬͨ w ϑΥʔϜΫϥεͷόϦσʔγϣϯΛϞσϧͷΠϯελϯ εʹͯ͠ϞσϧͰߦ͏
class Form def sync @model_a = ModelA.new(foo: @foo, bar: @bar)
@model_b = ModelB.new(hoge: @hoge) end def valid? sync @model_a.valid? && @model_b.valid? end end όϦσʔγϣϯΛͲ͜Ͱߦ͏͔
ϑΥʔϜΫϥεʹॻ͘ํʹγϑτ w ਓগͳ͍ͷͰϞσϧݺΜͰόϦσʔγϣϯ͞ΕͣࣄނΔ ͱ͍͏ͷগͳ͍ w ϑΥʔϜ࣮͢Δͱ͖ʹϑΥʔϜ୯ҐͰόϦσʔγϣϯߟ͑Δํ ͕ͳΜ͔ϥΫ w ϞσϧͰόϦσʔγϣϯ͢ΔͱࠔΔέʔε͋Δ w
ಛఆΧϥϜଞͷΧϥϜಉ࢜ͷܭࢉʹΑͬͯຒΊΒΕΔ߹ w όϦσʔγϣϯ࣌ʹܭࢉ͢ΔίετΛࢧ͏ඞཁ͕͋Δ w ·ͨϑΥʔϜͷΛόϦσʔγϣϯ͍ͨ͠ͷͰϑΥʔϜͰͦ ͜Λ͋·Γؾʹͨ͘͠ͳ͍
class Form def sync @model = ModelA.new(foo: @foo, bar: @bar)
end def valid? @model.valid? # hogeΛೖΕͯͳ͍ͷͰvalidʹͳΒͳ͍ end def save! hoge = (@foo + @bar) * rate @model.hoge = hoge @model.save! end end
ϑΥʔϜΫϥεʹॻ͘ํʹγϑτ w ͱ͍͑ΓϞσϧʹόϦσʔγϣϯ͕ͳ͍ͷʜ w ͋ͱࣅͨΑ͏ͳϑΥʔϜͰࣅͨΑ͏ͳόϦσʔγϣϯΛॻ͘ ͜ͱଟʑ w όϦσʔγϣϯΛ͍͍ײ͡ʹ·ͱΊͨϞδϡʔϧΛ࡞Δͱ Α͍ͷ͔ͳʜ
·ͱΊ w ϓϩμΫτϚωʔδϟʔͱ։ൃऀͷҙࢥૄ௨େࣄͩΑ w ͏ͪͷ߹݉Ͱͦ͜εΩοϓ͚ͨ͠Ͳɺݱ࣮ͦΕΛଓ ͚͍ͯ͘ͷͳ͔ͳ͔͍͠ w 3BJMT։ൃʹ͓͍ͯେ·͔ͳݪଇΛक͍ͬͯ͘ͷ͕جຊ w ݪଇʹ͍ͭͯษڧ͠Α͏
w ҙਤతʹखΛൈ͘ͱ͔Ͱͳ͍ݶΓɺ্ݶ͕ࣗͷ࣮ྗͰܾ·Δ w ͱݴ࣮͑Ϩϕϧͩͱܾ·Γख͕ͳ͍͜ͱଟ͍ w ͦͷลͷࢼߦࡨޡڪΕͳ͍