2 ms·
> Each PHP file is an endpoint. As opposed to having routers in code or client side SPA routing. I mean that's just how CGI works, most every HTTP server still
by masklinn 8y ago
> Each PHP file is an endpoint. As opposed to having routers in code or client side SPA routing.
I mean that's just how CGI works, most every HTTP server still supports CGI, nothing stops you from deploying that way. Unless you're using Java or the like of course, then it's not very convenient.
- YawningAngel 8y agoYou can absolutely do this in Java if you want to. I mean, it's insane and you shouldn't, but it's eminently possible.
- masklinn 8y agoI'm not saying it's not possible I'm saying it really isn't convenient.
- YawningAngel 8y agoBut the reason why it isn't convenient is because the consensus amongst Java programmers is that it's a bad idea. It wouldn't be difficult to build tooling around if one wished to - I think in this case, the fact that almost every language has migrated away from CGI-style routing is probably telling.
- masklinn 8y ago> But the reason why it isn't convenient is because the consensus amongst Java programmers is that it's a bad idea. It wouldn't be difficult to build tooling around if one wished to That's part of the inconvenience though, one of the advantages of CGI was the low tooling requirements. > I think in this case, the fact that almost every language has migrated away from CGI-style routing is probably telling. I mean sure, but beyond not being a very good protocol CGI needs to execute the handler script on every connection, Java is not known for that being cheap.