Saturday, May 26, 2012

About DTOs

The use of DTOs in conjunction with BOs (Business Entities or Domain Entities) is one of those topics that can trigger an endless, and sort of pointless, discussion within a team.

The theory suggests that DTOs are used in all cases to reduce coupling between layers and to lend the system greater formal neatness.

The practice, though, often reminds us that complexity is generally high enough that we should avoid any unnecessary additions.

As a practical rule, we suggest that when you deal with a model of a few hundred business objects, you probably don't want to double the number of classes just to be neater in your implementation. In this case, a DTO might likely be the same as a BO.


From Microsoft .NET: Architecting Applications for the Enterprise

No comments:

Post a Comment