Difference between Web Services and WCF

 Posted by Jmaneesh on 8/18/2010 | Category: WCF Interview questions | Views: 12174 | Points: 40

Major Difference is That Web Services Use XmlSerializer But WCF Uses
DataContractSerializer which is better in Performance as Compared to XmlSerializer.
Key issues with XmlSerializer to serialize .NET types to XML

* 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 DataContractAttribute can be applied to the class or a strcture. DataMemberAttribute can be applied to field or a property and theses fields or properties can be either public or private.

Important difference between DataContractSerializer and XMLSerializer.

* A practical benefit of the design of the DataContractSerializer is better performance over Xmlserializer.
* XML Serialization does not indicate the which fields or properties of the type are serialized into XML where as DataCotratSerializer Explicitly shows the which fields or properties are serialized into XML.
* The DataContractSerializer can translate the HashTable into XML.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Kishork80 on: 8/23/2010 | Points: 10
Just go through this Link if you want to learn More abour WCF


Login to post response

More Interview Questions by Jmaneesh