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
DSLの使い所
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
disc99
March 27, 2017
Technology
98
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DSLの使い所
disc99
March 27, 2017
More Decks by disc99
See All by disc99
マルチプロダクト×マルチテナントを支えるモジュラモノリスを中心としたアソビューのアーキテクチャ
disc99
1
1.4k
アーキテクチャ選択の裏側
disc99
0
130
120リポジトリを1つのMonorepoに統合した理由
disc99
1
1.3k
モノリスとマイクロサービスを経てモジュラモノリスを導入した実践事例
disc99
25
15k
PaaS DX by Cloud Native Buildpacks
disc99
0
290
全てのAPIをProtocol Buffersで管理する / Manage all APIs with Protocol Buffers
disc99
2
5.8k
Serverless Application
disc99
1
3.3k
イベント駆動マイクロサービスアーキテクチャ / Event-Driven Microservices Architecture
disc99
4
3.2k
Event Sourcing 101
disc99
1
230
Other Decks in Technology
See All in Technology
こんなアーキテクチャ図は嫌だ BEYOND THE TIME: 半年後の自分へ贈る15のメッセージ / 15 of Anti-pattern in AWS Architecture Diagrams
naospon
3
300
なぜSRE・セキュリティは評価されないのか?守りの組織を事業成長エンジンに変えた実践
cscengineer
PRO
3
2.4k
AIで開発は速くなったのに、なぜ現場は楽にならないのか 〜あなたの組織のボトルネックを突き止めるワークショップ〜
jacopen
1
310
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
1
490
Where Is JetBrains AI Heading- — Central CLI, Air Alpha, and the Agentic Development Stack
x5gtrn
PRO
0
150
Podは生きているのにGoだけが落ちる:GOGCとGOMEMLIMITで追うInvisible OOM Killの謎
tkc66buzz
1
500
AI時代だからこそ、スケールしないことをやろう
yutashigemura
1
130
多層防御と最⼩権限で実現する、安全なAIエージェント設計パターン
lycorptech_jp
PRO
1
250
HRC_Frontend_Conference_Fukuoka_2026.pdf
ts020
0
370
OpenTelemetryのメトリクスをCloudWatchに送ってPromQLで見てみた
ota1022
0
120
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/6 - 2026/8
oracle4engineer
PRO
0
140
20260912_スクラムにジェネラリストは必要か
ryugen04
0
310
Featured
See All Featured
Leo the Paperboy
mayatellez
9
2.3k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
520
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
270
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
620
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
680
My Coaching Mixtape
mlcsv
0
310
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.8k
Music & Morning Musume
bryan
47
7.4k
Transcript
DSLの使い所 #ShinjukuLT @disc99
もくじ • DSLとは • DSLの種類類 • DSLの利利⽤用例例 • まとめ
DSLとは • ドメイン特化⾔言語(Domain Specific Language) • <=> 汎⽤用⾔言語(JavaやRubyなど) • 特定の領域(ドメイン)の問題を解決
• ミニ⾔言語
なぜDSL? • ドメイン特化⾔言語 > コードは当該分野の専⾨門 家にとって読みやすく理理解 しやすくなります
DSLの種類類 • 内部DSL • 汎⽤用のプログラミング⾔言語の機能を利利⽤用 • 外部DSL • 汎⽤用のプログラミング⾔言語とは別の構⽂文
内部DSL • ホスト⾔言語(Java、Rubyなどの汎⽤用⾔言語) • ⾃自由度が⾼高い⾔言語が便便利利(シンタックスシュ ガー、フォーマット、AST変換、マクロなど) • ホスト⾔言語の機能を呼び出せるものもある • ホスト⾔言語の構⽂文の制約あり
内部DSLの利利⽤用例例 • Gradle: ビルドに特化(Groovy) • Vagrant: 仮想開発環境構築に特化(Ruby) • Gatling: 負荷テストに特化(Scala)
• Apache Camel: 様々な処理理を連結に特化 (Java)
外部DSL • ホスト⾔言語の制約がほとんど無い • 問題領域に対して最適な表現を選択できる • 構⽂文解析機能が必要
外部DSLの利利⽤用例例 • make: ビルド⾃自動化に特化 • 2Way-SQL: アプリ、ツール両⽅方からのSQLの 実⾏行行に特化 • SQLそのものやCSSなど分類類される場合も
My DSL • Hogan • https://github.com/disc99/hogan • DB操作を直感的に⾏行行うためのライブラリ • DB操作に特化
• Groovyの演算⼦子オーバーロードとAST変換を利利⽤用
Hoganの利利⽤用例例 • SQLテーブルっぽく構 造を定義 => INSERT実⾏行行
コントリビュート⼤大歓迎!!
まとめ • DSLは問題領域(ドメイン)に特化した⾔言語 • DSLには内部DSLと外部DSLが存在する • どちらを使うかはドメインをどのように表現し たいか次第 • DSLには⼀一定の学習コスト、メンテコストが発
⽣生するので適切な使い所を考える
参考 • プログラマが知るべき97のこと:ドメイン特化⾔言語 • http:// xn--97-273ae6a4irb6e2hsoiozc2g4b8082p.co m/ %E3%82%A8%E3%83%83%E3%82%BB%E3% 82%A4/%E3%83%89%E3%83%A1%E3%82% A4%E3%83%B3%E7%89%B9%E5%8C%96%E
8%A8%80%E8%AA%9E