4 ms·
Just though of another one! This worked surprisingly well and was really annoying at the same time. The huge application consisted of a single PHP file. If you
by andrelaszlo 3y ago
Just though of another one! This worked surprisingly well and was really annoying at the same time.
The huge application consisted of a single PHP file. If you guessed that it was tens of thousands of lines long, you'd be wrong. It was only a few hundred lines, if not less!
The trick was storing code in the freaking database. The mother of all index.php's would simply query for the correct piece of code based on query parameters and eval it! They had an editor where you could make live code changes to the page, and even some rudimentary version control. Amazing times!
- kazinator 3y agoTo be fair, once upon a time, it was actually thought of as a good idea to use databases for implementing version control.
- isoprophlex 3y agoI'm experiencing moderate discomfort just reading this
- EvanKnowles 3y agoI think a lot of devs go through a "I'll just store code in the DB and evaluate at runtime!" phase. Some of them never get through it though.
- j-pb 3y agoThe pros use JDSL and checkout their code live from Subversion.
- giva 3y agoBefore the web, the typical "client/server" application was a Windows program with a GUI that invokes queries and stored procedures directly on the database and shows the results. If someone is tasked to port a similar application to the web, writing a PHP application that does the same is not a bad idea.