AppSuite:UI Development Style Guide: Difference between revisions

From Open-Xchange
(Created page with "=UI Development Style Guide= There lots of stuff we don't need to talk about because JSHint will bug you! (white space, formatting, undefined variables, globals, etc.) *Inde...")
 
No edit summary
 
(43 intermediate revisions by 5 users not shown)
Line 1: Line 1:
=UI Development Style Guide=
The content on this page has moved to https://documentation.open-xchange.com/7.10.2/ui/


There lots of stuff we don't need to talk about because JSHint will bug you! (white space, formatting, undefined variables, globals, etc.)
Note: Open-Xchange is in the process of migrating all its technical documentation to a new and improved documentation system (documentation.open-xchange.com). Please note as the migration takes place more information will be available on the new system and less on this system. Thank you for your understanding during this period of transition.
 
*Indentation is 4 spaces*
No tabs! And there's no need for two consecutive empty lines. If possible turn on "show white-spaces" in your editor.
 
Eclipse seems to have a bug on MacOS that makes the editor really slow when showing white-spaces. However, as long as you configure Eclipse properly to use spaces instead of tabs and remove all trailing white-space on save (yep, there's a flag for that), you can leave that option turned off.
 
*Use underscore's high-level functions (e.g. each, filter, map)*
Because it's nice to read and it uses native code if available. For example, iterating an array via .each() is faster than a classic for-loop (in Chrome at least). Don't use jQuery's each (except for DOM nodes). If you need "break" you have to use a classic for-loop.

Latest revision as of 09:09, 15 May 2019

The content on this page has moved to https://documentation.open-xchange.com/7.10.2/ui/

Note: Open-Xchange is in the process of migrating all its technical documentation to a new and improved documentation system (documentation.open-xchange.com). Please note as the migration takes place more information will be available on the new system and less on this system. Thank you for your understanding during this period of transition.