Update:Remora Standards: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(added html, css and js standards)
(→‎l10n: moved l10n to the l10n page)
 
(4 intermediate revisions by 3 users not shown)
Line 6: Line 6:
== No new line at EOF ==
== No new line at EOF ==
[http://pear.php.net/manual/en/standards.file.php 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'''.
[http://pear.php.net/manual/en/standards.file.php 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'''.
: (In that case, the PHP documentation [http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php suggests removing the closing tag at the end of the file altogether].)


= Comments and PHPDoc =
= Comments and PHPDoc =
Line 16: Line 17:


= HTML =
= HTML =
HTML 4.01 Strict
HTML 4.01 Strict. Close and nest your tags correctly, as if you were writing XHTML.
Close and nest your tags correctly, as if you were writing XHTML.


= CSS =  
= CSS =  
Line 27: Line 27:
= Testing =
= Testing =
* [[Update:Remora_Testing|Remora Testing Page]]
* [[Update:Remora_Testing|Remora Testing Page]]
= l10n =
see the [[Update:Remora Localization|remora localization page]].

Latest revision as of 23:16, 23 October 2006

« Back to Update:Remora

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.

(In that case, the PHP documentation suggests removing the closing tag at the end of the file altogether.)

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

Testing

l10n

see the remora localization page.