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
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
2
360
Expoによるアプリ開発の現在地とReact Server Componentsが切り開く未来
yukukotani
2
230
はじめての Go * WASM * OCR
sgash708
1
120
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
240
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
3
840
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
5
1.1k
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
1.2k
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
220
ML.NETで始める機械学習
ymd65536
0
240
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
750
Jakarta EE meets AI
ivargrimstad
0
660
自力でTTSモデルを作った話
zgock999
0
120
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
32
6.4k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Music & Morning Musume
bryan
46
6.4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
580
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Invisible Side of Design
smashingmag
299
50k
How to Ace a Technical Interview
jacobian
276
23k
What's in a price? How to price your products and services
michaelherold
244
12k
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དྷΔ͔ʁ