2. Best practices of DSL design
adopt notations that domain experts already have rather than invent new ones
use jargon terms whenever possible
design only what is necessary do not design a programming language
learn to recognize tendency to over-design
strive for an 80% solution
understand present solution design process before developing a substitute DSL
establish close ties with a domain expert
do not expect domain experts what a computer can (should) do for them
do not expect users to forgive design mistakes
D. Wile, “Lessons learned from real DSL
experiments”, Sci. Comp. Prog. 51 (2004)
3. Organizing for DSL development
an established business
How mature is the target business area?
How much do you customize your software for each customer?
little or not at all
but only in limited ways
only for large customers
extensively
a research project
creating a new platform for use by others
development of a new product
often
+3
-1
0
-3
+3
+2
+1
0
S. Kelly, J.-P. Tolvanen,
“Domain-specific modeling”
4. Organizing for DSL development
Do you have good source code examples (for teaching new staff)?
Do you have an in-house application framework?
we develop everything from scratch
but we try to reuse legacy components
the previous version if the guideline
with established guidelines
our staff are all experts
but out of date
but we should make some
yes
no
no
some available
yes
yes
no
no
+3
-1
0
-3 +1
+3
+2
-2
ABORT
if said by manager if said by developer
S. Kelly, J.-P. Tolvanen,
“Domain-specific modeling”
5. Organizing for DSL development
Can you assign the following kinds of people for DSL project?
no
but we have summer interns
a small team of developers
an experienced developer
one of the top three who built the framework
no
+5
-3
ABORT
+3
+2
S. Kelly, J.-P. Tolvanen,
“Domain-specific modeling”
6. Template for DSL Workshop S. Kelly, J.-P. Tolvanen,
“Domain-specific modeling”
result
goal
introduction
usage
how much various parts are reused between products, features, models?
how many users, models, files, ... are there?
describe how you intend to use the language
why are benefits of DSL important in these parts?
what parts to include in DSL?
give a short introduction to domain area
partial modeling and code generation environment
but significantsmalldefine and implement a part of DSL
with concrete examplesdemonstrate the benefits
7. Template for DSL Workshop S. Kelly, J.-P. Tolvanen,
“Domain-specific modeling”
sample material
sample design
sample requirements
sample user’s manual
sketch the language
should include most central elements of the domain
pick a small but representative example
example
give the requirements for example functionality
give the design documents
including graphical models and text where available
sample code give the code for this example
comment code with references to design documents