Appendix F. WCF Coding Standard
A comprehensive coding standard is essential for successful product delivery; it helps in enforcing best practices and avoiding pitfalls, and it makes knowledge dissemination across the team easier. Traditionally, coding standards are thick, laborious documents, spanning hundreds of pages and detailing the rationale behind every directive. While these are better than no standard at all, such efforts are usually indigestible by the average developer. In contrast, the WCF coding standard presented here is very thin on the “why” and very detailed on the “what.” I believe that while fully understanding every insight that goes into a particular programming decision may require reading books and even years of experience, applying a standard should not. When absorbing a new developer into your team, you should be able to simply point the newcomer at the standard and say: “Read this first.” Being able to comply with a good standard should come before fully understanding and appreciating it—that should come over time, with experience. The WCF coding standard presented in this appendix captures dos and don’ts, pitfalls, guidelines, and recommendations, drawing on the best practices and helper classes discussed throughout this book.
General Design Guidelines
All services must adhere to these principles:
Services are secure.
Service operations leave the system in a consistent state.
Services are thread-safe and can be accessed by concurrent clients.
Services ...
Get Programming WCF Services, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.