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?
Thanks!
|