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
リリース直前にLumenからLaravelに移行した話
Search
tiwu
February 16, 2019
Technology
4
1.4k
リリース直前にLumenからLaravelに移行した話
https://fortee.jp/laravel-jp-conference-2019/proposal/633e7874-20f6-4c91-ad6e-693881f3c016
tiwu
February 16, 2019
Tweet
Share
More Decks by tiwu
See All by tiwu
Eleventy で SSG
tiwu_dev
2
610
Eleventy - 11ty
tiwu_dev
0
120
Install for PWA
tiwu_dev
0
1.1k
App Shortcuts
tiwu_dev
0
800
Web Vitals
tiwu_dev
0
60
Web Share API
tiwu_dev
0
1.1k
Badge in Background
tiwu_dev
0
50
PWAとCache API #frontkansai
tiwu_dev
5
1.8k
Web Componentsとlit-element #frontkansai
tiwu_dev
2
1.2k
Other Decks in Technology
See All in Technology
Lambdaと地方とコミュニティ
miu_crescent
2
370
いざ、BSC討伐の旅
nikinusu
2
780
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
230
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
4
230
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
170
AGIについてChatGPTに聞いてみた
blueb
0
130
Application Development WG Intro at AppDeveloperCon
salaboy
0
190
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Agile that works and the tools we love
rasmusluckow
327
21k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Navigating Team Friction
lara
183
14k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
GraphQLとの向き合い方2022年版
quramy
43
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Transcript
ϦϦʔεલʹLumen͔Β LaravelʹҠߦͨ͠ גࣜձࣾGameWithɹαʔϏε։ൃ෦ɹాޱ ߤ
ΞδΣϯμ - ࣗݾհɺձࣾհ - MangaWithʹ͍ͭͯ - Lumenͱ - MangaWithͷΞʔΩςΫνϟઃܭ -
ͳͥLumenΛબ͔ͨ͠ - ͳͥҠߦ͢Δ͜ͱʹͳ͔ͬͨ - LaravelͷҠߦ - LaravelҠߦͯ͠Έͯ - ·ͱΊ
ࣗݾհ # Wataru Taguchi - GameWith Front End Engineer -
@tiwu_official - @tiwuofficial - FF14, Beer, Kyoto Animation
ձࣾ֓ཁ ໊ࣾ גࣜձࣾGameWith ຊࣾ ˟106-6120 ౦ژߓ۠ຊ6-10-1 ຊώϧζλ ϫʔ20F දऀ ࠓઘɹ
ઃཱ 20136݄3 ࢿຊۚ 492ඦສԁʢ201811݄࣌ʣ ࣄۀ༰ ήʔϜใͷఏڙΛߦ͏ϝσΟΞࣄۀ
αʔϏε֓ཁ - ࠃ࠷େڃͷήʔϜϝσΟΞʮGameWithʯΛӡӦ - ҎԼͷ4ࣄۀΛத৺ʹ෯͘ήʔϜؔ࿈ࣄۀΛల։ - ήʔϜ߈ུ - ήʔϜϨϏϡʔ -
ίϛϡχςΟ - ಈը৴
201812݄ΑΓ WebϚϯΨαʔϏεʮMangaWithʯΛ ӡӦΛ։࢝ ϒϩοΫνΣʔϯήʔϜ ʮEGGRYPTO(ΤάϦϓτ)ʯΛ2019 य़ϦϦʔε༧ఆ ৽نࣄۀ
WEBϚϯΨαʔϏεʮMangaWithʯʹ͍ͭͯ
MangaWith 6݄ 12݄ 11݄ 7݄ 8݄ 9݄ 10݄
Lumen
Lumen # ಛ - ܰྔʢSilexSlim 3ΑΓʣ - Eloquent, Caching, Queues,
Validation, Routing, MiddlewareͳͲඪ४උ - LaravelͷҠߦ͕؆୯
Lumen # Laravelͱͷҧ͍ - configσΟϨΫτϦͳ͍(.env͏) - ࡞ͬͯӡ༻͢Δ͜ͱՄೳ - Facade,Eloquent͕ॳظঢ়ଶ͑ͳ͍ -
ίϝϯτΞτΛ֎ͤ͑Δ - resourcesܥ͕΄΅ͳ͍ - API։ൃϝΠϯͱ͍͏͜ͱ͔ɾɾɾ - Lumen 5.2͔Βηογϣϯ͕αϙʔτ֎ - ఆٛͯ͋͛͠Ε͑Δ
MangaWith ΞʔΩςΫνϟઃܭ
͍ͭʁ 6݄ 12݄ 11݄ 7݄ 8݄ 9݄ 10݄
MangaWithͷΞʔΩςΫνϟઃܭ ϏδωεϩδοΫ ϑϨʔϜϫʔΫʹͰ͖Δ͚ͩґଘ͠ͳ͍
MangaWithͷΞʔΩςΫνϟઃܭ ΦχΦϯΞʔΩςΫνϟ
MangaWithͷΞʔΩςΫνϟઃܭ UI Controller Service Repository Entity Infrastructure Entity Repository Service
Controller UI Infrastructure
ιʔεྫɹContoller
ιʔεྫɹService
ιʔεྫɹRepository
ιʔεྫɹEntity
MangaWithͷΞʔΩςΫνϟઃܭ UI Controller Service Repository Entity Infrastructure Entity Repository Service
Controller UI Infrastructure
ϦϦʔεʹ͚ͯ ΞʔΩςΫνϟઃܭܾ·ͬͨʂ
MangaWith ϑϨʔϜϫʔΫબఆ
͍ͭʁ 6݄ 12݄ 11݄ 7݄ 8݄ 9݄ 10݄
ϑϨʔϜϫʔΫબఆ OR
MangaWithͷΞʔΩςΫνϟઃܭ ϏδωεϩδοΫ ϑϨʔϜϫʔΫʹͰ͖Δ͚ͩґଘ͠ͳ͍
ϑϨʔϜϫʔΫબఆ
ϦϦʔεʹ͚ͯ ϑϨʔϜϫʔΫܾΊͨʂ
ϦϦʔεʹ͚ͯ ޙϦϦʔεʹ͚ͯΔ͚ͩͩʂ
MangaWith 6݄ 12݄ 11݄ 7݄ 8݄ 9݄ 10݄
MangaWith 6݄ 12݄ 11݄ 7݄ 8݄ 9݄ 10݄
͔͠͠ɺࣄ͕݅ ͔͠͠ϦϦʔε1ϲ݄લʹࣄ͕݅
LaravelͷҠߦ LumenͰϚελʔεϨʔϒߏ͕ ࣮ݱͰ͖ͳ͍
Ͳ͏͍͏͜ͱ͔ # MangaWithͰಠࣗΫϥε͕ଟ͍ - Carbon - DB Connection - Log
- Sftp
Carbon
DB Connection
DB Connection LumenͰಠࣗDB ConnectionΛར༻͍ͯ͠Δ ߹ɺϚελʔεϨʔϒߏΛऔΔʹ ಠࣗϚελʔεϨʔϒߏΛ࣮͢Δඞཁ͕ ͋ͬͨ
ϚελʔεϨʔϒߏ
ͳ͔ͥ
ճආํ๏ - ಠࣗDB ConnectionΛΊΔ - ಠࣗϚελʔεϨʔϒߏΛ࣮͢Δ - LaravelʹҠߦ͢Δ
ճආํ๏ - ಠࣗDB ConnectionΛΊΔ - ಠࣗϚελʔεϨʔϒߏΛ࣮͢Δ - LaravelʹҠߦ͢Δ
LaravelͷҠߦ 1. ۭͷLaravelϓϩδΣΫτΛ࡞Δ 2. ϏδωεϩδοΫ෦Λίϐϖ͢Δ 3. ϛυϧΣΞͱϧʔςΟϯάͱςετඍमਖ਼
Ҡߦʹؔͯ͠ # ਏ͔ͬͨ - मਖ਼ྔʢجຊతʹશஔ͕ͩʣ # ྑ͔ͬͨ - ςετͷΧόϨοδ͕98%͘Β͍͋ͬͨͷͰॿ͔ͬͨ
Ҡߦͷͦͷଞཧ༝ # ηογϣϯ - ৺ཧత҆શੑ͕ͳ͔ͬͨͷͰม͔͑ͨͬͨ # ςετ - ฦ٫͞ΕΔHTMLͷத͕ݟΕͳ͔ͬͨΓ͢Δ
Ҡߦͯ͠Έͯ # पΓ - Ͳ͏ͩΖ͏ɾɾɾʁ - Unitςετ͘ͳͬͨ # ΦχΦϯΞʔΩςΫνϟ -
Lumen -> Laravelͳ͜ͱ͋ΓɺεϜʔζ͕ͩͬͨྑ͞Λ࣮ײ
# ಠࣗΫϥεؔ࿈ - YAGNIͷ๏ଇΛ࣮ײɾɾɾ - ϝϦοτʢݱঢ়ʣײ͍ͯ͡ͳ͍ɾɾɾ # Laravel or Lumen
? - ಛʹ͋Δ௨ΓʹAPIαʔόʔ୯ҰͷػೳͳΒLumen - ී௨ʹWEBΞϓϦέʔγϣϯΛ࡞ΔͳΒLaravel Ҡߦͯ͠Έͯ
Question ͠ಠࣗDB ConnectionͰͳ͔ͬͨΒ LumenΛͦͷ··͍ͬͯͨʁ
Answer ηογϣϯ͋Δ͕͍ͬͯͨͱࢥ͏
ϏδωεϩδοΫ΄΅FWґଘ͍ͯ͠ͳ͍ͷͰ ͍͚͍͚ͯΔ͔ ະདྷ Ϗδωε ϩδοΫ
- LumenͰWeb։ൃׂͱ͍͚Δ - YAGNIͷ๏ଇΛ࣮ײ - ΦχΦϯΞʔΩςΫνϟ&ςετʹॿ͚ΒΕͨ - ϑϨʔϜϫʔΫͷ͓͔͛ͰϏδωεϩδοΫͳͲʹ ྗͰ͖Δ ·ͱΊ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠