Designing a Core PHP MVC Platform That Still Feels Modern
A practical field note on building a fast, readable, framework-free publishing system with PDO, reusable views, and an article experience tuned for engineers.
The principle
Core PHP does not have to mean tangled scripts. The architecture works when routing, controllers, models, and views each have one job and the database layer stays boring in the best possible way.
The goal is not to recreate a framework. The goal is to keep the system understandable enough that one developer can hold it in their head.
Request lifecycle
A request enters through the public front controller, passes through a small router, reaches a controller, reads from a PDO-backed model, and returns a reusable view.
$router->get('/articles/{slug}', [ArticleController::class, 'show']);Why PDO only
Prepared statements are explicit, portable, and easy to audit. That matters more than cleverness in a publishing platform.
Keep query methods close to the model that owns the concept. It makes security review and performance tuning much easier.
Publishing ergonomics
| Feature | Reason |
|---|---|
| Automatic slugs | Cleaner URLs and fewer manual mistakes. |
| Reading time | Sets expectations before a long technical read. |
| Sticky table of contents | Turns long articles into navigable documentation. |
Never trust admin input just because the user is authenticated. Keep CSRF protection, prepared statements, upload checks, and escaping in place.