how to show wcf proxy's datasets to the ui layer in a three layer app

Hello from Spain,

I have a client-server app. The client is made in three layers (service agent, bll, ui). Client connects to the server through a web service. The the web service's proxy is in the last layer, service agent, so we can see the datasets that come in the proxy from the bll, but i want them in the ui too. I haven't found any pattern or something to acomplish that and i can not find a solution without breaking the encapsulation of the bll.

Any suggestion?

Thanks in regards

[516 byte] By [creaturita] at [2008-1-25]
# 1

Your best bet is to look at the sample application PetShop (link below).

Basically where you have your datasets they have classes that they call the Model which is independent of all layers (just its own project and dll) and so you can reference it from any layer in the solution. This is pretty standard pratcice for n-tier applications. Note that to get a Model project using datasets you might want to consider using typed datasets.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bdasamppet4.asp

JohnMichaelGrace at 2007-8-30 > top of Msdn Tech,Microsoft ISV Community Center Forums,Architecture, Tools, and Process for ISVs...
# 2
For these scenarios, I typically use a data transfer object (see Martin Fowlers example http://www.martinfowler.com/eaaCatalog/dataTransferObject.html). The DTO's are just classes with properties and no methods associated with them. They can be used by any layer in the application architecture, and thus get placed into a common assembly. I use these DTOs in the service interface, allowing me to change the domain model without breaking the service interface.
MichelBaladi at 2007-8-30 > top of Msdn Tech,Microsoft ISV Community Center Forums,Architecture, Tools, and Process for ISVs...