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
680
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
310
GraphQL on Rails
ukstudio
1
400
「なんでも」をしよう / 2018-12-19 s-dev talks LT
ukstudio
2
500
Rails Developers Meetup 2018 Extreme
ukstudio
0
3.1k
機能追加時における 仮説検証/s-dev-talks-01
ukstudio
0
890
Other Decks in Technology
See All in Technology
プロダクト成長に対応するプラットフォーム戦略:Authleteによる共通認証基盤の移行事例 / Building an authentication platform using Authlete and AWS
kakehashi
1
150
Fargateを使った研修の話
takesection
0
120
なんで、私がAWS Heroに!? 〜社外の広い世界に一歩踏み出そう〜
minorun365
PRO
6
1.1k
Gradle: The Build System That Loves To Hate You
aurimas
2
150
visionOSでの空間表現実装とImmersive Video表示について / ai-immersive-visionos
cyberagentdevelopers
PRO
1
110
GitHub Universe: Evaluating RAG apps in GitHub Actions
pamelafox
0
180
とあるユーザー企業におけるリスクベースで考えるセキュリティ業務のお話し
4su_para
3
320
大規模データ基盤チームのオンプレTiDB運用への挑戦 / dpu-tidb
cyberagentdevelopers
PRO
1
110
[AWS JAPAN 生成AIハッカソン] Dialog の紹介
yoshimi0227
0
150
新R25、乃木坂46 Mobileなどのファンビジネスを支えるマルチテナンシーなプラットフォームの全体像 / cam-multi-cloud
cyberagentdevelopers
PRO
1
130
AWSコンテナ本出版から3年経った今、もし改めて執筆し直すなら / If I revise our container book
iselegant
15
4k
CyberAgent 生成AI Deep Dive with Amazon Web Services / genai-aws
cyberagentdevelopers
PRO
1
480
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
296
20k
The Language of Interfaces
destraynor
154
24k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Being A Developer After 40
akosma
86
590k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
41
2.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Happy Clients
brianwarren
97
6.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
290
Building Your Own Lightsaber
phodgson
102
6.1k
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 ͦͷลͷࢼߦࡨޡڪΕͳ͍