Interfaces, Adapters, exposing business objects via WCF design

Posted by Onam on Programmers See other posts from Programmers or by Onam
Published on 2013-06-18T07:28:40Z Indexed on 2013/10/21 4:09 UTC
Read the original article Hit count: 392

Filed under:
|
|
|

I know there have been countless discussions about this but I think this question is slightly different and may perhaps prompt a heated discussion (lets keep it friendly).

The scene:
I am developing a system as a means for me to learn various concepts and I came across a predicament which my brain is conflicting with. That is whether to keep my interfaces in a separate class library or should they live side by side my business objects.

I want to expose certain objects via WCF, however refuse to expose them in its entirety. I am sure most will agree exposing properties such as IDs and other properties is not good practice but also I don't want to have my business objects decorated with attributes.

The question:
Essentially, I'll be having a separate interface for each of my objects that will essentially be exposed to the outside world (could end up being quite a few) so does it make sense to create a separate class library for interfaces? This also brings up the question of whether adapters should live in a separate class library too as ideally I want a mechanism from transferring from one object to the other and vice versa?

© Programmers or respective owner

Related posts about design

Related posts about interfaces