
Coding Conventions and Rules
============================

- Use the gnu style of indentation. If emacs is used for development,
  then this is the default style, or it can be set like this:
      M-x c-set-style RET gnu RET

  If another editor is used (like textpad etc.) you have to take care
  to follow this style. If it is not so easy, then use any style that
  you want and then open the file in emacs and convert it to gnu style,
  using these commands:
      C-x h  (select all the buffer)
      C-M-\  (reindent the selected region)

- The files should not contain any TAB characters inside, because
  some editors may expand them to 4 spaces and some others to 8 spaces,
  thus distorting the indentation and making more difficult working 
  collaboratively.

  Set the length of the tab of the editor to 4 and make it write 4 spaces
  instead of "\t" whenever the tab key is pressed. 

  In emacs this can be done by openning:
      Menu/Options/Customize Emacs/Specific Option...
      indent-tabs-mode
  then set it to nil (off), and then save it for this session and for the
  future sessions. See also:
      Menu/Options/Customize Emacs/Specific Group...
      indent

  If a file already contains tabs, then they can be converted to spaces
  like this:
      C-x h
      M-x untabify  (the reverse command is tabify)
  In textpad or any other editor you can do it by find&replace.

- All the comments of the functions should be in the phpDocumentor 
  standard, or similar (e.g. doxygen), which is like this:
      /**            
       * Comment      or   /** comment */
       */

- Allways use full PHP delimiters, like these: <?php ... ?>
  not like these: <? ... ?> or like these: <% ... %>.

- The JavaScript code should be made as similar to C code as possible. 
  E.g. JS allow to omit the semicolumn at the end of a statement, 
  like this:
      alert("ok")
  however we should not ommit it, like this:
      alert("ok");
  in order to make it more similar to C code.

- HTML code should be indented by 2 spaces, like this:
      <head>
        <title>...</title>
      </head>
  and it should follow the XHTML standard.
 
