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
未来大LT_2025.pdf
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kaito Kudo
May 17, 2025
Technology
98
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
130
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
500
iOSDC Japan 2022 スポンサーセッション
kaitokudou
0
2.2k
iOS勉強会資料
kaitokudou
0
130
App Storeにアプリをリリースした話
kaitokudou
0
53
Other Decks in Technology
See All in Technology
FORENSIA: ローカルLLMフォレンジックハーネス
sumeshi
2
420
Apache Icebergインフラストラクチャ:ストレージ・カタログ・エンジンの選択肢とClouderaプラットフォームでの実装
tsugiyama
0
120
その“隠したつもり”が命取り ── 自前と平文をやめて「正解」に委ねる
kuroneko13
0
130
PLATEAU で バーチャル花火大会
tatsuya1970
0
160
Go 1.27 の標準パッケージに uuid が入った!のでいろいろ喋る / go_127_std_go_uuid
convto
1
260
事業価値と Engineering 2026年度版
recruitengineers
PRO
51
25k
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.2k
JavaScript 研修 (2026)
recruitengineers
PRO
2
620
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
案件に一番詳しいAIを Amazon Bedrock AgentCore で作る ― 知見が知見を生むチームへ / Compounding Knowledge with AgentCore
yusukeshimizu
1
140
Digitization部 紹介資料
sansan33
PRO
2
7.7k
20260804_Q4AzureUpdateBite_FabricDataAgentの精度を高める設計.pdf
matayuuu
1
140
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
410
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
BBQ
matthewcrist
89
10k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Why Our Code Smells
bkeepers
PRO
340
58k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Mobile First: as difficult as doing things right
swwweet
225
10k
Test your architecture with Archunit
thirion
1
2.3k
Building an army of robots
kneath
306
46k
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