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
260
Other Decks in Programming
See All in Programming
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
3
310
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
490
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
490
たのしいparse.y
ydah
3
120
快速入門可觀測性
blueswen
0
380
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
Beyond ORM
77web
7
990
Kaigi on Railsに初参加したら、その日にLT登壇が決定した件について
tama50505
0
100
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
760
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
340
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
The Cost Of JavaScript in 2023
addyosmani
45
7k
Building Applications with DynamoDB
mza
91
6.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Designing Experiences People Love
moore
138
23k
What's in a price? How to price your products and services
michaelherold
243
12k
Visualization
eitanlees
146
15k
Typedesign – Prime Four
hannesfritz
40
2.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
4 Signs Your Business is Dying
shpigford
181
21k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
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དྷΔ͔ʁ