Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
黒べこ本の話 + Ktor試してみた #m3kt
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Taro Nagasawa
October 02, 2017
Programming
5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
黒べこ本の話 + Ktor試してみた #m3kt
どこでもKotlin #2(
https://m3-engineer.connpass.com/event/65588/)で発表したスライドです
。
Taro Nagasawa
October 02, 2017
More Decks by Taro Nagasawa
See All by Taro Nagasawa
Android開発者のための Kotlin Multiplatform入門
ntaro
0
1.8k
Kotlin 最新動向2022 #tfcon #techfeed
ntaro
1
2.4k
#Ubie 狂気の認知施策と選考設計
ntaro
14
14k
UbieにおけるサーバサイドKotlin活用事例
ntaro
1
1.2k
KotlinでSpring 完全理解ガイド #jsug
ntaro
6
3.7k
Kotlinでサーバサイドを始めよう!
ntaro
1
1.1k
Androidからサーバーサイドまで!プログラミング言語 Kotlinの魅力 #devboost
ntaro
5
3.1k
Kotlin Contracts #m3kt
ntaro
4
4.4k
How_to_Test_Server-side_Kotlin.pdf
ntaro
1
590
Other Decks in Programming
See All in Programming
phperだってパンチカードでコーディングしたい
o0h
PRO
0
220
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
200
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
130
Domain-Driven Transformation
hschwentner
2
2.3k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
34
15k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
340
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
20
21k
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
370
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
480
Are APIs Still Relevant in the AI Era?
soyuka
0
420
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
190
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
590
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
510
Speed Design
sergeychernyshev
33
2.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
260
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
300
Become a Pro
speakerdeck
PRO
31
6.3k
The World Runs on Bad Software
bkeepers
PRO
72
12k
RailsConf 2023
tenderlove
30
1.6k
Transcript
黒べこ本の話 + Ktor試してみた 2017-09-28 どこでもKotlin #m3kt 長澤太郎 @ngsw_taro
自己紹介 • 長澤 太郎(たろーって呼んでね) • @ngsw_taro • エムスリー株式会社 • ディズニーが大好き!
エムスリーは 国内最大規模の 医療情報プラット フォームを開発・ 運営しています。 エンジニア募 集中!
祝☆新刊 10/6発売
概要 • 「Kotlin Webアプリケーション」 • リックテレコム社 • 10/6発売 • 284ページ
• 3部構成 • 3,000円(税別)
第1部 • Kotlin言語について詳解 • Kotlinの概要と誕生の背景 • 開発環境の紹介、構築方法 • 文法と言語機能 •
Javaとの相互運用性 • Kotlin ver1.1について
第2部 • 簡単なWebアプリケーションの開発 ◦ TODOリスト ◦ DBを持たない ◦ 画面を持たない(REST API)
• Spark Framework
第3部 • ちょっと本格的なWebアプリ開発 ◦ TODOリスト ◦ DBを持つ(インメモリ、ファイル) ◦ 画面を持つ(Thymeleaf) ◦
テスト ◦ Heroku • Spring Boot
Re:VIEW ソースファイル PDF, TXTにビルド 編集さん メール 執筆環境 PDFを読む TXTを読む
Kotlinについて 詳しい スピード重視 かなり詳しい 特徴 Kotlinについて詳しい解 説(私の書き下ろし) Androidアプリ開発での 活用方法を解説。 Webアプリケーションの
開発にKotlinを使う。 Web初心者でも読み進め られる内容。Kotlin 1.1の 一部機能や文法について も解説。 これさえ読めばKotlin博 士になれるレベル。 Androidなどの応用につ いてはあまり言及されて いない。 どの本を読めばいいのか?
Ktor試してみた
Ktorとは • KotlinのためのWebマイクロフレームワーク • 非常に薄く、余分な機能は3rdパーティ任せ ◦ ロギング、永続化、テンプレートエンジン、DI ◦ サーブレットコンテナ: Tomcat,
Jetty, Netty • DSL ◦ ラムダ(特に拡張関数としてのラムダ)を多様 ◦ 宣言的にプログラムを組み立てる • ノンブロッキング ◦ 複雑な非同期プログラミングをコルーチンで
Hello World fun main(args: Array<String>) { embeddedServer(Netty, 8080) { routing
{ get("/hello") { call.respondText("Hello, world") } }.start(wait = true) } }
Hello World fun main(args: Array<String>) { embeddedServer(Netty, 8080) { install(Routing)
{ get("/hello") { call.respondText("Hello, world") } }.start(wait = true) } }
Ktorの主要な登場人物 • Application • ApplicationCall • ApplicationFeature
ところで • 「黒べこ本」で扱う題材 ◦ TODOリスト Spark Framework ◦ TODOリスト Spring
Boot • 購入者特典 ◦ 各ソースファイル一式 ◦ 導入のための解説動画
TODOリスト Ktorバージョンを公開しました https://github.com/ntaro/todolist-ktor
ちょっとだけ触ってみた所感 • Sparkと比べると癖がある ≒ 学習コスト高め? • すでに用意されているAPIを触る分には、コルーチンを意識す る必要はなさそう • 業務で使うならSpringかなぁ
• まだベータ版なので今後が楽しみ ◦ コントリビュートするチャンス!
ご静聴 ありがとうございました