Blogs
-
Public, Private, Protected, And Global Keywords in Apex Programming
Public, private, protected, and global can also be referred to as access modifiers. Apex supports these four types of modifiers. 1. public This keyword is used to Defines a class or method or variable that can be used by any Apex in this application or namespace. Example 2. private This key word is used to…
-
Design Patterns For Apex Triggers
Utilizing design patterns is essential to enhance code efficiency and prevent exceeding governor limits. Developers sometimes create inefficient code leading to repeated instantiation of objects, resulting in poor performance and a risk of breaching governor limits. This issue is particularly prevalent in triggers, especially when operating on a set of records. This chapter explores key…
-
Custom Metadata Types For Parameterized Dependency Injection
Implementing dependency injection through Custom Metadata Types is an effective approach for crafting Salesforce code that is easily extensible. Even in cases where the design may not undergo extensions (perhaps due to a client with unchanging requirements), this method proves valuable by promoting the separation of concerns and compelling dependencies to be modularized, aligning well…