Actions

Talk

Difference between revisions of "Coding style and standards"

From Joomla! Documentation

 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
Under 'Functions and Methods', is the "protected function _sort()" an error (i.e., can protected methods begin with an underscore or is this meant to be "private function_sort()")?
 +
 
Shouldn't the JText not have spaces?
 
Shouldn't the JText not have spaces?
  
Line 5: Line 7:
 
jImport() is given as an example. But the entire codebase is littered with jimport(), as well as lots of 3PD extensions. Do you mean to designate jImport() as the new canonical name for this method, or should we carry this as an exception?
 
jImport() is given as an example. But the entire codebase is littered with jimport(), as well as lots of 3PD extensions. Do you mean to designate jImport() as the new canonical name for this method, or should we carry this as an exception?
  
There could also be a section on template guidelines, both in terms of how to style (eg Does HTML wrapped by a conditional get indented relative to the conditional?) and as to what kind of code is valid in the template (eg. All logic code other than conditionals and loops to be parsed into a variable in the View and rather than created in in the template)
+
 
 +
== Database query string formatting? ==
 +
 
 +
In the example provided on the page in the section 'SQL Queries' there is a multi-line query, which contains string literals and variables. It seems that the query string is broken after the line ending with .(int) $state
 +
 
 +
Shouldn't there be a period (.) at the end to lock in with the remaining part of the query string??

Latest revision as of 05:31, 1 June 2011

Under 'Functions and Methods', is the "protected function _sort()" an error (i.e., can protected methods begin with an underscore or is this meant to be "private function_sort()")?

Shouldn't the JText not have spaces?

Studly caps exception?

jImport() is given as an example. But the entire codebase is littered with jimport(), as well as lots of 3PD extensions. Do you mean to designate jImport() as the new canonical name for this method, or should we carry this as an exception?


Database query string formatting?

In the example provided on the page in the section 'SQL Queries' there is a multi-line query, which contains string literals and variables. It seems that the query string is broken after the line ending with .(int) $state

Shouldn't there be a period (.) at the end to lock in with the remaining part of the query string??