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
440
案件にVaporを採用した所感
omochimetaru
June 07, 2018
Tweet
Share
More Decks by omochimetaru
See All by omochimetaru
型推論のちょっと深い話
omochi
1
400
Swiftの型推論を学ぼう | Let's Learn About Type Inference in Swift
omochi
4
5.6k
[スクリプト] Swiftの型推論を学ぼう
omochi
2
350
Swift6のprotocol
omochi
6
1.2k
SwiftSyntaxをうまく使おう
omochi
2
310
今から使えるSwiftとC++の新しいinterop手法
omochi
0
400
CSFixとラベルマッチ
omochi
0
370
Swiftのmodifyアクセサとコルーチン
omochi
0
700
Swiftのオーバーロード選択のスコア規則12種類
omochi
3
350
Other Decks in Programming
See All in Programming
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
290
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Jakarta EE meets AI
ivargrimstad
0
180
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Featured
See All Featured
Visualization
eitanlees
145
15k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
How to Ace a Technical Interview
jacobian
276
23k
Code Reviewing Like a Champion
maltzj
520
39k
How to train your dragon (web standard)
notwaldorf
88
5.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
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