Home » Productivity

Productivity

Eliminating Duplicate Salesforce Code via Reuse

One of the primary sources of software defects is duplication, sometimes referred to as Copy and Paste programming. When code or design is copied into multiple places, it’s only a matter of time before one instance of the code will be modified and the others missed – resulting in defects. Even if a developer does remember to update all instances of the duplicated logic, and manages to do so without typos or other errors, multiple changes take time and effort. An important software development principle is, Don’t Repeat Yourself. This article discusses a simple way to avoid duplication in your Apex code by using “Base” classes.