DTOs often mirror the domain model structure exactly but do not have to.īusiness logic is supposed to be implemented in the domain model, so much of what is in the application layer is involved with coordinating various services, typically to bring the data to and from the client applications. If you do not allow domain objects outside of the domain itself, you would typically use DTO or Data Transfer Objects which are simply classes only with properties and such DTO classes do not have domain behaviors. Just keep in mind not everyone views this as a requirement. I myself adhere mostly to a philosophy where domain objects are not used directly, so I am not familiar with all the practices they suggest, I personally would think binding to a domain object directly would be ill-advised, but. For example, Naked Objects represents a school of thought where domain objects are used directly. But it is not an absolute rule that domain objects are not used in the presentation layer. Speaking in terms of more "classical" DDD, yes domain objects are typically not allowed anywhere outside of the domain.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |