Boost logo

Boost Interest :

Subject: [Boost-interest] [ANN] Dogen - The Domain Generator
From: Marco Craveiro (marco.craveiro_at_[hidden])
Date: 2013-01-19 09:06:12


On behalf of the Kitanda Development Group [1], I'm pleased to announce
Dogen - The Domain Generator.

Dogen is a code generator designed to target domain models. It is crucial
for Kitanda because we use a intensively domain-driven [2] approach to
software engineering, resulting in a very large number of domain models.
Dogen was created to make the modeling process simpler: the user creates a
domain model in UML using the diagramming tool Dia [3] and Dogen uses the
diagram to generate its source code representation in C++11. The main
objective of creating a domain generator is to avoid having to maintain
manually a significant amount of trivial code. We developed our own domain
generator because we could not find one that fitted our requirements.

Note that Dogen has been specifically tailored for our needs and as such it
is not a general purpose domain generator. We are, however, wiling to
accept any patches for functionality not directly required by us.

At the time of this announcement, the current release of Dogen is v0.0.863.
Main features:

* Generation of non-trivial object graphs including inheritance,
aggregation, composition, etc. We are using Dogen to generate a large part
of Dogen itself as a way of proving its abilities. See [4], [5] and [6] as
examples of Dogen models.
* Generates code for std::hash, allowing the use of C++-11 unordered
* Generates code for boost serialization, using Text, Binary and XML
archives. There is partial support for EOS, but this is not implemented
across all platforms - only Linux is supported at present.
* Generates a JSON representation of all domain objects, allowing quickly
dumping objects to a stream (such as boost log) when debugging a problem.
We chose JSON because of the large number of standard tools that exist out
there for parsing. Note that JSON is not a serialization format; we only
support it for debug dumping of objects.
* Generates test data for a given domain model, for testing purposes. This
is mainly used to test Dogen itself, but it may be of use for end users.
* Supports a number of standard library types (e.g. vector, map, string,
etc) and boost types (e.g. shared_ptr, variant, filesystem::path). We have
been adding types as we need and will continue to do so.
* Supports models that reference other models

Important considerations:

* This is not a general purpose code generator. In particular it is not a
merging code generator, so you cannot change the sources and see your
changes reflected in UML.
* We use what can be considered pidgin UML in Dia. That is, we subvert the
meaning of a few UML elements to suit our needs. We only support this small
subset of pidgin UML. It is not a general purpose UML to C++11 code
* We use feature branches and release off of HEAD - as such we don't have
stable release numbers; latest is always greatest. This may change in the
future if the number of contributions increases.
* Many of the ideas in Dogen were taken from Eric Evans' book [7] but we
had to change some of them a bit/a lot due to implementation constraints.
* We are working on improving documentation, but at present there isn't
much of it. Please ask if you have any doubts.

Useful links

* Github:
* Demo (created a few sprints ago):
* Continuous Integration (CI):
* Binaries (straight off CI):
* Example of a complex Dogen model:
* Examples of the code generated by dogen:
* Backlog (list of open issues, features, ideas, etc):

If you have any questions or would like to discuss any topic related to
Dogen or Kitanda, please come to our forums where we will be very happy to
talk to you:!topic/kitanda/mbNfV0VZMy8


Kitanda Development Group


*Kitanda brings Open Source to finance.*
Want to know more? Visit

Boost-interest list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at