Async Everywhere
Move heavy work to Queueable, Batchable, or Platform Events. Synchronous Apex should finish in milliseconds. Long synchronous operations risk governor limits and user-experience lag.
Structured Errors
Custom exception classes per domain. Error logging to custom object for monitoring. Graceful user messages that don’t leak implementation. Old ‘throw new DmlException’ scattered throughout needs refactoring.
Testability
Dependency injection via Apex interfaces. Mock HTTP callouts consistently. Stub patterns for database operations in unit tests. Fast test suites enable confident deploys.
Observability
Custom log tables, platform events for monitoring, Event Monitoring for production traces. Legacy Apex often has zero observability — modernize this first when debugging issues.