Blogs
-
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…
-
Clean Code Emphasizes The Comparison Between Code And Comments.
As developers, it is our duty to ensure that the code we produce is easily comprehensible, especially by fellow developers who may inherit or collaborate on our code. Additionally, we should write code in a manner that allows us to understand it when we revisit it in the future. This is where comments play a…