Imagine you have business domain model on server application and you are going to develop rich client application.
You can use DTO to transfer data to client and changes to server or use WCF services and generate new classes on the client.
Another way is to transfer the same objects as you use on server in your business logic layer. These can be also classes used by ORM. In this case classes shouldn't contain sever-specific logic, but they can contain some common logic.
My questions are:
- Which variant do you use and which do you recommend to use in new projects?
- Which is better?
- Is the second one better in some cases and how can you describe these cases?
- How many applications use first/second approach?
- How to choose in particular application?