Ø Apex code must provide proper exception handling.
Ø Using Collections, Streamlining Queries, and Efficient For
Loops.
Ø Avoid SOQL, SOSL Queries or DML statements inside FOR
Loops.
Ø Should not use Async (@future) methods inside loops.
Ø Should use Asynchronous Apex (@future annotation) for logic
that does not be executed synchronous.
Ø We should not use hardcoded IDs as they may cause problem
when moved to production.
Ø When querying large data sets, use a SOQL “for” loop.
Ø We should prevent SOQL and SOSL injection attacks by using
static queries, binding variables or escape single quotes method.
Ø Should use SOSL rather than SOQL where possible.
Ø Bulkify your Code.
Ø Use of the Limits Apex Methods to Avoid Hitting Governor Limits.
Ø Use of the Limits Apex Methods to Avoid Hitting Governor Limits.