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
日本語: Skinny Controllers, Skinny Models #m3dev
Search
Kazuhiro Sera
July 05, 2013
Technology
1
170
日本語: Skinny Controllers, Skinny Models #m3dev
7 つの実装パターンと Code Climate を使った実際のリファクタリング実践の紹介です。
Kazuhiro Sera
July 05, 2013
Tweet
Share
More Decks by Kazuhiro Sera
See All by Kazuhiro Sera
5 tips to build long-lasting Scala OSS (cont’d)
seratch
0
100
5 tips to build long-lasting Scala OSS
seratch
1
160
ScalikeJDBC / Skinny ORM Beginners' Guide
seratch
5
130k
All I learned while working on a Scala OSS project for over six years #ScalaMatsuri
seratch
1
840
What I learned by creating 'Scala on Rails' #trbmeetup
seratch
0
160
Scala on Rails @ Scalae by the Bay 2016 #scalae
seratch
1
1k
Contributing to Scala OSS from East Asia #ScalaMatsuri
seratch
0
1.2k
Skinny 2 Update
seratch
0
100
Future on Servlet #scala_ks
seratch
0
510
Other Decks in Technology
See All in Technology
Product Engineer Night #6プロダクトエンジニアを育む仕組み・施策
hacomono
PRO
1
470
グローバル展開を見据えたサービスにおける機械翻訳プラクティス / dp-ai-translating
cyberagentdevelopers
PRO
1
150
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
顧客が本当に必要だったもの - パフォーマンス改善編 / Make what is needed
soudai
24
6.8k
とあるユーザー企業におけるリスクベースで考えるセキュリティ業務のお話し
4su_para
3
330
AWSコンテナ本出版から3年経った今、もし改めて執筆し直すなら / If I revise our container book
iselegant
15
4k
「最高のチューニング」をしないために / hack@delta 24.10
fujiwara3
21
3.5k
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
570
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
740
CAMERA-Suite: 広告文生成のための評価スイート / ai-camera-suite
cyberagentdevelopers
PRO
3
270
Aurora_BlueGreenDeploymentsやってみた
tsukasa_ishimaru
1
130
チームを主語にしてみる / Making "Team" the Subject
ar_tama
4
310
Featured
See All Featured
Teambox: Starting and Learning
jrom
132
8.7k
Six Lessons from altMBA
skipperchong
26
3.5k
A Tale of Four Properties
chriscoyier
156
23k
Building Applications with DynamoDB
mza
90
6.1k
The Cult of Friendly URLs
andyhume
78
6k
A Modern Web Designer's Workflow
chriscoyier
692
190k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Making the Leap to Tech Lead
cromwellryan
132
8.9k
4 Signs Your Business is Dying
shpigford
180
21k
Being A Developer After 40
akosma
86
590k
Why Our Code Smells
bkeepers
PRO
334
57k
Transcript
4LJOOZ$POUSPMMFST 4LJOOZ.PEFMT .5FDI5BMLNEFW ,B[VIJSP4FSB!TFSBUDI
3VCZ,BJHJ • -5͠·ͨ͠ʢSTQFDLJDLTUBSUFSʣ • ੮ʹͬͨΒ(FNpMFʹՃʂ • ࠓl3FGBDUPSJOH'BU.PEFMTXJUI 1BUUFSOTzͱ͍͏ߨԋͷ༰ͱͦͷ࣮ફʹ ͍ͭͯհ͠·͢ •
ڵຯΛ࣋ͬͨํɺಈը͕ެ։͞Ε͍ͯΔ ͷͰޙͰ؍ͯΈ͍ͯͩ͘͞ IUUQTWJNFPDPN
None
!CSZOBSZ • #SZBO)FMNLBNQ • $PEF$MJNBUFۀऀ • ސ٬ͷ3VCZίʔυΛղੳ࣭ͯ͠ɾη ΩϡϦςΟվળΛࢧԉ͢ΔαʔϏε • 044ͳΒແྉɺҎԼ(JTUVCͷྫ
• IUUQTDPEFDMJNBUFDPNHJUIVC TFSBUDIHJTUVC
$PEF$MJNBUF3BUJOH
$PEF$MJNBUF$PEF4NFMM
$PEF$MJNBUF$MBTTFT
ϒϩάΤϯτϦ • 1BUUFSOTUP3FGBDUPS'BU"DUJWF3FDPSE .PEFMT • IUUQCMPHDPEFDMJNBUFDPNCMPH XBZTUPEFDPNQPTFGBU BDUJWFSFDPSENPEFMT • ͞Βʹվળ͞ΕͨίʔυྫΛ(JU)VCͰެ։
͍ͯ͠Δʢ3VCZ,BJHJͰͷൃදͰ༻ʣ • IUUQTHJUIVCDPNDPEFDMJNBUF SFGBDUPSJOHGBUNPEFMT
3BJMT"DUJWF3FDPSE • 1SPγϯϓϧ͞ • $PO%#ͷςʔϒϧͱΛڧ͍ΒΕΔ
3BJMTΞϓϦͰͷࣦഊྫ • దʹσβΠϯ͞ΕͨΦϒδΣΫτࢦͷ ίʔυϥϏΦϦʹྫ͑ΒΕΔ • ࣌ંɺΧϧκʔωΈ͍ͨʹҰΧॴʹ٧Ίࠐ Μͩ3BJMTίʔυΛݟ͔͚Δɾɾ
4LJOOZ.PEFMT • 'BU.PEFMTͱΑ͘ݴΘΕΔ͕.PEFM 4LJOOZͰ͋Δ͖ͳΜͰʁ
'BU.PEFMTͱͷઓ͍ • $POUSPMMFS͕ංେԽ͢ΔΑΓϚγʁ • طଘͷ"3 "DUJWF3FDPSE NPEFMʹ Λ͍࣋ͨͤͯ͘ͱͲΜͲΜංେԽ • ࠷ѱͷέʔεਆΦϒδΣΫτ͕ੜ
• !CSZOBSZɺఆ൪ͷ࣮ύλʔϯΛ͏· ͘3BJMTͷNPEFMͷϦϑΝΫλϦϯάʹ ద༻͢Δํ๏ΛఏҊ͍ͯ͠Δ
Ξϯνύλʔϯ • ͨͩ͠ɺ҆қʹNJYJOͱͯ͠NPEVMFʹ Γग़͢ͷΞϯνύλʔϯ • NJYJOܗΛม͑ͨܧঝ • ͕Βͨ͘ΛಥͬࠐΉҾ͖ग़͠ʢίʔυΛ NPEVMFʹҠͯ͠JODMVEF͢Δ͚ͩʣ •
ͨ͘͞ΜNJYJO͞ΕͨDMBTTͩͱͲΜͳ ΦϒδΣΫτ͔Ѳ͢Δͷ͕େมʹͳΔ
ͭͷ࣮ύλʔϯ • 7BMVF0CKFDUT • 4FSWJDF0CKFDUT • 'PSN0CKFDUT • 2VFSZ0CKFDUT •
7JFX0CKFDUT • 1PMJDZ0CKFDUT • %FDPSBUPST
7BMVF0CKFDUT • ͓ͳ͡Έ7BMVF0CKFDU • JNNVUBCMFͳΛอ࣋͢ΔΫϥε • อ࣋͢ΔʹΑͬͯൺֱՄೳ • ԿΒ͔ͷϩδοΫΛ࣋ͭBUUSJCVUFʢ·ͨ ͦͷখ͞ͳू߹ʣ͕ద͍ͯ͠Δ
• ۩ମྫɿ1IPOF/VNCFSɺ.POFZɺ 3BUJOHͳͲ
4FSWJDF0CKFDUT • ෳͷNPEFMΛར༻͢Δ߹ • ֎෦ͷαʔϏεɺ"1*ͱ࿈ܞ͢Δ߹ • ෳࡶͳϩδοΫΛ࣮͢Δ߹ • طଘͷNPEFMͷओͨΔͰͳ͍߹ •
4USBUFHZύλʔϯΛద༻͍ͨ͠߹ • ී௨"DUJWF.PEFMͰͳ͍
'PSN0CKFDUT • ҰͭͷϑΥʔϜͰෳͷ"3NPEFMΛߋ ৽͍ͨ͠߹ʹ༗ޮ • "DUJWF.PEFMʹ͢Δ • 'PSNͷTBWFͷ෦Ͱෳͷ"3NPEFM ͷTBWFΛݺͼग़͢ •
ඪ४ͷBDDFQUT@OFTUFE@BUUSJCVUFT@GPS !CSZOBSZతʹඇਪ • ෳࡶʹͳͬͨΒӬଓԽॲཧΛ4FSWJDFʹ
2VFSZ0CKFDUT • όον༻PSෳࡶͳ݅ͷ42-Λ"3ͷ TDPQFΫϥεϝιουʹͤͣ2VFSZ 0CKFDUͱͯ͠ • ॳظԽ࣌ʹ"33FMBUJPOΦϒδΣΫτΛ ͢Α͏ʹ͢Δͱ߹ՄೳʹͳΔ • 5SJBM2VFSZOFX
"DDPVOUXIFSF ʜ pO E@FBDIEPcFcʜFOE
7JFX0CKFDUT • 7JFXͷͨΊͷϩδοΫΛ"3NPEFMʹ ॻ͔ͳ͍ʢΤϥʔϝοηʔδੜͳͲʣ • "3NPEFMΛอ࣋͢ΔΫϥεΛఆٛ͠ SFOEFSʹͪ͜ΒΛ͢Α͏ʹ͢Δ • IFMQFSʹ"3NPEFMΛ࣮͢ΑΓɺ ϦϑΝΫλϦϯά͕ଅਐ͞ΕΔ
• ଟ༷ͳ6*ʹରԠ͢Δ߹ʹ༗ޮ
1PMJDZ0CKFDUT • "3NPEFMΛࢀর͢Δ͕ओͨΔυϝΠ ϯͰͳ͍ϩδοΫʢੳͷͨΊͷఆ ͳͲʣΛ͢Δ • ྫɿϝʔϧ৴ରʁΞΫςΟϒϢʔβʁ • "3NPEFMΛอ࣋͢ΔΫϥεͱͯ͠ఆٛ •
ଞͱͷҧ͍ɿ1PMJDZSFBEͳॲཧ͚ͩ 4FSWJDFXSJUFؚΉɺ2VFSZ42- ࣮ߦͱSFTVMUTFUΛZJFMEʹ͚ͩ͢
%FDPSBUPST • %FDPSBUPSύλʔϯΛద༻ͯ͠DBMMCBDL ࠈΛճආ͢Δ • ྫɿTBWFϝιουΛचͭͳ͗ʹ͢Δ ʢ"3ͷ0SEFSTBWFͰPSEFSTςʔϒϧ ʹJOTFSU%)8ʹ௨डྃ ϝʔϧΛૹ৴ʣ
࣮ફͯ͠Έͨ • ࣮ࡍʹύλʔϯΛͬͯ(JTUVCͷϦϑΝ ΫλϦϯάΛͯ͠Έͨ
ύλʔϯΛ࣮ફ͢Δલ
ύλʔϯΛ࣮ફͨ͠ޙ
ͬͨ͜ͱ • ͬͨύλʔϯ4FSWJDF0CKFDUT͚ͩ • ୯ʹ$POUSPMMFS͔Β4FSWJDFʹΓग़͠ ͚ͨͩͩͱɺࠓͦͷ৽͍͠4FSWJDF ͷείΞ͕ѱ͔ͬͨʢͨΓલʣ • ෳࡶͷߴ͗͢ΔϝιουΛ໊લΛ͚ ΒΕΔ୯Ґʹׂ
• ίʔυͷॏෳΛڞ௨Խ
վળͷաఔ
ࠓ͔Βग़དྷΔ͜ͱ • తʹ"3ͷΫϥεϝιουʹ͠ͳ͍ • "3Ͱͳ͍ϞσϧͲΜͲΜͭ͘Δ • $POUSPMMFSʹ"3NPEFMݺͼग़͠Λζϥ ζϥॻ͘ΑΓ4FSWJDFʹ͢Δ • ෳࡶͳϑΥʔϜ'PSNΛಋೖ͢Δ
• "3ʹදࣔ༻ϩδοΫΛ࣋ͨͣ7JFX 0CKFDUͰϥοϓͯ͠දࣔॲཧʹ͢
·ͱΊ • طʹ࣮ફ͞Ε͍ͯΔͷଟ͍͕ɺύλʔ ϯʹ໊લ͕͍ͭͯݴޠԽ͞ΕΔ͜ͱେࣄ • ࠷ॳγϯϓϧͰΑ͍ʢύλʔϯͷΓ͢ ͗PWFSFOHJOFFSJOHʣ • ΞϓϦ͕ҭ͍ͬͯ͘தͰنʹԠͨ͡Ϧ ϑΝΫλϦϯάඞཁʹͳ͍ͬͯ͘
• ͨͩ͠ɺेͳίʔυΧόϨοδඞਢ
ΞϓϦنͱΞʔΩςΫνϟ
2" .5FDI5BMLNEFW ,B[VIJSP4FSB!TFSBUDI "OZ2VFTUJPO