English version
A reliable APEX application needs more than a working form. Three design decisions make everyday failures easier to handle.
Preserve unfinished work deliberately
Automatic Row Processing saves submitted data; it does not continuously save everything typed into a browser. For long forms, consider an authenticated server-side draft with clear ownership and retention. Warn about unsaved changes. Browser storage needs an explicit privacy decision, especially on shared devices.
Organize the application as it grows
Give repeated business rules a reusable home in focused packages. Use Shared Components for common definitions and agree on naming conventions. Document dependencies before removing anything.
Make failures traceable
Record a useful correlation identifier, operation, time, and safe diagnostic context. Restrict access to logs and define retention. A user-facing message should explain the next action; detailed diagnostics belong in an access-controlled channel.
These measures reduce avoidable loss and confusion. Their value depends on testing realistic failure cases, including expired sessions, interrupted requests, and attempts to repeat an operation.
