In this repo, we try to implement in python several example from the DDD book from Eric Evans.
The first example is found in the chapter 4: Isolating the domain, that talks about layers.
It involves layering, repositories and unit of work.
We are using Django as the infrastructure implementation.
The second example comes from Chapter 7: Using the Language: An Extended Example.
It describes a system that will handle cargo shipping, the general model looks like this:
On one hand, it make sense to consider "making a persisting change to the model" as a domain concept, but on another hand "polluting" the domain layer with a UnitOfWork parameter feels clunky ?
We could also see it as marking a function as "mutable for the domain" where others would by default not have any side effect.
Maybe something can be done with a decorator to inject the UnitOfWork in a more "pythonic" way ?

