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
430
案件にVaporを採用した所感
omochimetaru
June 07, 2018
Tweet
Share
More Decks by omochimetaru
See All by omochimetaru
Swiftの型推論を学ぼう | Let's Learn About Type Inference in Swift
omochi
3
4.2k
[スクリプト] Swiftの型推論を学ぼう
omochi
1
210
Swift6のprotocol
omochi
4
920
SwiftSyntaxをうまく使おう
omochi
2
250
今から使えるSwiftとC++の新しいinterop手法
omochi
0
330
CSFixとラベルマッチ
omochi
0
320
Swiftのmodifyアクセサとコルーチン
omochi
0
600
Swiftのオーバーロード選択のスコア規則12種類
omochi
3
280
SILを読もう
omochi
2
640
Other Decks in Programming
See All in Programming
GitHub Actionsの痒いところを埋めるサードパーティーランナー
dora1998
2
270
Ruby on Fails - effective error handling with Rails conventions
talyssonoc
0
300
AppRouter Panel Talk
yosuke_furukawa
PRO
1
530
Direct Style Effect Systems The Print[A] ExampleA Comprehension Aid
philipschwarz
PRO
0
410
2024 コーディング研修
ckazu
2
660
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
320
ペパボOpenTelemetry革命
pyama86
2
1.1k
Runtime Objects in Rust
mitsuhiko
0
220
酒飲んでたらテックリードになった話
spbaya0141
0
210
Powerfully Typed TypeScript
euxn23
4
1.7k
Long journey of Ruby standard library RubyKaigi 2024
andpad
2
230
TypeScriptコードの漸進的改善 / Progressive Improvement of TypeScript Code
medley
1
450
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
226
17k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
84
45k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
22
1.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Git: the NoSQL Database
bkeepers
PRO
423
63k
In The Pink: A Labor of Love
frogandcode
138
21k
RailsConf 2023
tenderlove
9
580
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.7k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
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