views:

57

answers:

2

Using Visual Studio 2010 when creating a wcf service the template creates a class file, svc endpoint and an interface file. Why is it that when adding a silverlight-enabled wcf service they don't follow this pattern. As discussed here this seems like a bad idea.

After adding the silverlight-enabled service, should one go back and incorporate the interface as discussed in the referenced article. If so, then would it not be as simple to start with a simple WCF service, bypassing the whole "silverlight-enabled" bits altogether.

+1  A: 

It is my opinion that this is by design to keep the footprint small and simple.

Consider the audience for this feature. The are likely to be less familiar with WCF and the specifics required to expose a service to javascript and more interested selecting an item template that will result in getting some data to the client.

You may enable most any service to handle clientScript requests with behavior and binding.

Sky Sanders
+1  A: 

I figured that the designers of the template assumed that your Silverlight app is going to be the only client for your service, so why bother separating out the interface.

nlawalker