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


Hi,

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
containers.
* 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
generator.
* 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: https://github.com/kitanda/dogen/
* Demo (created a few sprints ago):
http://www.youtube.com/watch?v=Z7k8qbImXkU&feature=youtu.be
* Continuous Integration (CI):
http://hedgr.co.uk/cdash/index.php?project=dogen
* Binaries (straight off CI): https://github.com/kitanda/dogen/downloads
* Example of a complex Dogen model:
https://github.com/kitanda/creris/tree/master/diagrams/rating
* Examples of the code generated by dogen:
https://github.com/kitanda/creris/tree/master/projects/rating
* Backlog (list of open issues, features, ideas, etc):
https://github.com/kitanda/dogen/blob/master/doc/backlog.org

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:

https://groups.google.com/forum/#!topic/kitanda/mbNfV0VZMy8

Cheers

Marco
Kitanda Development Group

[1] http://kitanda.co.uk/html/index.html
[2] http://en.wikipedia.org/wiki/Domain-driven_design
[3] https://live.gnome.org/Dia
[4] https://github.com/kitanda/dogen/tree/master/diagrams/config
[5] https://github.com/kitanda/dogen/tree/master/diagrams/dia
[6] https://github.com/kitanda/dogen/tree/master/diagrams/sml
[7]
http://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215

-- 
------------------------------
*Kitanda brings Open Source to finance.*
Want to know more? Visit http://www.kitanda.co.uk


Boost-interest list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk