Programming and Ubiquitous Language (DDD) in a non-English domain
Posted
by
Sandor Drieënhuizen
on Programmers
See other posts from Programmers
or by Sandor Drieënhuizen
Published on 2011-01-29T10:45:51Z
Indexed on
2011/01/29
15:32 UTC
Read the original article
Hit count: 370
spoken-languages
|domain-driven-design
I know there are some questions already here that are closely related to this subject but none of them take Ubquitous Language as the starting point so I think that justifies this question.
For those who don't know: Ubiquitous Language is the concept of defining a (both spoken and written) language that is equally used across developers and domain experts to avoid inconsistencies and miscommunication due to translation problems and misunderstanding. You will see the same terminology show up in code, conversations between any team member, functional specs and whatnot.
So, what I was wondering about is how to deal with Ubiquitous Language in non-English domains.
Personally, I strongly favor writing programming code in English completely, including comments but ofcourse excluding constants and resources.
However, in a non-English domain, I'm forced to make a decision either to:
- Write code reflecting the Ubiquitous Language in the natural language of the domain.
- Translate the Ubiquitous Language to English and stop communicating in the natural language of the domain.
- Define a table that defines how the Ubiquitous Language translates to English.
Here are some of my thoughts based on these options:
1) I have a strong aversion against mixed-language code, that is coding using type/member/variable names etc. that are non-English. Most programming languages 'breathe' English to a large extent and most of the technical literature, design pattern names etc. are in English as well. Therefore, in most cases there's just no way of writing code entirely in a non-English language so you end up with a mixed languages.
2) This will force the domain experts to start thinking and talking in the English equivalent of the UL, something that will probably not come naturally to them and therefore hinders communication significantly.
3) In this case, the developers communicate with the domain experts in their native language while the developers communicate with each other in English and most importantly, they write code using the English translation of the UL.
I'm sure I don't want to go for the first option and I think option 3 is much better than option 2. What do you think? Am I missing other options?
© Programmers or respective owner