Guidance on how to consume WCF (WSSF) in WCSF

Topics: User Forum
Jan 12, 2007 at 11:53 AM

WSSF (WCF version) has been released yesterday, I would like to use it to build our service layer, and using WCSF as UI presentation layer. I wonder any guidance on how to consume WCF of WSSF in WCSF. Thank you in advance.
Jan 12, 2007 at 12:49 PM
I'm sure the WCSF team can answer this better, and there may be plans for more guidance, but in the mean time I would have a look at the Reference Implementation if I were you.

It doesn't include WCF calls, but it does show how you might structure web service access from within an application created with the factory. You could just replace the ASMX-style proxies with ones generated using WCF.

Hope that helps.

Jan 12, 2007 at 1:23 PM
Just a thought.

I was listening to Ron Jacobs Arcast with SOA radical with lukas svoboda yesterday and I think there is an interesting underlying issue here that revolves around
how you compose the internals of applications that are Service Orientated.

Lukas was advocating Services through out the stack and from a practical point of view
I think that means that you should add the service as a reference in your project and then decompose the DataContract expressed in the interface into webserver side business entities model in order to work with it (Even though you have a Business Entity Model!).

This decouples your UI from your service in a way that offers a lot of intergration options later and somewhat enforces
the prevention of object churn.

It does mean that you will have to write translators in the webserver code which may seem heavy handed to some people.

There could be a short cut here using the WSDL generation tools in the WCF SF DAL to create the web server side entity model.

I am testing this out at the moment and it feels right.

Jan 12, 2007 at 1:33 PM
I totally agree with you - and in fact the reference implementation does indeed have Entity Translators that do exactly what you describe.

The Service Factory has some automation to create translators from wire-format entities to business entities, so I would guess this is an ideal area for client-side automation within the WCSF too.

Does that make this a feature request, for a WCF proxy generator recipe and an entity translator recipe? :-)
Jan 12, 2007 at 3:02 PM
Just open an issue for us to vote on it.
Jan 12, 2007 at 3:19 PM
Done - it's called "WCF Proxy & Entity Translator Generation" - cast your votes!