
- English
- ePUB (mobile friendly)
- Available on iOS & Android
About this book
Many developers excel at building solutions in Apex but lack formal training in the core principles of professional software engineering. This book changes that and provides a no-nonsense guide for experienced Salesforce developers ready to master the art of software design.
Pragmatic, approachable, and to the point, this book focuses on essential practices like modularity, coupling, cohesion, and testing—not just to write better code, but to improve how teams deliver software. By emphasizing object-oriented programming, dependency injection, and boundaries, it equips you to design systems that are easier to maintain, test, and scale. With fast, reliable tests as a cornerstone, you’ll learn how great design enables true continuous integration and high-performance software delivery.
Through actionable examples and clear explanations, you’ll learn how to design better systems, reduce complexity, and create codebases that stand the test of time. If you’re serious about your craft, Clean Apex Code will give you the tools and mindset to think like a professional software engineer and deliver software at a higher level.
What You Will Learn
- Use better names in all software constructs to improve readability and maintainability
- Apply core software design principles to Apex development
- Embrace modularity, abstraction, and boundaries to simplify complex systems
- Leverage dependency injection, and mocking to write fast, modular tests
- Practice real continuous integration with reliable, high-speed testing
Who This Book Is For
Experienced Salesforce developers and professional software engineers
Tools to learn more effectively

Saving Books

Keyword Search

Annotating Text

Listen to it instead
Information
Table of contents
- Cover
- Front Matter
- 1. Refactoring Apex Code: First Steps
- 2. Naming: Simple Techniques for Better Software Design
- 3. Doing One Thing: Abstraction, Boolean Parameters, and Design Patterns
- 4. How Long Should Methods Be: Length, Depth, and Subtasks
- 5. Comments Donât Lie, Developers Do
- 6. Null, Validations, and Guard Clauses
- 7. Cascading Failures in Trigger Boundaries
- 8. Object-Oriented Programming in Apex
- 9. Software Design Principles
- 10. Modularity, Coupling, and Cohesion
- 11. Dependency Injection and Boundaries
- 12. Unit Tests, Stubs, and Mocking the Salesforce Database
- 13. The Apex Well-Architected Framework
- Back Matter
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app