http://bloggingabout.net/blogs/gerben/archive/2010/02/01/wcf-best-practices.aspx
WCF is already around for a while, though best practices aren’t very well known in the developer community. In my search for resources that summarize them best I can recommend the following ones:
- Mehran Nikoo indexed the Microsoft articles that are around.
- Christian Weyer collected a nice selection of tips and tricks from the field.
- Brian Noyes also collected quite some best practices.
My top most useful practices out of these from my experience in the field are:
- Watch out with the using statement with proxies.
- Use WCF tracing and message logging to see what’s going on. Some bad things sometimes don’t come up as an exception, but only as errors or warning in the traces.
- Out of the box WCF is configured pretty conservative for performance, you almost always have to change the default settings.
Although the above resources contain quite some practices, I’m still missing some. I’ll describe these myself in separate posts and these are:
#1 Don't build a WCF service
#2 Don't forget XmlNamespace settings
#3 Contract first
#4 Know your tools
#5 One-way is not always really one-way
#6 Know the limits of reliable messaging with WCF