= Overview = Where possible, we should endeavour to share [wiki:Coding_Conventions Coding Conventions] with the engine programmers. = Naming Conventions = Use only '''alphanumerics''' (A..Z, a..z, 0-9) and '''underscores''' (_) for object names and parameters. Various special characters are reserved for use as delimiters and markers (particularly semicolons), so it's best not to use anything else. Technically, the hyphen or dash (-) can be used interchangeably with hyphens, but you'll need to reference the string in a different way: {{{ object.cell_id }}} is exactly equivalent to {{{ object["cell-id"] }}} For consistency, though, it's best to just stick to alphanumerics and underscores. = Variable Casing = Functions, variables, and objects written in JavaScript should be created using ''camelCase capitalisation'' (the first word is in lower case, and any additional words in title-case eg: '''setModifiedFlag()'''). For inherited components, however -- "core XML", exposed engine functions and built-in JS commands -- their own casing will of course need to be maintained in order for the commands to be recognised. These tend to be camelCase or lowercase for the most part. Endeavouring to use camelCase where possible should provide a reasonable middle ground. Example of conventional scripted casing: {{{ }}} = Formatting = * Use the "Good Bracketing" specified in [wiki:Coding_Conventions Coding Conventions] ({ } are horizontally aligned). * Use meaningful comments and variable names.