A bit of a rant, but lets have some fun with it. I have lots of candidates for numbers 7 and 8. Any thoughts on what they should be? Preferably framework agnostic.
- 1st Rule: You do not reference external scopes in a component.
- 2nd Rule: YOU DO NOT REFERENCE EXTERNAL SCOPES IN A COMPONENT.
- 3rd Rule: Always use "var" for private variables in your methods including loop counters and query names
- 4th Rule: Always explicitly scope references to the arguments scope.
- 5th Rule: Always create an "init()" method to get your component started. Avoid the use of the implicit constructor since it can't take arguments.
- 6th Rule: Avoid using the "this" scope unless it is for something you KNOW is never going to change. Otherwise, code that uses your cfc will be susceptible to errors caused by changes in your cfc code.
- 7th Rule:
- 8th Rule: