Update:Remora Standards: Difference between revisions
Jump to navigation
Jump to search
(→Style) |
(added html, css and js standards) |
||
| Line 14: | Line 14: | ||
** @return - define all retvals and their type/purpose | ** @return - define all retvals and their type/purpose | ||
* // style comments can be used for smaller statements, just footnotes. If the footnote turns into an essay, use /** */ | * // style comments can be used for smaller statements, just footnotes. If the footnote turns into an essay, use /** */ | ||
= HTML = | |||
HTML 4.01 Strict | |||
Close and nest your tags correctly, as if you were writing XHTML. | |||
= CSS = | |||
Valid | |||
= JavaScript = | |||
No errors with javascript.options.strict set to true | |||
= Testing = | = Testing = | ||
* [[Update:Remora_Testing|Remora Testing Page]] | * [[Update:Remora_Testing|Remora Testing Page]] | ||
Revision as of 20:13, 14 September 2006
Style
Follow the PEAR Coding Standards with one exception:
No new line at EOF
Leaving a new line at the end of a .php file after the ?> will make horrible things happen for HTTP headers. Do not follow this standard.
Comments and PHPDoc
- Read and understand the PHPDoc reference when needed.
- Make a concerted effort to [write out comments], especially before function definitions. Bare minimum comments for function defs:
- What it is for
- @param - define all inputs and their type/purpose
- @return - define all retvals and their type/purpose
- // style comments can be used for smaller statements, just footnotes. If the footnote turns into an essay, use /** */
HTML
HTML 4.01 Strict Close and nest your tags correctly, as if you were writing XHTML.
CSS
Valid
JavaScript
No errors with javascript.options.strict set to true