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
280
Other Decks in Programming
See All in Programming
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
590
AIともっと楽するE2Eテスト
myohei
6
2.6k
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
160
Team operations that are not burdened by SRE
kazatohiei
1
310
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
650
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
700
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
470
Quand Symfony, ApiPlatform, OpenAI et LangChain s'allient pour exploiter vos PDF : de la théorie à la production…
ahmedbhs123
0
190
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
11k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
470
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
2.1k
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
220
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
690
Visualization
eitanlees
146
16k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Fireside Chat
paigeccino
37
3.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
How to Think Like a Performance Engineer
csswizardry
25
1.7k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Side Projects
sachag
455
42k
Designing for Performance
lara
610
69k
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དྷΔ͔ʁ