menu_book Navigation menu

The Clean Monolith

Rethinking CMS Architecture

For the last decade, CMS and framework ecosystems have been plagued by "abstraction bloat". Platforms like WordPress rely on a sprawling, unpredictable Event Hook system (Spaghetti architecture) that triggers hundreds of functions per page load. Modern MVC frameworks often enforce deep layers of Object-Relational Mapping (ORM), translating simple database calls into massive memory footprints and N+1 query problems.

Pragma CMS is built differently. We adhere to a Clean Monolith and Data-Oriented Design (DOD) philosophy.

Zero-Overhead Philosophy

We treat PHP for what it originally is: a highly efficient template processor and request handler.

  • No Heavy ORM: Pragma CMS does not use Doctrine or Eloquent. ORMs hydrate thousands of unused objects into memory. Instead, we use highly optimized Static Managers (EntryManager, PageManager) that return clean, raw associative arrays.
  • Native PDO: Every database interaction is a direct, natively prepared SQL statement wrapped in our secure Database::class. You always know exactly what query is being executed.
  • Stateless Operations: Our Managers are entirely static and stateless. There is no dependency injection container slowing down the bootstrap phase. The application state is cleanly contained within global Context Objects ($page, $site).

Single-Pass Rendering

When a request hits Pragma CMS, it is processed in a single, top-to-bottom pass.

  1. The request is routed via an O(1) array lookup.
  2. The controller fetches exactly the data it needs using direct SQL joins.
  3. The template is rendered. There are no complex middleware chains, no post-render DOM parsing, and no hidden event listeners modifying the output after the fact. This guarantees sub-10ms response times on standard hardware.