KISS principle for apex code with List and Map in Salesforce

Here are some KISS (Keep it simple, stupid) principles for cleaning our apex code with List and Map in Salesforce, as Linus Torvalds said: “Talk is cheap. Show me the code”, let me show you as below:

Initialize Map

Normal

KISS principle

Select(SOQL) to Map

Normal

KISS principle

Initialize List

Normal

KISS principle

Map keys / Set to List

Normal

KISS principle


Post Tagged with , , ,