Most business entities are passive

Field Values private function Most business send To Another System Review review void this another System Client send Review review We nee to fulfill the following requirements Save the product and review to our database After successful saving send the review to another system After successful submission mark the review in our database as successfully sent We want to beautifully show in the interface what has change to what so we nee Most business to write down the old and new values. Please note that sending a request to the API is a nontransactional interaction so we save data.

In steps before sending Most business

We save the data with one status in one database transaction send the data after sending we save it with a different status in another database transaction. If sending to Israel Mobile Number List another system fails the Review object will remain in the and the error can be correcte manually. For example show the Resend button in the admin panel. It is this Save Send Save logic that in my opinion is difficult to implement in the Rich domain model. We have several lines in a row calling setters You can put them in the entity.

Asia Mobile Number List

CREATe status this can be tracke

But the rest of the code cannot be place there it must be somewhere outside the entity. It is not the responsibility of the Product or Review entity to commit Paraguay Whatsapp Number List database transactions. To do this you will have to throw technical components into the entity for working with the database which does not correspond to the purpose of the domain layer. Business logic Now comes the important point. This is not business logic.

Leave a Comment