Photo by Kenny Eliason on Unsplash
I wrote my first real Apex class this month to support a Flow that needed more logic than the Flow Builder could handle.
Instead of overcomplicating things, I kept it simple:
One method
One purpose
Strong naming and comments
Here’s what helped:
Creating a Util class for reusable logic
Using @AuraEnabled methods so I can reuse the logic in LWC later
Testing in sandbox using simple test methods before thinking about edge cases
This wasn’t about trying to be clever—it was about creating maintainable code I could explain to someone else. And that mindset shift made all the difference.