Note that there are some explanatory texts on larger screens.

plurals
  1. PODomain Service vs WCF Service?
    primarykey
    data
    text
    <p>Im slowly delving into Silverlight and after a good while trying I am finally able to return my own Custom Object from my web to my silverlight client, use a Siverlight enabled WCF service.</p> <p>Now, im a little at a loss between the differences of a Domain Service, and a WCF Service.</p> <p>Ive worked through the tutorials where a Domain Service is tied to a data context then bound to siliverlight controls. Great :) However, where i hit a rock was trying to return anything bar IQuerryable; as String, my own simple type etc.</p> <p>I found a few tutorials such as <a href="http://mark.mymonster.nl/2009/04/05/silverlight-3-and-ria-services-the-advanced-things/" rel="noreferrer">this</a> showing to mark a function with the [ServiceContract] annotation and to have a [Key] within your simple class. This didnt work, [ServiceContract] was not resolvable, and i later found a guide saying to use [Invoke]. I then hit issues of not been able to load the function and get a result, i basically go to here</p> <pre><code>[Invoke] public string HelloWorld(string name) { return string.Format("Hello {0}.", name); } var helloWorld = new HelloWorldDomainContext(); //helloWorld.HelloWorldCompleted += new EventHandler&lt;InvokeEventArgs&lt;string&gt;&gt;(HelloWorldHelloWorldCompleted); //helloWorld.HelloWorld("Mark Monster"); </code></pre> <p>Anyway, so I then discovered silverlight enabled WCF services, and am able to return my own custom objects and call this fine.</p> <p>tl;dr - Are Domain Services only for use when binding to Silverlight controls? Ie its kind of a direct one way binding and is called as and when is needed, and i do all Linq related sorting / filtering / selecting on the server? </p> <p>And lets say I want to return an xmlString, then i use a WCF service? Am i right to be using a mix of WCF services and Domain Services in my application?</p> <p>Sorry if the above is a bit confusing! Just trying to get to grips with this all coming from ASP.NET / Flex</p> <p>Thanks muchly.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload