difference between wcf and web services

What WCF Can Replace?Windows Communication Foundation (WCF) has an ASP.NET compatibility mode option to enable WCF applications to be programmed and configured like ASP.NET Web services, and mimic their behavior.

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.

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.



More thing we can host the WCF services in number of hosting applications, unlike Asp.net webservices, which support only iis hosting.
............................................................................................................................................................
WCF "web services" are part of a much broader spectrum of remote
communication enabled through WCF. You will get a much higher degree of
flexibility and portability doing things in WCF than through traditional
ASMX because WCF is designed, from the ground up, to summarize all of the
different distributed programming infrastructures offered by MS. An endpoint
in WCF can be communicated with just as easily over SOAP/XML as it can over
TCP/binary and to change this medium is simply a configuration file mod. In
theory this reduces the amount of new code needed when porting or changing
business needs, targets, etc.

ASMX is older than WCF, and anything ASMX can do so can WCF (and more).
Basically you can see WCF as trying to logically group together all the
different ways of getting two apps to communicate in the world of MS; ASMX
was just one of these many ways and so is now grouped under the WCF umbrella
of capabilities.

0 comments:

Post a Comment