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
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
初めてDefinitelyTypedにPRを出した話
syumai
0
420
Ethereum_.pdf
nekomatu
0
460
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
CSC509 Lecture 09
javiergs
PRO
0
140
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
Jakarta EE meets AI
ivargrimstad
0
190
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
120
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
Facilitating Awesome Meetings
lara
50
6.1k
Building an army of robots
kneath
302
43k
Typedesign – Prime Four
hannesfritz
40
2.4k
Designing for humans not robots
tammielis
250
25k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Documentation Writing (for coders)
carmenintech
65
4.4k
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དྷΔ͔ʁ