Calendar:Style Guide: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 13: Line 13:
* Avoid duplicate code: Use existing utility functions (example: base/src/calUtils.js) if possible
* Avoid duplicate code: Use existing utility functions (example: base/src/calUtils.js) if possible
* Create your own utility functions if code is being used more than once. If you cannot find a utility file to place your function in, create your own. Do so sparingly.  
* Create your own utility functions if code is being used more than once. If you cannot find a utility file to place your function in, create your own. Do so sparingly.  
* When adding source code to existing functions and Objects check the possibility to adapt the existing style around your new codelines "on the way". On the other hand it may sometimes be better to take over the existing coding style.
== Filenames ==
== Filenames ==
* In general, try to give new files a similar name as the existing files. Example: in calendar/base/content, all files are prefixed with <code>calendar-</code>.
* In general, try to give new files a similar name as the existing files. Example: in calendar/base/content, all files are prefixed with <code>calendar-</code>.
1

edit

Navigation menu