Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ductモジュール入門
Search
Kent OHASHI
November 28, 2019
Programming
0
98
Ductモジュール入門
Clojureフレームワーク"Duct"の拡張方法を理解しよう!
Kent OHASHI
November 28, 2019
Tweet
Share
More Decks by Kent OHASHI
See All by Kent OHASHI
🐬の推し本紹介2025: 『コーディングを支える技術 ――成り立ちから学ぶプログラミング作法』
lagenorhynque
0
51
KotlinでミニマルなResult実装による関数型エラーハンドリング
lagenorhynque
0
20
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
160
関数型言語テイスティング: Haskell, Scala, Clojure, Elixirを比べて味わう関数型プログラミングの旨さ
lagenorhynque
1
130
純LISPから考える関数型言語のプリミティブ: Clojure, Elixir, Haskell, Scala
lagenorhynque
1
160
From Scala/Clojure to Kotlin
lagenorhynque
0
70
TDD with RDD: Clojure/LispのREPLで変わる開発体験
lagenorhynque
0
97
🐬の推し本紹介2024: 『脱・日本語なまり 英語(+α)実践音声学』
lagenorhynque
1
130
do Notation Equivalents in JVM languages: Scala, Kotlin, Clojure
lagenorhynque
0
99
Other Decks in Programming
See All in Programming
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
130
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
140
WebRTC と Rust と8K 60fps
tnoho
2
2k
認証・認可の基本を学ぼう後編
kouyuume
0
240
ローターアクトEクラブ アメリカンナイト:川端 柚菜 氏(Japan O.K. ローターアクトEクラブ 会長):2720 Japan O.K. ロータリーEクラブ2025年12月1日卓話
2720japanoke
0
730
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
150
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
120
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
730
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
390
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
320
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
3
830
Featured
See All Featured
Building Applications with DynamoDB
mza
96
6.8k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Done Done
chrislema
186
16k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.5k
Faster Mobile Websites
deanohume
310
31k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Designing Experiences People Love
moore
143
24k
The Language of Interfaces
destraynor
162
25k
Docker and Python
trallard
47
3.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
980
Transcript
Duct モジュール⼊⾨ Duct モジュール⼊⾨ Clojure フレームワーク "Duct" の拡張⽅法を理解しよう Clojure フレームワーク
"Duct" の拡張⽅法を理解しよう
lagénorhynque lagénorhynque (defprofile lagénorhynque :id @lagenorhynque :reading "/laʒenɔʁɛ̃ k/" :aliases
[" カマイルカ "] :languages [Clojure Haskell English français] :interests [programming language-learning law mathematics] :commits ["github.com/lagenorhynque/duct.module.pedestal" "github.com/lagenorhynque/duct.module.cambium"] :contributes ["github.com/japan-clojurians/clojure-site-ja"])
1. Integrant の基本 2. Duct の基本 3. Duct モジュールの作り⽅
Integrant の基本 Integrant の基本
とは とは 依存関係に従ってライフサイクル管理を⾏う仕組み cf. , , Integrant Integrant Component mount
Clip
ライフサイクルフックとしてのマルチメソッド ライフサイクルフックとしてのマルチメソッド デフォルト: 何もしない デフォルト: 何もしない デフォルト: init-key と同じ デフォルト:
halt-key! と同じ integrant.core/prep-key integrant.core/init-key integrant.core/halt-key! integrant.core/resume-key integrant.core/supend-key!
Duct の基本 Duct の基本
とは とは Integrant に対する便利な拡張 Duct Duct
Leiningen テンプレート Leiningen テンプレート duct duct # API 関連、ルーティングライブラリ Ataraxy
、サンプルコード付き $ lein new duct <project name> +api +ataraxy +example
コア機能 コア機能 duct/core duct/core duct.core/load-hierarchy duct.core/read-config duct.core/prep-config
標準モジュール 標準モジュール duct/module.web duct/module.ataraxy duct/module.sql duct/module.cljs duct/module.logging
Duct モジュールの作り⽅ Duct モジュールの作り⽅
実装⽅法 実装⽅法 Clojure サーバサイドフレームワークDuct ガイド > Duct の「モジュール」とは
実例 1: 実例 1: API/ サービス開発ライブラリ を組み込む モジュール 標準モジュール の代替
duct.module.pedestal duct.module.pedestal Pedestal duct/module.web
実例 2: 実例 2: JSON 形式でのログ出⼒を可能にするライブラリ を組み込むモジュール 標準モジュール の代替 duct.module.cambium
duct.module.cambium Cambium duct/module.logging
Further Reading Further Reading 第3 章: Clojure によるデータ指向DSL を駆使 したREST
API 開発 Clojure/ClojureScript 関連リンク集 > Web サーバ サイド (Clojure) Clojure サーバサイドフレームワークDuct ガイド 『3 つのLisp 3 つの世界』 Clojure のDuct でWeb API 開発してみた