Reference documentation

Reference documentation provides comprehensive information about the programming elements that are associated with technologies such as ASP.NET or Windows Presentation Foundation, or programming languages such as C++, C#, or Visual Basic. Reference topics are typically used to document class libraries, object models, and programming language constructs.

Note

Information such as configuration schemas, compiler options, and error messages might also be documented in reference topics, and will not necessarily follow the guidelines described in this section.

Standardization and consistency

Software developers consult reference documentation to look up specific programming elements, not to read about programming concepts or product features. Developers often compare programming elements to determine how they relate and to decide which one to use for a particular scenario.

Therefore, standardization and consistency are essential in helping users get the information they need as quickly as possible. If your reference topics use a standard topic design, predictable headings and structure, and consistent wording, users will know what to look for and where to find it on the page.

Reference topic titles

Generally, reference topics are titled by using the name of a programming element (such as Clear), followed by an element type (such as Class, Method, Property, or Event). If the name is shared by multiple elements, you can add a differentiator such as the parent element name or the product or technology name. The differentiators are especially important if your content coexists with other reference documentation in a large content repository such as the Microsoft Developer Network (MSDN) Library.

Microsoft style for reference topic titles

Clear Method

Device.Clear Method

Clear Method (Microsoft Ajax)

Not Microsoft style for reference topic titles

Clear

What to include in a reference topic

The following table lists the information that is typically provided in reference topics. Not all sections will appear in all topics. For example, the “Property value” or “Field value” section appears only in reference topics for properties. Sections will also vary, depending on the language, product, or technology being documented.

Section

Contains

Description

Typically, one or two sentences that describe the programming element. Whenever possible, explain what the element does or represents as concisely as possible without repeating the wording in the element name. For example, the description of a property named Control.AllowDrop might be “Gets or sets a value that indicates whether the control can accept data that the user drags onto it.”

Declaration/Syntax

The code signature that defines the programming element. This section might also provide usage syntax. If you are documenting a technology that can be used with multiple programming languages, provide the syntax for each language.

Parameters

If the programming element has parameters, a description of each parameter and its data type. If appropriate, indicate whether the parameter is required or optional, and whether it represents input or output. Descriptions should provide as much useful detail as possible instead of just repeating the words in the parameter name or repeating the data type.

Microsoft style

visible

Type: System.Boolean

true to specify that the box is rendered; false to specify that it is not rendered.

input

Type: System.String

The text to convert.

Not Microsoft style

visible

Type: System.Boolean

A System.Boolean.

input

Type: System.String

The input.

Return value

If the programming element returns a value, a description of that value and information about its data type. If the value is a Boolean that indicates the presence of a condition, describe the associated condition.

Property/Field value

A description of the value of a property or field. If the property or field has a default value, describe that as well. Include the data type of the property or field value if applicable.

Exceptions/Error codes

If the programming element can throw exceptions or raise errors when it is called, the list of those exceptions or errors, and descriptions of the conditions under which they occur.

Permissions

Security permissions that apply to the programming element, if required.

Remarks

Additional information about the programming element and important details that may not be obvious from its syntax, parameters, or return value. For example, the “Remarks” section might explain what the element does in more detail, compare it with similar elements, and identify any potential issues in its use.

Example

A code example that illustrates how to use the programming element. (For more information, see Code examples.)

Requirements

Language or platform requirements for using the programming element.

See also

References or links to topics or articles that provide more information about how to use the programming element, and references or links to related elements.

Some of this information, such as syntax, parameter names and types, and return values and types, can sometimes be generated directly from the source code of the technology that is being documented. Some organizations also export code comments from the source code and use that information to fill in sections, such as the programming element description, parameter descriptions, and remarks. If you decide to auto-generate your reference documentation from code comments, be sure to review the quality and appropriateness of the comments. Code developers might leave out details that seem obvious to them but that might not be obvious to users. In addition, developers use comments to provide implementation or internal details, to flag areas that might change, and to document aspects of the code for maintenance purposes. This information might be useful to other internal code developers, but it might not be suitable for user documentation.

For examples of technical reference topics, see the .NET Framework Class Library section (http://msdn.microsoft.com/en-us/library/gg145045.aspx) of the Microsoft Developer Network (MSDN) Library (http://msdn.microsoft.com/library/).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.231.125