The Build the panel is a single as one system, not a panel and an engine
- Comparing
- v1 to v2
- Current
- Read the document
Context
The panel was first built as two systems: a panel, holding . A panel held the frontend, and an engine engine behind it holding everything
it
held everything else. Each had lived in its own repository, and the panel was installed as an application that depended on on
the engine as a
a library.
The panel ships as a single binary, so both whatever repositories it is built from all have to end up inside itthat one file.
Modules extend the panel, and a . A module that provides adds something to the frontend functionality has to reach into both halvesboth
halves when the frontend and the engine are separate systems.
Decision
The I will build the panel is as one system. There is : no separate frontend panel sitting over a backend engine, and no separate engine
repository: one no
engine repository holds of its own. One repository will hold the engine, the modules built on it, the the
entry point and the build that produces
produces the binary. The , and the frontend is will be part of that system, rendered on the
server-rendered, rather than a client application talking to it.
Alternatives
A panel and an engine as separate systems, each in its own repository, with the panel installed as an
application depending an application
that depends on the engine engine as a library. Both I rejected this because both repositories still would still
have to be part of end up in one binary, and because a module
providing module that adds to the frontend functionality becomes much more more
complex when the frontend is a system of its own.
Consequences
Easier:
- A module will extend one system, including
anythingwhatever itcontributesadds to the frontend. - The build will take one repository and produce the binary from it.
Harder:
The repositoryEverything willhold everythinglive in one repository, so the boundary between theengineengine and thefeaturesfeatures built on it will beaa matter of layering rather than of separate repositories.
Constrained:
- The frontend will be rendered on the server
-rendered, and the panel will not be a client application talking to an API. That removesthe need forcross-origin handling, token refresh, API versioning for a first-party consumer,validationvalidation written twice,, and a second toolchain in the binary. It costs a view layer and session handling. - Nothing will be published for others to install as a library, so the Composer package
iswill be a project rather than a library.
Sources
- The archived repositories
panel_poc, created , andengine_poc, created : the two systems, both last pushed to on . - The
panelrepository, created : the single systemreplacingthat replaced them, and the first record ofthethe decision,, which is bothcreatedanddecided. The decision was taken before that, on a date not recalled. - The reasons, that both repositories would have to be part of one binary and that a module
providingadding to the frontendfunctionalitybecomes much more complex across two systems: first written down on . - Commit 0d62ceb, "Correct README badges and repository framing", : the README dropping the framing
that described theof the engine as a separately installed library, and recording the server-rendered frontend.Its wording thatThat everything lives inoneone repository, and what the frontend is, are taken from what followed ratherthanthan anticipated. - Issue #62, Engine - HTTP, : the SPA recorded as scrapped, and what a server-rendered frontend
removes andremoves and costs, taken from what followed rather than anticipated. - PR #75, chore: Rename package, add licence and patch Composer CVE, merged and squashed as 3372f20
: the: the Composer package renamed fromthegamepanel/enginetothegamepanel/paneland retyped from a library toaa project, described there, which the commit describes as left over from the abandoned split, and the Packagist badge removed becauseneither nameneither name is published and the panel ships as a binary.
Source adr/0001-single-system.md · commit 9444a99 · published