What this book covers
Chapter 1, Common Apex Mistakes, starts the book by reviewing some common mistakes developers make when working with Apex and addresses the root cause of the infamous Attempt to de-reference a null object error and what it actually means.
Chapter 2, Debugging Apex, covers the different ways in which you can debug your Apex to understand what is actually happening when there is an error. Correctly developing this skill can save hours of lost time when working through an issue.
Chapter 3, Triggers and Managing Trigger Execution, details the save order of execution for triggers in detail and how we, as developers, need to architect our triggers to handle bulkified data in a consistent manner.
Chapter 4, Exceptions and Exception Handling, is focused on the correct handling and management of exceptions within our code, an often overlooked aspect of development.
Chapter 5, Testing Apex Code, provides a detailed discussion of Apex testing, its key role in helping prevent and debug errors, and how to improve your experience in developing tests to make it quicker and easier.
Chapter 6, Secure Apex Programming, reviews the different ways of avoiding security flaws within our code to avoid vulnerabilities.
Chapter 7, Utilizing Future Methods, covers use cases, as well as how to use and test future methods within our applications.
Chapter 8, Working with Batch Apex, details use cases and the structure and monitoring of Batch Apex to work with large volumes of data asynchronously.
Chapter 9, Working with Queueable Apex, builds on the previous chapter to discuss the differences between Batch and Queueable Apex, the appropriate use cases for each, and how to work with Queueable Apex successfully.
Chapter 10, Scheduling Apex Jobs, discusses the use of Scheduled Apex within a system and the different ways in which we can schedule Apex for specific use cases.
Chapter 11, Integrating with Salesforce, talks about how and why integrating with Salesforce as a platform is important, the different ways in which you can integrate with the platform, and the pros and cons of tool-based versus custom integrations.
Chapter 12, Using Platform Events, describes the Platform Events feature, the use of an event bus and event-driven architecture, as well as the different ways to publish and subscribe to platform events to help build decoupled and scalable applications.
Chapter 13, Apex and Flow, shows how to combine Apex and Flow to produce an internal API to create a decoupled system.
Chapter 14, Apex REST and Custom Web Services, provides a discussion of what the Apex REST framework is and how we can utilize it to build custom REST endpoints to allow integrations from external systems.
Chapter 15, Outbound Integrations – REST, talks about how to make outbound integrations in Apex for REST APIs, including the use of named credentials to manage the safe storage of security information. It also discusses how to parse JSON and XML data returned to the calling Apex functions.
Chapter 16, Outbound Integrations – SOAP, explores how to make outbound integrations in Apex for SOAP APIs.
Chapter 17, DataWeave in Apex, discusses using DataWeave functions in Apex to allow you to parse and manipulate data more easily.
Chapter 18, Performance and the Salesforce Governor Limits, covers the Salesforce governor limits at a high level and how we should think about performance management in regard to Salesforce and Apex.
Chapter 19, Performance Profiling, details how to profile the performance of applications on Salesforce and correctly analyze the results.
Chapter 20, Improving Apex Performance, goes through specific examples of how to improve the performance of your Apex code.
Chapter 21, Performance and Application Architectures, finishes the book with a discussion on the impact different architectures can have on application performance.