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
470
4
Share
案件にVaporを採用した所感
omochimetaru
June 07, 2018
More Decks by omochimetaru
See All by omochimetaru
Swift Concurrency 年表クイズ
omochi
3
280
型推論のちょっと深い話
omochi
1
540
Swiftの型推論を学ぼう | Let's Learn About Type Inference in Swift
omochi
4
11k
[スクリプト] Swiftの型推論を学ぼう
omochi
2
520
Swift6のprotocol
omochi
6
1.4k
SwiftSyntaxをうまく使おう
omochi
2
420
今から使えるSwiftとC++の新しいinterop手法
omochi
0
500
CSFixとラベルマッチ
omochi
0
460
Swiftのmodifyアクセサとコルーチン
omochi
0
920
Other Decks in Programming
See All in Programming
Back to the roots of date
jinroq
0
840
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
360
AIを導入する前にやるべきこと
negima
2
360
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
190
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
260
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
180
From Formal Specification to Property Based Test
ohbarye
0
2.6k
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
150
ハーネスエンジニアリングとは?
kinopeee
13
7k
AI Agent と正しく分析するための環境作り
yoshyum
2
490
「なんか〇〇ライブラリで脆弱性あるみたいなんだけど。。。」から始める脆弱性対応 / First Steps in Vulnerability Response
mackey0225
2
120
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
770
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Six Lessons from altMBA
skipperchong
29
4.2k
Claude Code のすすめ
schroneko
67
220k
Fireside Chat
paigeccino
42
3.9k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
550
Automating Front-end Workflow
addyosmani
1370
200k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
A better future with KSS
kneath
240
18k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
690
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Site-Speed That Sticks
csswizardry
13
1.2k
Discover your Explorer Soul
emna__ayadi
2
1.1k
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