25 Habits of Great Force.com Developers

Habits of Great Force.com DevelopersWant to become a “Great” Force.com Developer? One does not become a successful App developer just by training or mere experience. Many of our clients for whom we are developing the Appexchange Apps ask – “We want a Great Force.com Developer”. What makes a Force.com developer great? and other developer not so great. From our experience of over 100 person years of development we realized that to be successful or a great developer you have to learn from the best practices – and Force.com developers are no exception.

There are some best practice habits that we have seen in all successful Force.com developers. In this post we will be listing these habits that make a developer – “Great” Force.com developer.

  1. They check if they can use declarative methods before starting to write code.
  2. Successful Force.com developers keep the code simple by keeping it clean anc concise.
  3. Do not put the SOQL queries in the loop otherwise it will hit the Salesforce.com limits. Developers should use Maps or relationships to have one SOQL query outside the for loop.
  4. Use Maps to make SOQL queries, DML transactions, and Apex triggers more efficient
  5. Use the object relationships to optimize the queries.
  6. Avoid DML operations like insert, update, delete, undelete, merge inside the loop.
  7. Bulkify the code to making sure the code properly handles more than one record at a time
  8. Use utility or helper methods are efficiently written to handle collections of records. This will avoid unnecessarily executing inefficient queries and DML operations.
  9. Use collections and streamlining the SOQL queries that will result in efficient Apex code and will avoid governor limits.
  10. Use the Limits Apex Methods that can debug more effectively and Avoid Hitting Governor Limits.
  11. Use only one trigger per object.
  12. Keep the logic outside the trigger by calling the apex classes like a trigger handler. They use a Trigger Handler framework wherein the business logic is separated into a separate handler class.
  13. Aim for 100% code coverage.
  14. Write meaningful test classes and write them before you write the code and include all the conditions like null, boundary value etc.
  15. Write test methods to verify the large datasets.
  16. Do not hardcode Ids within the code.
  17. Always have a justified reason before creating a Visualforce page instead of Standard UI.
  18. Escape the URL parameters if they are present in code.
  19. Try to develop code “With Sharing” and have a justified reason if they are not doing so.
  20. Use Custom settings for non-dynamic variables in code.
  21. Clean any obsolete classes, properties or methods.
  22. Always do exception handling for SOQL Queries and DML statements.
  23. Follow Code & Naming standards.
  24. Use the helper classes in batch apex use framework for logging DML results
  25. When using Future methd (@future) they invoke it with a batch of records so that it is only invoked once for the records to process.

These habits may be hard to form – but once they become a habit when you are developing – you are sure to become become a “Great” Force.com Developer.

Speak Your Mind

*