Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
未来大LT_2025.pdf
Search
Kaito Kudo
May 17, 2025
Technology
99
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
未来大LT_2025.pdf
Kaito Kudo
May 17, 2025
More Decks by Kaito Kudo
See All by Kaito Kudo
5分でわかる! VaporでAPI+DB構築
kaitokudou
0
140
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
540
iOSDC Japan 2022 スポンサーセッション
kaitokudou
0
2.2k
iOS勉強会資料
kaitokudou
0
140
App Storeにアプリをリリースした話
kaitokudou
0
58
Other Decks in Technology
See All in Technology
【Findyテック文化祭ワークショップ】新卒エンジニア&採用担当と作る、 なりたい姿と今やるべき一歩
dip_tech
PRO
0
150
あなたの知らないAmazon VPC Route Server/Amazon VPC Route Server you don't know about
masakiokuda
0
150
20260929_AmazonGuardDutyの検出通知メールにAWS DevOpsAgentの調査結果を追加する
yhana
1
370
キャリアLT今日までそして明日から
kentapapa
1
120
AI駆動開発で仕様はどこまで書くべきか? ― 人とAIの責務境界から考える開発プロセスの実践
takahiromatsui
1
230
猫でもわかるKiro Web
kentapapa
1
150
ScotSecure West 2026 - Glasgow
raybugg
0
200
3人で1000GPU超を統合運用する?マルチクラウド&オンプレを跨ぐ、構築と運用のリアル!
kazukun0716
2
760
DORA_Metrics.pdf
wagnerfusca
1
130
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
16
120k
TiDBファミリーにDWHが新登場!! TiDB最新情報 / TiDB update 202609
yoshiakiyamasaki
0
160
[Kiro Meetup #7] Kiro Crew Dive Deep
konippi
0
420
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
390
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
540
Unsuck your backbone
ammeep
672
58k
Making the Leap to Tech Lead
cromwellryan
135
10k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Amusing Abliteration
ianozsvald
1
320
Transcript
SwiftͬͯεϚϗΞϓϦ։ൃઐ༻ʁ ͍͍͑ɺαʔόʔॻ͚·͢ʂ 2025/05/17 ͩͯ͜ະདྷେ×اۀΤϯδχΞ େLT2025 ͘Ͳ͔͍ 1
ࣗݾհ גࣜձࣾΏΊΈ/͘Ͳ͔͍ 2022/04ʹiOSΤϯδχΞͱͯ͠৽ଔೖࣾɻ ෭ۀͰFlutterΛͪΐͬͱͬͨΓɻ ݸਓ։ൃ ݮञࢧԉΞϓϦʮAlconʯ https://apps.apple.com/jp/app/alcon/id1571071417 ࡔಓάϧʔϓͷ८ྱΞϓϦʮͷ͗ϥϦʔʯ https://apps.apple.com/jp/app/ͷ͗ϥϦʔ/id6501994754 @kudokai00
@KaitoKudou 2
3
࣮SwiftͰ αʔόʔॻ͚ΔΜͰ͢ʂ 4
Ϟνϕʔγϣϯ • ͍׳Ε͍ͯΔ Swift ͰαʔόʔαΠυ։ൃͰ͖ͨΒ͍͍ΑͶ • Swift ͚ͩͰΞϓϦέʔγϣϯΛࣗྗͰ࡞Δ͜ͱ͕Մೳ • ձࣾͷઌഐ͕ॻ͍ͨ
Server Side Swift ͷهࣄΛಡΜͰڵຯ͕ग़ͨ 5
https://techbookfest.org/product/kdUdfz8a1KZQJZvJxRVu8V?productVariantID=3PtDPisanjt1xTD47yyVYK 6
https://techbookfest.org/product/kdUdfz8a1KZQJZvJxRVu8V?productVariantID=3PtDPisanjt1xTD47yyVYK 7
https://techbookfest.org/product/kdUdfz8a1KZQJZvJxRVu8V?productVariantID=3PtDPisanjt1xTD47yyVYK ॻ͍ͯ·͢ʂʂ 8
Server Side Swiftͱ • Swift ΛαʔόʔαΠυ։ൃʹ༻͢Δ͜ͱ • Vapor Hummingbird
ͷΑ͏ͳ Web ϑϨʔϜϫʔΫ͕ར༻͞ΕΔ • ϧʔςΟϯάɺσʔλϕʔε౷߹ɺϦΫΤετॲཧͳͲͷॏཁͳػೳ ͕ఏڙ͞ΕɺϏδωεϩδοΫͷ࣮ʹूதͰ͖Δ 9
10
Vaporͱ • Server Side SwiftͷදతͳϑϨʔϜϫʔΫ • Swift Ͱ Web ΞϓϦͷ
API ɺ HTTP αʔόʔͷߏங͕Մೳ • पลϥΠϒϥϦ͕͔ͳΓॆ࣮ - ORMʢFluentʣɺೝূʢJWTɾOAuthʣɺWebSocketͳͲ 11
ͳͥVaporͳͷ͔ • ݱࡏͰ։ൃ͕ΜʹߦΘΕ͍ͯΔ • Server Side SwiftͷϑϨʔϜϫʔΫͰελʔ͕ଟ͍ • υΩϡϝϯτ͕ॆ࣮ •
Swift Concurrencyʹ͔ͬ͠Γै 12
13
͔͜͜Β։ൃͷ͓ 14
Πϯετʔϧํ๏ • HomebrewͰΠϯετʔϧ • versionͷ֬ೝ 15
ϓϩδΣΫτͷ࡞ • ࠷খߏͰϓϩδΣΫτΛ࡞ • APIαʔόʔΛىಈ 16
ϓϩδΣΫτͷ࡞ XcodeͰϏϧυޙɺhttp://127.0.0.1:8080 ͰWebαʔόʔ͕ىಈ͢Δʂ 17
ϑΥϧμߏ 18
ϑΥϧμߏ ը૾ελΠϧγʔτͳͲͷ ֎෦ʹެ։͢ΔϑΝΠϧΛ ֨ೲ͢Δɻ FileMiddlewareΛ༗ޮʹ͢Δ ඞཁ͕͋Δɻ 19
ϑΥϧμߏ શͯͷιʔεϑΝΠϧ͕֨ೲ͞ΕΔɻ શͯͷϩδοΫ͕Sources/App ҎԼʹೖΔɻ 20
ϑΥϧμߏ ΞϓϦέʔγϣϯͷϩδοΫΛ·ͱΊ Δͷʹద͍ͯ͠Δɻ ϦΫΤετΛड͚औΓɺԿΒ͔ͷܗͰ ϨεϙϯεΛฦ͕ؔ͢ఆٛ͞ΕΔɻ 21
ϑΥϧμߏ ͜ͷϑΝΠϧʹɺroutes(_:) ؚ͕ؔ ·Ε͍ͯΔɻ ϧʔςΟϯάΛఆٛ͢Δɻ 22
JSONΛฦͯ͠ΈΔ 23
JSONΛฦͯ͠ΈΔ HTTPϝιου 24
JSONΛฦͯ͠ΈΔ ΤϯυϙΠϯτ 25
JSONΛฦͯ͠ΈΔ JSONͷkey/valueΛࣙॻͰఆٛ 26
JSONΛฦͯ͠ΈΔ εςʔλείʔυ200Ͱฦ٫͢ΔΑ͏ʹɺ Τϯίʔυ 27
JSONΛฦͯ͠ΈΔ JSONΛฦ͢ 28
JSONΛฦͯ͠ΈΔ XcodeͰϏϧυޙɺhttp://127.0.0.1:8080/json ͰҎԼ͕ग़ྗ͞ΕΔ🎉 29
ͨͬͨ͜Ε͚ͩʂ 30
͕ॻ͍ͨίʔυΛோΊͯΈΔ 31
ເͷࠃͷΞτϥΫγϣϯͪ࣌ؒAPI • ެࣜΞϓϦͷಈ࡞͕͍ʂʂ Ϟνϕʔγϣϯ Έ • ެࣜαΠτΛεΫϨΠϐϯά • ֎෦APIΛ༻ •
Ϩεϙϯε5ؒΩϟογϡʹ٧ΊΔ 1ͭͷAPIʹ·ͱΊΔ 32
ເͷࠃͷΞτϥΫγϣϯͪ࣌ؒAPI εΫϨΠϐϯά͢Δσʔλ ֎෦API͔Βऔಘ͢Δσʔλ 33
ເͷࠃͷΞτϥΫγϣϯͪ࣌ؒAPI ΫϥΠΞϯτʹฦ͢σʔλ 34 AttractionBasicInfo + AttractionOperatingStatus Attraction
ເͷࠃͷΞτϥΫγϣϯͪ࣌ؒAPI εΫϨΠϐϯάͰऔಘͨ͠σʔλΛ[AttractionBasicInfo]ʹม 35
ເͷࠃͷΞτϥΫγϣϯͪ࣌ؒAPI ֎෦API͔Βऔಘͨ͠σʔλΛ[AttractionOperatingStatus]ʹม 36
ເͷࠃͷΞτϥΫγϣϯͪ࣌ؒAPI σʔλΛ[Attraction]ʹ౷߹ 37
ເͷࠃͷΞτϥΫγϣϯͪ࣌ؒAPI [Attraction]ΛΤϯίʔυ 38
ເͷࠃͷΞτϥΫγϣϯͪ࣌ؒAPI ࣮ߦ݁Ռ🎉 39 http://127.0.0.1:8080/tokyo_disney_resort/tdl/attraction Ͱ࣮ߦ
ເͷࠃͷΞτϥΫγϣϯͪ࣌ؒAPI 40 ίʔυͷஔ͖ॴ https://github.com/KaitoKudou/TokyoDisneyResortAPI
·ͱΊ Vapor ͱ • Server Side Swift ͷදతͳϑϨʔϜϫʔΫ • ORM
ೝূͳͲͷपลϥΠϒϥϦॆ࣮ • Swift Concurrency ʹରԠ͍ͯ͠ΔͷͰɺΫϩʔδϟͰඇಉظॲཧΛॻ͘ඞཁͳ͠ Server Side Swift ͱ • Swift ΛαʔόʔαΠυͷ։ൃͰ༻͢Δ͜ͱ • Vapor Hummingbird ͷΑ͏ͳ Web ϑϨʔϜϫʔΫ͕ར༻͞ΕΔ 41
ࢀߟจݙ • https://techbookfest.org/product/kdUdfz8a1KZQJZvJxRVu8V? productVariantID=3PtDPisanjt1xTD47yyVYK • https://docs.vapor.codes/ja/getting-started/folder-structure/ • https://zenn.dev/yusuga/articles/dc601e1f67a0b7 • https://speakerdeck.com/satotakeshi/5fen-dewakaruserver-side-
swift-vaporfalsemei-li • https://www.swift.org/documentation/server/ 42