Difference between Transfer objects and Domain objects
问题 Could you please explain the difference between Transfer objects and Domain objects in simple terms ? And if u could give a Java example, that would be great.. 回答1: DTOs don't have any logic. They only have fields (state). They are used when transferring data from one layer/subsystem to another Domain objects can have logic (depending on whether you are using domain-driven design or have anemic data model) and they are usually related to the database structure. If using anemic data model (i.e