Note that there are some explanatory texts on larger screens.

plurals
  1. PODomain or application layer for some classes in DDD
    primarykey
    data
    text
    <p>I am working on a project using DDD, I have some classes and I don't know where to put them.</p> <p>The domain is about an existing game. This game has basic concepts, like Character, SkillTree. My domain class simply represent those concepts. I did not make this game.</p> <p>My application/project is about having a software that represents those concepts, with some added values. At the moment, a name, and a description are the only possible added values (example, "Fire mage", and "Mana dependant, be careful !").</p> <p><strong>Question 1</strong> : does it make sense to have two classes, or should I merge them ? In the former case, where should I put this class "with added value (name and description)" ? In the application layer ?</p> <p><strong>Question 2</strong> : Am I right in saying that the domain layer represents the sphere of knowledge I am working on, and application layer represents all the things that do not exist in the domain, but I want to provide, as added value ?</p> <p>(therefore, if my software simply represents the domain, the application layer is thin, and if my software provide a lot of non domain functionalities, the application layer is thick ?)</p> <p><strong>Additonal informations 1 :</strong> my project is about creating a character simulator. Therefore, in order to simulate a character, I have to represent it, as well as all of its dependencies. My domain layer responsability is to represent the game. It contains classes like Character, with some properties (Life, Mana, Attack, Defense, Class), and some enum (like CharacterClass, which lists all the available classes).</p> <p>Now, I want my own project to provide, to the user, the ability to create a project, that represent a character of the game. The project also allows the user to save additional informations, like a name for the current project, a main (and secondaries) equipment set, a main (and secondaries) skilltree. Annotations are also available for any of the equipment set and skill trees, so the user can simply have a built-in memo/post-it. Secondaries equipment set and skill tree, annotations are not existing concepts in the game (and therefore, do not exist in my domain).</p> <p>In question 1, the "class with added value" is a character project, that is an aggregate of multiple informations (character equipments, skill tree, annotations, etc). It can be saved on a physical support, opened and edited again later, if the user wants it.</p> <p><strong>Reformulation of question 1 :</strong> I have a Character class, and a CharacterProject class. The CharacterProject class is a composition of multiple informations. But it is specific to my application. Does it make sense to put it in the application layer, or the domain layer, or somewhere else ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload