3 ms·
I think there's something people miss when looking at PHP as a system - the fact that it's a collection of hot swappable logic modules (pages) PHP pages themse
by trixie_ 6y ago
I think there's something people miss when looking at PHP as a system - the fact that it's a collection of hot swappable logic modules (pages)
PHP pages themselves can download packages of additional PHP pages and extend functionality as the website runs. For example the user can install a message board from the UI in WordPress, and PHP files themselves will download additional PHP files needed for a message board, and boom your site now has a message board - no recompile, install, or deploy. Your running system has extended itself in real-time with additional functionality.
Maybe I'm crazy, but I think there is something special about this that our typical compile/deployed applications aren't designed for.
Before the web, applications tended to carry their state in memory, but with the web we stored state in the database. Our logic really only needs to take the request from the user and either pull or modify data from the database and return. A lot of web apps today feel hollow as we rarely store state in them, we just pull, manipulate, and render database data. What if each major code path was its own binary? That's kind of like what PHP is.
With PHP the application is almost living as it is never really turned off/on, just modified over time. If there's a bug in one page, I just need to fix that one page. And a single page is lightning fast to deploy to my servers. The rest of the system keeps humming.
Now the language itself might not be the best, but do you see how this system is fundamentally different from single binary web applications?