Translate

Data Transfer Object

Data Transfer Objects are highly recommended to be used when you design APIs and need to protect your clients from breaking their applications that might depend on your domain model. This is very true when your API deal with the object that more or less represent your domain model. eg: Customer object. Data Transfer Object or DTO acts as a intermediate layer where we define the entities attributes are less likely to be changed and that is published to the client. A well defined process such as service/API versioning will define how a change to core Domain model will be propagated to the DTO if need to be.