<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Commentaires on Gabriel Mongeon</title><link>https://gabrielmongeon.ca/tags/commentaires/</link><description>Recent content in Commentaires on Gabriel Mongeon</description><generator>Hugo</generator><language>fr</language><lastBuildDate>Wed, 08 Dec 2010 21:02:00 -0500</lastBuildDate><atom:link href="https://gabrielmongeon.ca/tags/commentaires/index.xml" rel="self" type="application/rss+xml"/><item><title>Documentation de référence</title><link>https://gabrielmongeon.ca/2010/12/documentation-de-r%C3%A9f%C3%A9rence/</link><pubDate>Wed, 08 Dec 2010 21:02:00 -0500</pubDate><guid>https://gabrielmongeon.ca/2010/12/documentation-de-r%C3%A9f%C3%A9rence/</guid><description>&lt;p>Dans &lt;a href="http://msdn.microsoft.com/en-us/magazine/gg412507.aspx">l’édition de novembre de MSDN Magazine&lt;/a>, &lt;a href="http://msdn.microsoft.com/magazine/ee532098.aspx?sdmr=PeterGruenbaum&amp;amp;amp;sdmi=authors">Peter Gruenbaum&lt;/a> explique comment écrire une bonne documentation de référence pour les APIs dans sont article intitulé “&lt;a href="http://msdn.microsoft.com/en-us/magazine/gg309172.aspx">A Coder’s Guide to Writing API Documentation&lt;/a>”.&lt;/p>
&lt;p>Mon attention s’est particulièrement portée sur la Figure 2 et 3, qui explique comment commenter tout en gardant une homogénéité au travers de tout l’API. Je vous les ai reproduit ici:&lt;/p>
&lt;p>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Figure 2 &lt;/font>&lt;strong style="margin: 0px">&lt;font style="font-size: 9.6pt">Reference Documentation Style&lt;/font>&lt;/strong>&lt;/font>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Type&lt;/font>&lt;/font>&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Guideline&lt;/font>&lt;/font>&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Examples&lt;/font>&lt;/font>&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Class&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Start with a word like “Represents”&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">“Represents a user’s photo album.”&lt;/font>&lt;/font>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Methods and functions&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Start with a verb&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">“Returns the number of contacts for the specified area.”&lt;/font>&lt;/font>&lt;br>&lt;br>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">“Pauses the video.”&lt;/font>&lt;/font>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Properties&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Use a noun or start with verbs such as “Gets” or “Gets and sets”&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">“The user’s tasks.”&lt;/font>&lt;/font>&lt;br>&lt;br>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">“Gets and sets a collection of the user’s tasks.”&lt;/font>&lt;/font>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Events&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Start with a phrase such as “Raised when” or “Occurs when”&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">“Raised when the response from server is received.”&lt;/font>&lt;/font>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">XML elements&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Use a noun-based phrase&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">“The city’s postal code.”&lt;/font>&lt;/font>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Boolean values&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">For Boolean properties, start with “Indicates whether”; for Boolean return values on methods and functions, start with “Returns whether”&lt;/font>&lt;/font>&lt;/td>
 &lt;td>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">“Indicates whether the control is visible.”&lt;/font>&lt;/font>&lt;br>&lt;br>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">“Returns whether two regions intersect.”&lt;/font>&lt;/font>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;font face="Segoe UI">&lt;font style="font-size: 9.6pt">Figure 3 &lt;/font>&lt;strong style="margin: 0px">&lt;font style="font-size: 9.6pt">Reference Documentation Example&lt;/font>&lt;/strong>&lt;/font>&lt;/p></description></item></channel></rss>