dbxapp Knowledge myX: Update-safe extensions

myX: Update-safe extensions

Local extension layer

myX: project-specific and update-safe development

myX is the right place for changes that belong only to one installation, customer or project. Improvements that apply to every installation remain in the dbxapp kernel or the responsible product module. This separation prevents product updates from overwriting local work.

Why is it update-safe? The package manager updates signed, managed product packages. The local package local/module/myX is unmanaged and sits outside those package inventories, so its classes, templates and assets survive an update. Update-safe does not mean maintenance-free: after changing versions, verify every extension point in a test installation.

Where should a change live?

ChangeDestinationReason
Applies to every installationdbxapp kernel or responsible product moduleTested, versioned and distributed as a product update.
Applies only to this website or customerdbx/modules/myXRemains local and is not overwritten by managed packages.
Menus, copy and editorial contentInstallation / CMSCustomer content is not a product release.
Reusable module business logicResponsible product moduleClear ownership, complete DDs and shared tests.

Practical example: a local notice without changing a product file

Only this installation needs a notice on its service-status page. The markup lives in dbx/modules/myX/tpl/htm/service-status-notice.htm. The local template class adds it after the regular dbxTPL processing:

class myTPL extends dbxTPL
{
    public function replaces(string $tpl, $replaces): string
    {
        $html = parent::replaces($tpl, $replaces);
        $page = trim((string)dbx()->get_system_var('dbx_permalink', ''), '/');
        if (basename($page) !== 'service-status') {
            return $html;
        }

        $notice = parent::get_tpl('myX|service-status-notice');
        return str_replace('</main>', $notice . '</main>', $html);
    }
}

Neither dbxTPL nor dbxContent is modified. The updater can replace both product packages while the local class and template remain in place. This reduces merge conflicts, makes ownership explicit and simplifies testing, rollback and audits.

Before: dbxapp 4.5.3 + myX

The product packages are unchanged. myX adds only the local notice and has a contract test for its template hook.

After: dbxapp 4.6 + myX

The updater replaces managed product files only. myX remains byte-identical; SelfTest, the hook contract, status page, Missing list, and error log are accepted again.

If the hook changed: The product update remains correctly installed. Adapt only the local myX extension to the newly documented contract in the test system, then release it separately.

Checks after an update

  1. Back up myX, local configuration and data first.
  2. Install kernel and module updates in a test installation.
  3. Run the myX contract tests, SelfTest and checks for the affected pages.
  4. Review the admin Missing list, system messages and files/dbxError.log.
  5. Only then install the same signed package set in production.