only one thing after discuss my doubt i am a mobile developer and i am trying to adapt DDD, and i say adapt because a lot of information is related to backend applications
My doubt start because i have a User class that is part of my model (im using MVP), and also in terms of DDD it´s a domain object, i know business logic should be in Domain Layer, and here start my first question
My User class is not a plain object its also have functionality, methods like, storeUserInLocalDataBase or StoreCredentialsInKeyChain or createObjectWithJSON, this methods are related to the user so i left in User class, but keep a session is not part of business logic? the ability to remember the user credentials (StoreCredentialsInKeyChain) is not part of the business logic?, so in that way i think i should move that methods to the UserDomain class right?, and here start another doubt
If i have a UserDomain class that means when i made my domain model or UML my User class should interact with other classes and components and the main character in this business process should be the User right? thats the reason i named the class UserDomain
But what happened if there is a Mission model class as part of the UserDomain and a user can getCurrentMission?, this getCurrentMission is part of UserDomain or should be MissionDomain?
What happened if Mission class has more logic? should be in the Model class like my first approach in the user class? or should i move that logic to the UserDomain class?, and if this happens with any other objects in UserDomain, my UserDomain class will be filled with a lot of logic from my Models classes and i guess this could be a problem or maybe not
So thats a few questions that i have i hope to be clear and you can understand why im so confused about this
Thanks, i will really appreciate your comments