Wednesday, September 26, 2012

WCF Version Strategy

Just went through the following code project articles, which detailed explains the WCF version in all possible scenarios.

WCF Backwards compatible & version strategy: Part 1, Part 2, Part 3

In summary, WCF works best try to match the data contract from the client side to the service implementation. They will throw errors for the "Required" data member when they are not presented.
Also there is a concept called "Version round trip" so the new data member can be preserved and then sent back. But the data contract has been inherited from IExtensibleDataObject

For the version strategy, it categories as strict, semi-strict and agile versioning.

The difference between strict and semi-strict is whether the service contract interface_version2 inherit the interface_version or not. If v2 inherit from v1, then it is semi-strict, and if v2 just include the methods from v1, that is strict versioning. Also the basic idea is the service contract implementation should always implement the interface v1 and v2.

Also there is a blog talking about the general WCF version guidelines

No comments: