Explanation of what DSLs are with slight shift towards MPS.
Slides from my talk at Deutsche Bank.
There is nothing particulary new in these slides, there are mostly based on Martin Fowler talks and book (http://www.martinfowler.com/dslwip/).
Size: 969.79 KB
Language: en
Added: Nov 08, 2009
Slides: 69 pages
Slide Content
(Domain Specific Language,
not Direct Server Link) [email protected]
DSL explained
DSL premises
and only then for computers
Code is written for
people
Objects ---> Vocabulary
Grammar ---> Language
Domain Driven
Design
DSL
DSL is advanced stuff
DSL example
(by Martin Fowler)
DSL is a computer
language with:
human language nature
limited expressiveness
domain focus
DSL types
internal external
language
workbench
Internal DSL
example
External DSL
example
Language workbench
example
More examples
regular expressions
CSSSQL
all XML
Unix config files
Ruby on Rails
mocking frameworks
wiki syntax / markdown
LINQ
Using internal DSL
(aka Fluent Interface)
Easy to do... no parsers, etc.
Full IDE support
Good
Bad
Limited by host language
Method chaining
Object scoping
Expression Builder
Using external DSL
Unlimited expressiveness
You choose execution
environment
Good
Bad
Requires “more” work
No IDE support
DSL
script
parse
AST
Semantic
model
optional
You can parse DSL
manually
(regexp, Tokenizer)
using some tool
(ANTLR, yacc, ...)
Using
Language Workbenches
Meta Programming System
Microsoft Oslo
Intentional Domain
Workbench
Eclipse Modeling Project
concepts
(language)
edit
you
AST
(DSL script)
concepts
(language)
edit
describe
you
AST
(DSL script)
concepts
(language)
edit
edit
describe
“user”
you
AST
(DSL script)
concepts
(language)
edit
describe
“user”
you
no text, just AST !
edit