Changeset 767 for trunk/docs/coding_standards.txt
- Timestamp:
- Jun 7, 2022 6:41:24 AM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/coding_standards.txt
r334 r767 11 11 Essential reading: 12 12 http://pear.php.net/manual/en/standards.php 13 14 15 ===================================================================== 16 General guidelines 17 ===================================================================== 18 19 - Respect these coding styles. 20 - Don't add npm dependencies if you can avoid it. If a new dependency is unavoidable, be mindful of its size, freshness and added value. 21 - Use Svelte for all UI needs. 22 - Try to not shoehorn your code into existing functions or components. 23 - Simple is better. OOP is not inevitable. Simple functions often work as well, if not better. 24 - If you must use OOP, avoid inheritance as much as possible, no one likes digging several layers of abstraction. 25 - Comment the code. What, why, how, just make your intent clear. 13 26 14 27 … … 45 58 46 59 Use an indent of 4 spaces, with no tabs. Code and especially comments should 47 usually be wrapped <= 80 characters. Exceptions are made in the case where 60 usually be wrapped <= 80 characters. Exceptions are made in the case where 48 61 code readability is significantly improved with longer lines. 49 62 … … 224 237 { 225 238 $app =& App::getInstance(); 226 239 227 240 // If an array, check values recursively. 228 241 if (is_array($email)) { … … 284 297 All code should work with register_globals = Off. This means using 285 298 $_REQUEST, $_GET, $_POST, $_COOKIE, $_SESSION, $_SERVER, and $_ENV 286 to access all request, get, post, cookie, session, server, and 299 to access all request, get, post, cookie, session, server, and 287 300 environment data, respectively. 288 301
Note: See TracChangeset
for help on using the changeset viewer.