PHP.GT

Distinct Logic Authority

Each operational state of an application should have one clear entry point. In web applications, the URL is the natural place for that to begin.

That idea becomes much easier to follow in hypermedia applications, where HTML over HTTP is still the main model and each page state is represented by an actual requestable location.

Traceability

Distinct logic authority improves traceability because it is immediately obvious where the request begins. If a button does not work, we can usually:

  1. identify the page URL
  2. find the page logic
  3. find the matching action or go handler
  4. inspect redirects or response headers if the flow changes

That avoids duplicated behaviour being spread across several hidden entry points.

Relationship to WebEngine

WebEngine reinforces this idea through file-based routing and thin page logic. A URL maps to a clear page file, and actions map to clear do_* functions.

The framework also leaves useful traces in response headers during development, such as where redirects came from and which logic hooks executed, which makes the request path easier to inspect.


Next, read SPA vs MPA.