Answer the question
In order to leave comments, you need to log in
Is there a split model in ddd?
The model takes center stage in ddd. It includes data and methods of working with them. Everything is clear when the model in the application is completely controlled by the developer, but what if the application architecture is modular and allows you to include third-party modules that extend the functionality of the model.
For example, there is a User class.
class User
{
private $name;
public function getName()
{
}
public function setName()
{
}
}
public function isGoodPerson()
{
return $this->name === 'Vasya';
}
Answer the question
In order to leave comments, you need to log in
This is the question: is the main principle of opp (and ddd) not violated when data is manipulated outside the class?This is fine. There are manager classes (or services) that work with object classes, but within the framework of some task.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question