
Originally Posted by
constv
I think ramoq meant that setting/modifying some data should only be controlled by the middle-tier service based on its internal business logic, not the client. So, just disallowing a property to be reset on a "lease" probably is not a good idea - especially, because that would mean hardcoding some very specific requirement into the "lease" concept. It is reasonable - and logical - to assume that an expiration date may be set, and then re-set on a lease, in general. So, the question is: who and when should be able to do it? It is up to the use case that defines the context in which the "lease" is used. The service in this case implements the use case that governs that particular requirement. This is a good example of how the domain entity/service model can be a natural (easy and intuitive, and more logical) alternative to the DDD approach from the Evans book - per our conversation in another thread. Such specifics should never be part of the object that defines the entity. I hope this somewhat illustrates the reasoning behind the points I was making.