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
DSL Design - Best Practices (XtextCON 2015)
Search
Sven Efftinge
May 20, 2015
Technology
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DSL Design - Best Practices (XtextCON 2015)
Sven Efftinge
May 20, 2015
More Decks by Sven Efftinge
See All by Sven Efftinge
Life of a Resource (XtextCON 2015)
svenefftinge
0
330
Future of Xtext (with Sebastian Zarnekow)
svenefftinge
0
19k
Other Decks in Technology
See All in Technology
AI時代のコスト管理を考えよう〜明日から使える実践AWSノウハウ~
yoshimi0227
0
930
「勝手に広まる」人気 AI エージェントを爆速で作ろう!(AWS Summit Japan 2026講演資料)
minorun365
PRO
10
2.6k
AIをフル活用してオンコール機能のプロトタイプを2日で作った話 / Building an AI-Powered On-Call Prototype in Just Two Days
nari_ex
0
140
Agile and AI Redmine Japan 2026
hiranabe
4
500
LayerX コーポレートエンジニアリング室におけるサプライチェーンセキュリティへの取り組み / Supply Chain Security at LayerX Corporate Engineering
yuyatakeyama
3
860
スタートアップにAmazon EKSは早すぎる? マルチプロダクト戦略を加速する Platform Engineeringの実践 / Is Amazon EKS Too Soon for Startups? Practical Platform Engineering to Accelerate a Multi-Product Strategy
elmodev09
1
1.9k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
5分でわかるDuckDB Quack
chanyou0311
4
260
從觀望到全公司落地:AI Agentic Coding 導入實戰 — 流程整合與安全治理
appleboy
0
130
5分でわかる Amazon Connect_20260608
hwangbyeonghun
0
120
作る力から、見極める力へ — AI時代に広がるエンジニアの価値と役割
rince
0
360
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
200
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.6k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
330
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
210
For a Future-Friendly Web
brad_frost
183
10k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
250
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
190
Information Architects: The Missing Link in Design Systems
soysaucechin
0
980
Transcript
DSL DESIGN Sven Efftinge
Why an External DSL • Write the thing you care
in the way you want • Have compile time feedback, that understand your domain • Be cross platform / platform independent
DSL Design != GPL Design
A Good DSL makes editing simpler makes reading simpler improves
stakeholder communication uses a familiar syntax nicely integrates into workflow tools and execution are fast is highly maintainable
DSL A Powerful Programming Interface User Interface
Who does What Requirements Engineering
Use Existing Domain Terminology
Use Familiar SYNTAX
When To Sugar Be explicit and regular unless the concept
is used often and well known
Never Change
class { visibility=public name="HelloWorld" members = [ method { visibility=public
static=true returnType=void name="main" parameters = [ parameter { type = String varArgs = true name = args } ] ... } ] } public class HelloWorld { public static void main(String... args) { System.out.println("Hello World"); } } Generic vs. Specific
Business Readable DSLs
Use Structure, use Whitespace
Be Regular
Keywords First reduces look ahead for the parser &
the reader visual anchor
Good Defaults
Multiple Files FTW a package or namespace is a logical
container but not necessarily a physical! improves collaboration
Names! Simple name clashes are rare We think in names
No more UUIDs!
Loose Grammar
Strict Validation
you ain’t gonna need it
Don’t Reinvent Expressions
Invasiveness • The outside view must only change when
the file changes physically • Bad Example: Xtend return types
Dynamic Scoping Never!
Preprocessors Nooo!
N-to-1 Code Generation source source generated No more incremental builds!
OutOfMemoryException!
Questions