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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kaito Kudo
May 17, 2025
Technology
100
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
150
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
550
iOSDC Japan 2022 スポンサーセッション
kaitokudou
0
2.2k
iOS勉強会資料
kaitokudou
0
140
App Storeにアプリをリリースした話
kaitokudou
0
58
Other Decks in Technology
See All in Technology
Temporal 最高!でも改めて「日付」について調べたら人類の負債すぎる件
riyaamemiya
0
210
Getting Started with Google Antigravity
glaforge
0
330
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
190
S3 Filesで挑む! 八戸せんべい汁の食べ頃問題
usanchuu
0
120
React改造してみた
tsukina_7mochi
0
140
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
300
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
7
5.2k
夫婦で子育てするための育児標準化
codmoninc
PRO
0
480
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
210
LLM Content Moderationを支える評価・改善ループの実践
suikabar
1
170
Kiro Crewで「みのるん式」仕事術やってみた
minorun365
PRO
3
920
CTO Night|NotionのAIエージェントとFDE
kzkhykw1991
0
270
Featured
See All Featured
Being A Developer After 40
akosma
92
590k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
How to make the Groovebox
asonas
2
2.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
Music & Morning Musume
bryan
48
7.4k
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