#3 Thou shalt have a happy balance
between clicks & code
#4 Thou shalt only put one trigger per object
#5 Thou shalt not put code in triggers other than
calling methods and managing execution order
#6 Thou shalt utilize maps for queries
#7 Thou shalt make use of relationships to
reduce queries wherever possible
#8 Thou shalt aim for 100% test coverage
In general test your methods for:
• Given proper input it should act like this.
• Not just happy path, but all logic branches.
• Given bad data it should error like this.
• Given a user with X profile and Y role it should
act like this.
#9 Thou shalt write meaningful and useful tests
It’s not a test without assertions.
Assert(A==B, “Reason for Assert failure”)
AssertEquals(A,B, “Reason for Assert failure”)
AssertNotEquals(A,B, “Reason for Assert
#10 Thou shalt limit future calls and use
asynchronous code where possible
In general bias towards batch apex
Ensure it runs as efficiently as possible.
If you need @future methods.
#11 Research the session content beforehand
If you go to Dreamforce・・・