Skip to the content
Documentation

Extension development: the book (start here)

A complete book on growing from user to builder, extension developer and theme developer with Exponential: finding ideas, building extensions with and without RAD tools, upgrading, forking ethically, releasing.

Contents

  1. Extension development: the book (start here)
    A complete book on growing from user to builder, extension developer and theme developer with Exponential: finding ideas, building extensions with and without RAD tools, upgrading, forking ethically, releasing.
  2. Reading paths through the book
    Reading orders through the book for each role - curious user, builder, PHP developer, designer, application creator, upgrader, maintainer - with what you can do after each stage.
  3. Part 1: From user to developer
    The first part of the extension development book.
    1. Part 1: From user to developer
      The first part of the extension development book.
    2. What an extension is
      A folder under extension/ that adds settings, templates, modules, datatypes, workflow events and more without touching the kernel, and does nothing until switched on.
    3. The ladder: user, builder, extension developer, theme developer
      Four steps from using Exponential to extending it - user, builder, extension developer, theme developer - what each one does, what each needs to know, and which part of this book teaches it.
    4. The tools you need
      The short list of tools for extension development with Exponential - a terminal, PHP 8, Composer 2, Git, a text editor, a browser with developer tools, xmllint and PHPUnit - with the command that checks each one.
    5. Setting up a development installation
      A development installation in a few commands: Git clones, Composer, exp:install on SQLite, Velocity, debug settings, and the rules that keep it apart from live.
    6. Your first hour as a developer
      A guided hour: see who sets a setting, change and undo it, find the template behind a page, read the debug output and a log, and run PHP with the kernel loaded.
    7. Reading the code you already have
      A map of an installation and four reading techniques: grep for a name, follow an address to its view, a page to its template, and ask Git why a line is there.
    8. Finding the extensions installed on your site
      Setup > Extensions, Info > About and the command line: what is installed, and which extension is behind a page, a template, a setting or an operator.
    9. The se7enxweb extension catalogue
      The 65 extensions the kernel's composer.json requires, grouped by purpose, with repository, license and documentation: the first place to look for ideas and examples.
    10. Finding ideas on GitHub
      Search GitHub for extensions and working code: the se7enxweb organization, code search for kernel class names, history and issues, and whether a project is alive.
    11. Finding ideas on Packagist
      Packagist lists every package of the extension type: how to find them, read versions, requirements and licenses, and install one on a development installation.
    12. Share Exponential (share.exponential.earth)
      The community portal: forums for extensions and developers, tutorials, books, code standards, blogs and chat channels, and how to cite what you use there.
    13. Exponential Projects (projects.exponential.earth)
      Exponential Projects, the forge that replaced projects.ez.no: thousands of projects by type, how to read an entry, and how to reuse what you find without breaking copyright.
    14. eZpedia (ezpedia.exponential.earth)
      eZpedia, the free community encyclopedia under the GNU FDL: the articles that matter to extension developers, how old they are, and how to reuse them with credit.
    15. Learning from the free books
      Three books about the code base, kept on GitHub by se7enxweb, two under the GNU FDL: what each covers, how to read them against Exponential 6, and how to reuse them.
    16. Reading licenses before you reuse anything
      The licenses you meet around Exponential, in plain words: GPL 2 or later, GPL 3, MIT, GNU FDL, all rights reserved and no license, and where to find them.
    17. Linking versus copying: citing sources fairly
      When to link to a source, when to quote it, when you may copy and adapt it, and how to give credit in code comments, READMEs, documentation and commit messages - with the patterns this project uses.
    18. Evaluating an old extension before you use it
      A checklist with commands to judge an extension you did not write: license, PHP 8 syntax, removed functions, access checks, escaping, SQL, inline scripts and database changes.
    19. Learning from an extension, step by step
      Two real extensions taken apart file by file: str_replace, one operator in its 2005 shape with a PHP 8 bug and its one-line fix, and owsimpleoperator.
    20. Debug output and logs for developers
      See what the system does while it builds a page: the Exp Debug bar and its settings, used templates, path comments, the log files under var/log, and your own debug lines and logs from PHP.
    21. Asking the community for help
      Where to ask a development question (forums, chat, issue trackers, the extension's own repository), how to write a question people can answer, what never to post, and how to report a security problem privately.
  4. Part 2: The builder: settings, templates and overrides
    The second part of the book.
  5. Part 3: The extension developer
    Part 3 of the book: the anatomy of an extension, one mechanism per chapter, from metadata and settings to modules, operators, datatypes, events, security and tests, followed by step-by-step tutorials.
    1. Tutorials: build real extensions step by step
      Step-by-step tutorials that build real small extensions, first with the RAD wizards of Setup > RAD, then by hand, ending with a complete extension from idea to release.
  6. Part 4: Upgrading an old extension to Exponential 6
    Part 4 of the book: bring an old extension up to Exponential 6, from the inventory and PHP 8 fixes to CSP, jQuery 4, admin4 styling, metadata and tests, with real before and after examples.
  7. Part 5: Extending, forking ethically and contributing back
    Part 5 of the book: build on other people's extensions fairly - extend without forking, fork when you must, keep credit and licenses right, and give your work back with pull requests, issues and reviews.
    1. Writing good issues
      Report a bug or ask for a feature in a way a maintainer can act on - versions, steps to reproduce, expected and actual result, logs without secrets - with a template and what to leave out.
    2. Growing the community through code
      How code itself grows a community - publishing what you built, good first issues, documentation and translations, help pages inside your extension, and the community sites where people look for extensions.
  8. Part 6: Theme developers
    Part 6 of the book: themes are extensions.
  9. Part 7: Releasing your extension
    Part 7 of the book: release an extension so others can rely on it - version numbers, permanent tags, metadata bumps, Composer and Packagist, changelogs, GitHub releases, packages, tests, and a checklist.
  10. Part 8: Reference of built-in features for extension authors
    Part 8 of the book: a reference of the kernel classes, template features, settings, commands and directories extension authors use most, with signatures taken from the source and links to the full documentation.
    1. Glossary for extension developers
      The words this book uses, in one alphabetical list - from access word, append file and attribute to view mode, view parameter and workflow - each with a short definition and the chapter that explains it.