scriptlog:architecture:overview
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scriptlog:architecture:overview [2026/09/28 01:41] – admin admin | scriptlog:architecture:overview [2026/09/28 02:01] (current) – admin admin | ||
|---|---|---|---|
| Line 47: | Line 47: | ||
| The order matters, because each step depends on the previous one having | The order matters, because each step depends on the previous one having | ||
| finished. Read it as a strict pipeline, top to bottom — the diagram first, | finished. Read it as a strict pipeline, top to bottom — the diagram first, | ||
| - | then the nine numbered steps underneath it (DokuWiki | + | then the nine numbered steps underneath it (this wiki has no numbered-list |
| syntax, so the steps carry explicit numbers): | syntax, so the steps carry explicit numbers): | ||
| Line 72: | Line 72: | ||
| ===== 3. Wiring ===== | ===== 3. Wiring ===== | ||
| - | `Bootstrap` is a static factory made of many small private methods. | + | `Bootstrap` is a static factory made of many small private methods. |
| - | its own methods is the service graph: | + | |
| - | * `loadConfiguration()`, `initializeServices()`, `createDatabaseConnection()` | + | ^ Order ^ Methods ^ |
| - | | + | | 1 | `createDatabaseConnection()`, `defineRoutingRules()`, `initializeRegistry()` | |
| - | | + | | 2 | `createBaseDaos()`, `createSession()`, `createAuthenticator()` | |
| - | | + | | 3 | `createThemeRenderer()`, `createDownloadChain()`, `createContentDaos()` | |
| - | | + | | 4 | `storeInRegistry()`, `createFrontService()`, `createDispatcher()` | |
| - | | + | | 5 | `buildServiceMap()`, `buildHandlerRegistry()`, `buildAdminActionRegistry()` | |
| + | | 6 | `initializeI18n()` | ||
| - | Everything | + | **Ordering constraint: |
| - | and the service map is bound into a service locator. Controllers reach their | + | |
| - | collaborators through that locator rather than through constructors, which is | + | The graph is composed with plain `new` calls, so each object' |
| - | why the dependency graph is hard to read from the controller class alone. | + | |
| ===== 4. Request lifecycle ===== | ===== 4. Request lifecycle ===== | ||
| - | Once `Dispatcher:: | + | Once `Dispatcher:: |
| - | configuration value, | + | |
| - | * `' | + | ^ `rewrite_status` ^ Handler ^ Behavior ^ |
| - | | + | | `' |
| + | | anything else | `handleQueryStringUrl()` | ||
| - | The `? | + | The `? |
| download keeps working regardless of the permalink setting. | download keeps working regardless of the permalink setting. | ||
| - | A matched route is then validated by a `validate*()` method | + | Every matched route then flows through one pipeline: |
| - | (`validateContentExists`, | + | |
| - | `validateCategory`, | + | < |
| - | handler is looked up, and the response is produced by `invokeTheme()`. | + | route match --> validate*() --> handler lookup |
| - | `renderTheme()` serves a full page; `renderHtmxFragment()` serves a partial for | + | --> invokeTheme() --> renderTheme() | renderHtmxFragment() |
| - | HTMX requests. Frontend routes are compiled once into `$frontendCompiled`. | + | </ |
| + | |||
| + | Validation is one `validate*()` method | ||
| ===== 5. The route table ===== | ===== 5. The route table ===== | ||
scriptlog/architecture/overview.1790559682.txt.gz · Last modified: by admin
