{"id":515,"date":"2013-08-28T12:04:42","date_gmt":"2013-08-28T16:04:42","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/acts\/?p=515"},"modified":"2013-08-28T12:14:08","modified_gmt":"2013-08-28T16:14:08","slug":"documenting-documentation","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/acts\/2013\/08\/28\/documenting-documentation\/","title":{"rendered":"Documenting Documentation"},"content":{"rendered":"<p>I recently waded back into simple web application development (more on how that feels later), and one of the many aspects of coding that I&#8217;ve been refreshing myself on is how to best document what I&#8217;ve written so my future self doesn&#8217;t get too confused over what I implemented or why I implemented it in the way I did. The application is deadly simple, so simple that I hesitate to call it an application. The web page contacts a PHP script via an Ajax call, and the PHP script does its thing, sending back a JSON-encoded object. The client subsequently uses the object to display a message of success or failure.<\/p>\n<p>As I said, deadly simple.<\/p>\n<p>Nevertheless, as simple as the application is, I&#8217;ve been researching how best to document PHP and JavaScript. For PHP, the definitive answer appears to be <a title=\"phpDocumentor2\" href=\"http:\/\/www.phpdoc.org\/\">phpDocumentor 2<\/a>. For JavaScript, there is <a title=\"JSDoc on Github\" href=\"https:\/\/github.com\/jsdoc3\/jsdoc\">JSDoc<\/a>. Here are some additional links that I found useful:<\/p>\n<h3>phpDocumentor<\/h3>\n<ul>\n<li><a title=\"phpDocumentor Quickstart\" href=\"http:\/\/manual.phpdoc.org\/HTMLSmartyConverter\/HandS\/phpDocumentor\/tutorial_phpDocumentor.quickstart.pkg.html\">phpDocumentor Quickstart (phpDocumentor for newbies)<\/a>: Good guide for newbies (like me!). The <a title=\"Source code for sample2.php file\" href=\"http:\/\/manual.phpdoc.org\/HTMLSmartyConverter\/HandS\/phpDocumentor\/tutorial_sample2.pkg.html\">source code for the sample2.php file<\/a> is especially helpful for people who need examples (like me!).<\/li>\n<li><a title=\"Introduction to PhpDoc\" href=\"http:\/\/www.sitepoint.com\/introduction-to-phpdoc\/\">Introduction to PhpDoc<\/a>: Another great tutorial.<\/li>\n<li><a title=\"Documentation with phpDocumentor\" href=\"http:\/\/www.packtpub.com\/article\/documentation-with-phpdocumentor-part1\">Documentation with phpDocumentor<\/a>: A much lengthier, two-part tutorial.<\/li>\n<\/ul>\n<h3>JSDOC<\/h3>\n<ul>\n<li><a title=\"An introduction to JSDoc\" href=\"http:\/\/css.dzone.com\/articles\/introduction-jsdoc\">An introduction to JSDoc<\/a>: A friendly, very basic to getting yourself up and running with JSDoc.<\/li>\n<li><a title=\"Use JSDoc\" href=\"http:\/\/usejsdoc.org\/\">Use JSDoc<\/a>: Official site for documentation.<\/li>\n<\/ul>\n<p>Note that I haven&#8217;t actually tried generating documentation with either toolset; that&#8217;s a completely different challenge. I&#8217;ve mostly been following the format so that my documentation can be printed\/generated if somebody (aka me!) wishes. And what I&#8217;ve come to understand is that learning how to document a language feels almost as complicated as learning the language itself.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently waded back into simple web application development (more on how that feels later), and one of the many aspects of coding that I&#8217;ve been refreshing myself on is how to best document what I&#8217;ve written so my future self doesn&#8217;t get too confused over what I implemented or why I implemented it in [&hellip;]<\/p>\n","protected":false},"author":4634,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[910,17295,3163,1],"tags":[63958,64010,111293,63930],"class_list":["post-515","post","type-post","status-publish","format-standard","hentry","category-development","category-javascript","category-php","category-uncategorized","tag-code-standards","tag-documentation","tag-javascript","tag-php-2"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/acts\/wp-json\/wp\/v2\/posts\/515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/acts\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/acts\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/acts\/wp-json\/wp\/v2\/users\/4634"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/acts\/wp-json\/wp\/v2\/comments?post=515"}],"version-history":[{"count":6,"href":"https:\/\/archive.blogs.harvard.edu\/acts\/wp-json\/wp\/v2\/posts\/515\/revisions"}],"predecessor-version":[{"id":520,"href":"https:\/\/archive.blogs.harvard.edu\/acts\/wp-json\/wp\/v2\/posts\/515\/revisions\/520"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/acts\/wp-json\/wp\/v2\/media?parent=515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/acts\/wp-json\/wp\/v2\/categories?post=515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/acts\/wp-json\/wp\/v2\/tags?post=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}