Encapsulation is one of the key concept of OOP, the status of an entity should be protected from external direct manipulation, state of an object can be changed only by the object itself so the object is always in Valid State. One of the classic example is protecting property that contains collection of elements in [...]

Continue reading about Protect the status of your entities

In a typical online web browser role playing game, usually players has “resources”, that are needed to create building, weapon etc etc, and those resources are timed based. In the domain the concepts is something like “the player earn X energy each second”. This is a typical situation in a role playing web game and [...]

Continue reading about Role playing games, resources that grow with time

One of the interesting ideas found in Radical and other implementations of DDD architectures, is implementing properties of Domain objects in a slightly different way from the standard, using something like a dictionary to store values of properties. When we want to implement a property for a Domain class you usually end up with similar [...]

Continue reading about Leverage the concept of “state” of your entities

Some time ago, I was speaking with my dear friend Mauro Servienti about Domain Driven Design and the hard time we have in making people understand the real reasons behind DDD, CQRS and all the concepts in the DDD ecosystem. Maybe I’m wrong but in my opinion it is difficult to explain DDD with classic [...]

Continue reading about Domain Driven Design, in search of a good sample