I've always found that the best way to understand something is to see an example, to see the principles in action first and worry about the details later once I understand the general gist. So here's a little example of a Restful version of a simple Web service you might already know about, the api.
- Only Public fields or Properties of .NET types can be translated into XML.
- Only the classes which implement IEnumerable interface.
- Classes that implement the IDictionary interface, such as Hash table can not be serialized.
The WCF uses the DataContractAttribute and DataMemeberAttribute to translate .NET FW types in to XML.
[DataContract]
public class Item
{
[DataMember]
public string ItemID;
[DataMember]
public decimal ItemQuantity;
[DataMember]
public decimal ItemPrice;}