4 ms·
Things I like PHP for would be single file simple scripts which are part of otherwise essentially static sites. For instance, a static blog (with Jekyll/Pelica
by deckiedan 13y ago
Things I like PHP for would be single file simple scripts which are part of otherwise essentially static sites. For instance, a static blog (with Jekyll/Pelican/whatever) but a single .php file which is for searches (in a sqlite FTS cache of the blog, say) or 'related posts' or whatever. Then you can upload it into an apache "standard" web host, and add that tiny bit of server-side stuff that otherwise would be a pain.
- Supermighty 13y agoFor a lot of developers that single file explodes into a large multi-file monstrosity as features are added and deadlines are put ahead of refactoring.
- marklit 13y agoHave a look at Sinatra and Tornado. Single-file projects are possible as well and it'll lead you down a road to quick deliveries and better tooling.
- deckiedan 13y agoYeah. Pretty much all new projects I do are python (flask, actually), but I still can see a place for very simple PHP scripts - which I think was it's initial intention, and which it can still do. The same for sh/bash. It's great for very simple automation/scripts, but after certain level, it's much much easier to use a language which helps you write maintainable code and doesn't actively try to stop you.
- gnaffle 13y agoIt's not that they're not possible, but if you want an "upload and forget" way of deployment, you have thousands of hosting providers with a LAMP stack, but only a handful of Python/Ruby providers like Heroku (or you have the choice of using a VPS, which again means having to manage it).