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
JavaエンジニアからみたVapor
Search
kissybnts
November 21, 2017
Programming
0
180
JavaエンジニアからみたVapor
Swift/Kotlin合同勉強会 #2のLT資料です
kissybnts
November 21, 2017
Tweet
Share
More Decks by kissybnts
See All by kissybnts
Kolin Modifiers
kissybnts
2
270
Other Decks in Programming
See All in Programming
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
3
2.8k
歴史と現在から考えるスケーラブルなソフトウェア開発のプラクティス
i10416
0
300
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
390
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
300
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1.1k
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
420
“あなた” の開発を支援する AI エージェント Bedrock Engineer / introducing-bedrock-engineer
gawa
4
320
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
ASP.NET Core の OpenAPIサポート
h455h1
0
120
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
630
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
1
450
Featured
See All Featured
Being A Developer After 40
akosma
89
590k
It's Worth the Effort
3n
183
28k
Navigating Team Friction
lara
183
15k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
How to train your dragon (web standard)
notwaldorf
89
5.8k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Six Lessons from altMBA
skipperchong
27
3.6k
The Language of Interfaces
destraynor
155
24k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
870
Thoughts on Productivity
jonyablonski
68
4.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Transcript
+BWBΤϯδχΞ͔ΒΈͨ Vapor
Name: Kishida @KissyBnts Company: Monstar Lab, Inc. Role: Server side
engineer, Bridge engineer Language: Java, Kotlin, TypeScript
What is Vapor?
None
None
None
None
None
+BWBΤϯδχΞ͔ΒΈͨ Vapor
͞ΘͬͯΈΑ͏ͱࢥͬͯΒ͏͜ͱΛඪʹ
w ڥߏங͕؆୯ w Ұ௨Γͷػೳ͕ἧ͍ͬͯͯՃ͕؆୯ w υΩϡϝϯτ͕๛ͰεϚʔτ w ׂͱ 03.͕͍͍͢
w ڥߏங͕؆୯ w Ұ௨Γͷػೳ͕ἧ͍ͬͯͯՃ͕؆୯ w υΩϡϝϯτ͕๛ͰεϚʔτ w ׂͱ 03.͕͍͍͢
None
1. $ grade init - -type java-application 2. Getting startedʹԊͬͯdependenciesΛՃ
3. ίʔυΛॻ͘ 4. Run
Vapor Toolbox
$ vapor new <name> - -template=<template name> $ cd <name>
$ vapor run template list https://github.com/search?utf8=%E2%9C%93&q=topic%3Avapor+topic%3Atemplate&type=Repositories
$ vapor xcode -y
w ڥߏங͕؆୯ w Ұ௨Γͷػೳ͕ἧ͍ͬͯͯՃ͕؆୯ w υΩϡϝϯτ͕๛ͰεϚʔτ w ׂͱ 03.͕͍͍͢
None
None
None
None
w ڥߏங͕؆୯ w Ұ௨Γͷػೳ͕ἧ͍ͬͯͯՃ͕؆୯ w υΩϡϝϯτ͕๛ͰεϚʔτ w ׂͱ 03.͕͍͍͢
w ڥߏங͕؆୯ w Ұ௨Γͷػೳ͕ἧ͍ͬͯͯՃ͕؆୯ w υΩϡϝϯτ͕๛ͰεϚʔτ w ׂͱ 03.͕͍͔ͬͨ͢ w
ڥߏங͕؆୯ w Ұ௨Γͷػೳ͕ἧ͍ͬͯͯՃ͕؆୯ w υΩϡϝϯτ͕๛ͰεϚʔτ w 7FSTJPOͰ݁ߏมΘΔΈ͍ͨ
JPA? Hibernate?
JPA? Hibernate? ༷͕Θ͔Γʹ͍͘ େྔͷΞϊςʔγϣϯ ܹΫΤϦΛൃߦ
MyBatis? Doma2? jooq? requery?
MyBatis? Doma2? jooq? requery? ,PUMJOͰॻ͘ͱቕΔ ࣗಈίʔυੜʹ,BQUͰቕΔ 9.-ʹॻ͔ͳ͍ͱ͍͚ͳ͍
Fluent
w ཧղ͍͢͠ w ίʔυΛࣗಈੜ͠ͳ͍ w ϚΠάϨʔγϣϯͰ͖Δ w 2VFSZCVJMEJOHͰ͖Δ
final class User : Model { var name: String var
age: Int init(name: String, age: Int) { self.name = name self.age = age } init(row: Row) throws { name = try row.get(“name”) age = try row.get(“age”) } func makeRow() throws -> Row { var row = Row() try row.set(“name”, name) try row.set(“age”, age) return row } }
let user = User(“Kishida”, 25) try user.save() try user.delete() try
User.makeQuery() .filter(“age”, 20) .sort(“id”, .ascending) .all()
w ͍ Β͍͠ w 9DPEFͰ։ൃͰ͖Δ w 7BQPS5PPMCPYͰ)FSPLV 7BQPSDMPVEʹ%FQMPZͰ͖Δ w
ެࣜͷ4MBDLͰ࣭Ͱ͖Δ w FUD ΄͔ʹ
Server sideΛ࢝ΊΔͷʹ࠷ద ݁
Kotlinʹ͜͏͍͏ϑϨʔϜϫʔΫ͕ཉ͍͠ ݁
KotlinΤϯδχΞ͕࢝ΊΔཧ༝ɾɾɾ
ݱঢ়ͳ͍
w Kotlinͱ͍͏͔JavaServer sideͰಈ͘ w JavaͷFramework͕KotlinΛެࣜαϙʔτ w JetBrainsͷIDEΛ͑Δ w Xcode׳Εͳ͍
ͰKotlinͷFramework͕͍͍
x Exposed / Squash
એ
2018/01/ʹVapor meetup͢ΔΈ͍ͨͰ͢ $POUSJCVUPSͷ5BOOFSͱ͔-PHBOདྷΔ͔ʁ