How To Document in the Cloud

26.07.2011

So we've removed all the excuses for not commenting code. In modern Cloud based applications, though, much of the action is isn't in code: it's declarative programming and custom fields/objects/relations. Here, too, document-as-you-go must be explicitly measured with incentives for both the developer and administrator. In systems like Salesforce.com, every new field has two opportunities for self-documentation: the description area, and the help-bubble information area. I encourage both to be used, with different information in each. If a cloud system doesn't have this, we use dummy fields with names that shadow the real field, adding metadata information in a human-readable way. For example, for the numerical field "salesteam" we'd add a text field "?salesteam" and set the default value to descriptive text. If your system doesn't support extended-ASCII in the field name, use a punctuation mark like { or ¡ that forces the variable name to come at the end of any alphabetized list. If your system doesn't support default values for text fields, you'll have to embed as much intelligence as you can into the dummy field name.

What about self-documenting the messages that go between modules? With WSDL or other XML dialects, you can put lots of metadata into the XML itself, or into supporting DTDs. While these can be verbose and arguably slow system response times, most of the time the extra overhead is barely noticeable. When you're making a call to the Cloud directly from your code, the libraries that actually form the REST or SOAP messages typically won't let you control much of what goes over the wire. In this case, sending an extra information-only text variable or two in the outbound request will make both troubleshooting and learning curves a lot easier in the long run.

The bottom line: even though the cloud doesn't force any documentation or make it any easier to enforce, there are clever ways to use cloud app features and Web service protocols to make modern systems more self-documenting. Call it sky-writing, and enforce it in your next cloud project.

David Taber is the author of the new Prentice Hall book, "" and is the CEO of , a certified Salesforce.com consultancy focused on business process improvement through use of CRM systems. SalesLogistix clients are in North America, Europe, Israel, and India, and David has over 25 years experience in high tech, including 10 years at the VP level or above.

Follow everything from CIO.com on Twitter .