I was wondering if any of you have successfully completed DDD in the Client / Server application and would like to share some impressions.
We are currently working on a smart client in Flex and a backend in Java. On the server, we have a service level open to the client that offers CRUD operations among some other service methods. I understand that in DDD, these services must be repositories and services that must be used to handle use cases that do not fit inside the repository. Right now, we mimic these services on the client behind the interface and implement implementations (Webservices, RMI, etc.) through the IoC container.
So, some questions arise:
- if the server exposes the repositories to the client or we need to have some kind of facade (which, for example, is able to handle security)
- should the client implement repositories (and DDD in general?), knowing that most of the logic on the client is related to viewing, and the real business logic lives on the server. All communication with the server occurs asynchronously, and we have one programming model with a thread on the client.
- how about mapping a client to server objects and vice versa? We tried DTO, but went back to expose the state of our objects and correlate them directly with them. I know this is considered bad practice, but it saves us an incredible amount of time).
In general, I think the new generation of applications is coming with the rise of Flex, Silverlight, JavaFX, and I'm curious how DDD fits into that.
source share