Dogen is a suite of tools focusing on bringing Model Driven Software Development (MDSD) workflows to C++ development. In lay terms, our main objective is to automate the development process as much as possible: the user creates domain models according to one of the supported frontend formats and respecting a set of predefined restrictions; Dogen then uses this input to generate a source code representation of the model. At present the main frontend is Dia (Dia test models), but we also support JSON (JSON test models). Depending on use cases and user demand, other frontends may follow.
The generated code contains most of the functionality required from a typical C++ domain object such as serialisation, hashing, streaming and so on. Whilst we intend for the suite to be useful out of the box for most use cases, our end goal is to enable users to extend Dogen, adapting it to the vagaries of their specific needs.
Note that Dogen has experimental C# support, but it is not in feature parity with C++ support.
Binary packages are available on BinTray, for Debian Linux, OSX and Windows - all in 64-bit. Packages are generated at the end of each sprint - with the exception of Windows, where we generate them on each commit due to a problem with AppVeyor.
Building From Source
Dogen has the following dependencies, across all operative systems:
|Git||Optional||Any recent.||Required to clone repository. Alternatively, download the zip from GitHub.|
|CMake||Mandatory||3.3 or later.||Required to generate the build files.|
|Boost||Mandatory||1.61 or later.||Earlier versions may also work, but patches are required. Very Important: We link statically against Boost at present, so be sure to build and install the static libraries.|
|ODB||Optional||Any recent.||If you want to build the ORM examples, you need ODB. You will also need a backend such as Oracle, Postgres, etc.|
In addition, you will also need a build toolchain. On Linux and OSX, you'll need a moderately recent compiler - such as GCC 6 or Clang 3.7 - and Ninja or GNU Make. On Windows you'll need Visual Studio 2015 or later.
Once you have all dependencies installed and set up, you can then clone the repository and create the build directory, using the shell of your choice (ours is Bash):
git clone email@example.com:DomainDrivenConsulting/dogen.git cd dogen/build mkdir output cd output
On Linux and OSX, you can build using GNU Make as follows:
cmake ../.. make -j5 # number of cores available
Alternatively, you can use Ninja:
cmake ../.. -G Ninja ninja -j5 # number of cores available
On Windows, the incantation is slightly different:
cmake ../.. -DCMAKE_BUILD_TYPE=Release -G 'Visual Studio 14 2015 Win64' cmake --build . --config Release --target ALL_BUILD
Note that if you have installed Boost on a non-standard location, you
need to set
CMAKE_INCLUDE_PATH=/my/boost/include/path CMAKE_LIBRARY_PATH=/my/boost/lib/path cmake ../..
We don't really have a recent demo of Dogen, but this fairly old one should give you an idea of its workflow:
Over time a number of assorted blog posts have been published on Dogen, mainly covering its development process:
- Nerd Food: The Refactoring Quagmire: How we solved the "refactoring ad infinitum" problem in Dogen development.
- Nerd Food: Northwind, or Using Dogen with ODB: Four part series on using Dogen with ODB. Part I, Part II, Part III, Part IV.
- Nerd Food: The Strange Case of the Undefined References: Problems faced using Conan with Dogen.
- Nerd Food: On Product Backlog: The importance of the Product Backlog in Dogen development.
- Nerd Food: Dogen: The Package Management Saga: Dogen's attempt at finding a package management for C++.
- Nerd Food: Pull Request Driven Development: Not directly related to Dogen as we don't get many PRs, but may be of interest; reflections on the importance of a Pull-Request Driven Development approach.
- Nerd Food: Dogen: Lessons in Incremental Coding: How the Dogen development process works, via very small, incremental changes.
If you have encountered a failure building Dogen or running its unit tests, please submit a bug report. It must include:
- the error messages;
- the versions of all dependencies (compiler, Boost etc);
- the operative system name and version;
If you find a bug whilst using Dogen with one of your models, please also include:
- a small model reproducing the problem;
- the compressed log; it is located under the directory where you
executed Dogen and named
MODELis the name of the model you ran against.
Bugs can be submitted using github Issues.