Preface
It was spring 2015; we were both discussing our presentation for Dreamforce 2015. During the discussion, we stumbled on the topic of the usage of design patterns in Apex. We observed that design patterns are still not extensively used in the Apex programming arena. We think that a few prominent factors for this situation are that there are not enough resources available around the design pattern implementation in Apex. Secondly, most of the Apex programmers who started their development career with Force.com have less exposure to other development platforms. Thirdly, some of the design patterns simply do not apply to Force.com development platforms.
As per our observation, the usage and mention of design patterns in day-to-day programming is reduced in Apex as compared to other development platforms. Developers coming from other programming backgrounds mostly have a working experience with design patterns and it's implicit for them to use it in their code style and design.
We realized that it would be even better to develop content around the design pattern implementation in a language that Apex developers can easily relate to. We positively think that by providing scenarios that are specific to Apex development use cases, developers will be able to understand and implement the design patterns in Apex with ease.
To ensure that we are able to provide information uniformly to all Apex developers irrespective of their experience level, this book also includes general programming best practices, programming principles, OOP concepts, and the usual pitfalls at appropriate places.
In line with our past experience with design pattern learning and implementation is the problem of memorizing the design patterns and situations where they fit in. However, in this book, we took real-life scenarios to explain a situation where an appropriate design pattern will be applied. One can easily relate the design pattern with an example given in this book to identify when it is the time to use that pattern.
Some open source GitHub repository links, Salesforce official developer blogs, and other tips have been shared throughout the book, which can be very helpful in Force.com project development.