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
案件にVaporを採用した所感
Search
omochimetaru
June 07, 2018
Programming
4
460
案件にVaporを採用した所感
omochimetaru
June 07, 2018
Tweet
Share
More Decks by omochimetaru
See All by omochimetaru
型推論のちょっと深い話
omochi
1
500
Swiftの型推論を学ぼう | Let's Learn About Type Inference in Swift
omochi
4
9.6k
[スクリプト] Swiftの型推論を学ぼう
omochi
2
460
Swift6のprotocol
omochi
6
1.3k
SwiftSyntaxをうまく使おう
omochi
2
370
今から使えるSwiftとC++の新しいinterop手法
omochi
0
470
CSFixとラベルマッチ
omochi
0
420
Swiftのmodifyアクセサとコルーチン
omochi
0
830
Swiftのオーバーロード選択のスコア規則12種類
omochi
3
440
Other Decks in Programming
See All in Programming
XP, Testing and ninja testing ZOZ5
m_seki
2
250
iOSDC.pdf
chronos2500
2
650
Advance Your Career with Open Source
ivargrimstad
0
270
クラシルを支える技術と組織
rakutek
0
190
株式会社 Sun terras カンパニーデック
sunterras
0
200
Introducing ReActionView: A new ActionView-Compatible ERB Engine @ Kaigi on Rails 2025, Tokyo, Japan
marcoroth
3
890
10年もののAPIサーバーにおけるCI/CDの改善の奮闘
mbook
0
720
開発生産性を上げるための生成AI活用術
starfish719
1
150
プロダクト開発をAI 1stに変革する〜SaaS is dead時代で生き残るために〜 / AI 1st Product Development
kobakei
0
470
CSS Linter の現在地 2025年のベストプラクティスを探る
ryo_manba
10
3.2k
気づいて!アプリからのSOS 〜App Store Connect APIで始めるパフォーマンス健康診断〜
waka12
0
260
iOS 17で追加されたSubscriptionStoreView を利用して5分でサブスク実装チャレンジ
natmark
0
500
Featured
See All Featured
Music & Morning Musume
bryan
46
6.8k
Git: the NoSQL Database
bkeepers
PRO
431
66k
RailsConf 2023
tenderlove
30
1.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Designing for humans not robots
tammielis
254
25k
A Modern Web Designer's Workflow
chriscoyier
697
190k
A better future with KSS
kneath
239
17k
How to Think Like a Performance Engineer
csswizardry
27
2k
Practical Orchestrator
shlominoach
190
11k
Code Review Best Practice
trishagee
72
19k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Docker and Python
trallard
46
3.6k
Transcript
Ҋ݅ʹvaporΛ࠾༻ͨ͠ ॴײ omochimetaru @ 1
ࣗݾհ omochimetaru झຯ: SwiftίϯύΠϥ גࣜձࣾQoncept http://qoncept.co.jp ө૾ղੳ, ΞϓϦ։ൃͳͲ 2
ࣗݾհ swift-developers-japan @ Discord https://medium.com/swift-column/discord-ios-20d586e373c0 [06/11] ͓ཹक൪Ͱ͍͍͚ͭͯΔΜʂWWDCΰϦΰϦΩϟ ονΞοϓձ https://connpass.com/event/89868/ [06/22]
Θ͍Θ͍swiftc #3 https://iosdiscord.connpass.com/event/87509/ 3
डୗͷΞϓϦҊ݅ iOSΞϓϦ + APIαʔό + ཧ༻CMS نখ͞Ί 4
ಥ؏εέδϡʔϧ αʔόαΠυΛPHPͰ֎ Ұஈམ 5
APIαʔόΛSwift/VaporͰ php࣮Λஔ͖͑ͨɻ ࠓͷ • vapor3ܥϕʔλ • ಉ྅ͷ @t-ae ͱڞಉͰ࡞ۀ •
αʔό, ΫϥΠΞϯτΓସ͑த 6
ߏ docker-compose • nginx(SSL) • mysql • php(api + cms)
• phpMyAdmin • vapor ΠϝʔδެࣜखॱͰ 7
։ൃ XcodeͰ࣮ߦ DBsshϙʔτϑΥϫʔυͯ͠ςεταʔόΛซ༻ 8
ίʔυͷڞ༗ • piyo-common: ڞ௨෦ύοέʔδ CarthageͱSwiftPM • piyo-iOS: iOS import PiyoCommon
• piyo-vapor: vapor import PiyoCommon 9
ಛʹAPI ݩʑͷ࣮ public struct APIMeGetRequest: APIRequestProtocol, Encodable {} αʔόʔଆͰDecodableΛՃ extension
APIMeGetRequest: Decodable {} γϦΞϥΠζCodableʹҰͯ҆͠ఆ 10
API ϋϯυϥՃͯ͠Routerʹొ public protocol APIRequestHandler: APIRequestProtocol { static func handle(request:
Request) throws -> Future<ResponseType> } ͜ͷลͷαϯϓϧ https://github.com/t-ae/vapor-api-example 11
Ϟσϧͱ͔ϢʔςΟϦςΟڞ༗ Ұ෦ͷܕ͕ͳ͍ͷͰذͯࣗ͠࡞ #if Vapor public struct GLKVector2 { public var
x: Float public var y: Float public init(_ x: Float, _ y: Float) { self.x = x self.y = y } } #endif 12
Xcode։ൃ vapor෦࣮͕ͲΜͲΜ͑Δ σόοΨͰࢭΊΕεϨουϋϯυϦϯάΘ͔Δ SwiftPMͰνΣοΫΞτ͞ΕͯΔͷͰͦͷͰมߋՄೳ 13
Future ඇಉظͰૣͦ͏(ະܭଌ) Swiftͷܕࢧԉ͕͋ΔͷͰॻ͖͍͢ async/awaitָ͠Έ https://forums.swift.org/t/concurrency-async-await-actors/6499 14
ࠔͬͨ͜ͱ • ֆจࣈ(utf8mb4)ରԠ https://github.com/vapor/mysql/pull/159 • ϩʔΧϧλΠϜ, λΠϜκʔϯରԠ https://github.com/vapor/fluent/issues/464 • RowܕࢦఆͰͷSELECT
https://github.com/vapor/fluent/issues/363 15
ࠔͬͨ͜ͱ • Ϗϧυ࣌ͷڥݕग़ https://github.com/vapor/vapor/issues/1701 • Connection: close ϋϯυϦϯά vs file_get_contents
(ௐࠪத) • Linuxϓϩηεͷσόοά (ͦΕͰLLDBͳΒɾɾɾ) 16
ࠔͬͨ͜ͱ ඞཁͳͱ͜ΖϑΥʔΫͯ͠ରԠ 17
·ͱΊ ΊͬͪΌ͍͍ υΩϡϝϯτ͕ͳͯ͘ιʔε͕ಡΊΕ͍͍ ଟ͍ɺίϯτϦϏϡʔλ૿͑ͯ΄͍͠ 18