My manager and I met up the other morning for a paired programming session. We had two possible things to work on and decided to embrace Kent Beck's 'start small, or not at all,' by focusing on a seemingly innocuous task -- adding the disabled attribute to a lightning-button in one of our Lightning Web Components (LWC). Even with strict adherence to TDD, this is a task that should take only a few minutes; it's not a complicated component, and the change is extremely straightforward. Would it ...| www.jamessimone.net
So-called Lazy evaluated functions have their actual execution delayed until a terminator function is called. It's common for lazy functions to be chained together using fluent interfaces, culminating with actions being performed when the terminator function is called. What can Salesforce developers writing Apex code stand to gain by learning more about lazy functions? Fluent interfaces -- or objects that return themselves during function calls -- also tend to satisfy one of the prerequisites...| www.jamessimone.net
The Singleton pattern is frequently used to represent objects that should only be initialized once; either because in being constructed, they feature CPU intensive operations, or because they revolve around atomic operations (like logging a specific time) that should always be referenced consistently. Learn how to improve upon the idiomatic Apex singleton pattern in Salesforce to reap performance benefits and save lines of code at the same time!| www.jamessimone.net
API development in Apex is mostly bespoke, requiring the duplication of rest resources. Let's look at how we can change that using inheritance and polymorphism to power our routes. Using extendable, dynamic APIs give us a huge amount of flexibility in spinning up new HTTP routes within the /apexrest/ path, letting us write code that external teams can stress-test and experiment with faster.| www.jamessimone.net
Dependency injection is a crucial method for correctly initializing & testing objects, and the Factory pattern can help to standardize how your SFDC Apex objects are produced| www.jamessimone.net