Hi to all,
I am implementing a web service.
What is the best way to get data in an out of the service?
1) Using Data Transfer Object DTO?
2) Serialized the domain objects and sending them as web methods return values.
For example, I am implementing an OrderReceivingService,
should I implement an OrderDTO to get data in and out of the service ? or simply serialize and return the Order entity of the business domain ? my Order entity has both state and behaviour. my OrderDTO has only state. I am also using ORM for data persistence.
Please provide reasons why a particular approach is better in my case. I will also like to know the advantages and disadvantage of both approaches as far as web services are concerned.
Are there any posible trick that we can use to avoid DTOs in web service without comprimising our domain model?
Best Regards,
Leonard.
Sent from Yahoo! Mail.
A Smarter Email.