Design Patterns in Apex: Introduction


One area which I wish to cover on this blog is using design patterns in Salesforce. Although the common patterns are thoroughly documented on the internet, there are very few articles that are specific to Salesforce – and whilst the patterns are generally language/platform agnostic, one of the most important steps in using a pattern is decided when to use it. Hopefully some of the suggestions and examples in upcoming posts will cover this.

Not all patterns are useful when working on the platform, but I hope to cover some of the more common ones:

  • Strategy
  • Singleton
  • Factory
  • Facade
  • Adaptor

As I didn’t come from a developer / computer science background, I have had to learn these as I have gone along – sometimes using them without even know they were a pattern! Some of the best non-Salesforce specific resources are the following:

View original post 112 more words