In this chapter, we discussed and listed some of the most common mistakes made by developers. These mistakes are also termed as anti-patterns. Some develop invalid code that can only be detected at runtime, hard-coding, and so on. The purpose of writing this chapter is to let you know about the potential issues so that you keep them in mind while developing any code in Apex.
Developing code is an art. Every developer is an artist and follows some unique styles. This book will suggest some of industry-wide accepted patterns to solve repeated problems faced in the Salesforce application development. However, developers can improvise while implementing these design patterns.
Design patterns may or may not provide exact solutions to our coding problems; however, they guide you to design better code architecture and can help you ideate new solutions.
The motive of the design pattern is to design an application with loosely coupled layers and easy-to-maintain and reusable code. While developing...