doc/coding_standards_js.rst
author Alexandre Fayolle <alexandre.fayolle@logilab.fr>
Tue, 29 Mar 2011 08:47:09 +0200
branchstable
changeset 7134 01544b6d98fa
parent 6049 f0ae98fa85a1
permissions -rw-r--r--
allow CW to act as a Pyro Server without registering the server to a Pyro Nameserver (closes #1528533) This is achieved by configuring the pyro-ns-host to __NO_PYRONS__ (which is an illegal value for a host name) The Pyro URI for the server can be retrieved by reading the pyro_uri attribute of the Repository

Javascript Coding Standards
---------------------------

(Draft, to be continued)

:Naming: camelCase, except for CONSTANTS

Indentation rules
~~~~~~~~~~~~~~~~~
- espace avant accolade ouvrante

- retour à la ligne après accolade ouvrante (éventuellement pas
  de retour à la ligne s'il y a tout sur la même ligne, mais ce n'est
  pas le cas ici.

- no tabs


Documentation
~~~~~~~~~~~~~
XXX explain comment format for documentation generation


Coding
~~~~~~
- Don't forget 'var' before variable definition, and semi-colon (';') after **each** statement.
- Check the firebug console for deprecation warnings


API usage
~~~~~~~~~
- unless intended, use jQuery('container') rather than jqNode('container')


See also
~~~~~~~~
http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml