Say I am developing a Calculator application. It has one class called: Calculator
. Therefore my namespace structure would look like this:
MyCompany.Calculator.Core.Calculator
Unfortunately, this is not right because the same name should not be used for a namespace and a type in it. This is thoroughly explained in this other SO question. One of the answer to that question suggests to solve the ambiguity by using an Util
suffix for the namespace, which would then look like this:
MyCompany.CalculatorUtil.Core.Calculator
This solves the naming ambiguity in the programming language. However, this kind of naming is in contradiction with good DDD naming practices: because Util
seems to be a "weasel word" according to this article on naming in the ubiquitous language and these should be avoided.
What is the best way to avoid a conflict here in the case of a Calculator?
The application I am developing is much more complex than a simple calculator, however the principle still stands.
Calculator
, and we'll tell you what to call the higher-level package.