DTOs Insufficient w/ Contract-First Web Services ?
I have been hopping between chapters and haven’t read the book cover to cover (yet ;-)), so hopefully I’m not asking a question that is answered in a portion of the book I haven’t yet read. While I understand and like the DTO pattern for the most part, I was hoping to find some guidance for the situation where the business tier interface is a contract-first, Web Service (implemented as a SLSB). This leads to the issue of generated application domain classes (i.e., from the contractual WSDL) that don’t necessarily coincide w/ the application domain classes designed for the business logic and persistence layer, thus requiring translation. My current thinking is to put a 2nd façade layer between the web service implementation and the business service implementation, which will simply translate the service call arguments from WSDL generated domain objects to application domain objects and back. Is there some other more ‘standard’, best practice to address this situation?