4 ms·
Do you want to provide an application that anyone can run and easily deploy on their own server with as little configuration as possible? Oh. I hate PHP as mu
by calinet6 14y ago
Do you want to provide an application that anyone can run and easily deploy on their own server with as little configuration as possible?
Oh.
I hate PHP as much as anyone (of course), but that's what it does.
- __alexs 14y agoSo Java then?
- calinet6 14y agoI've never seen a web host include java, and no shared host has enough resources to support the JVM in the first place. It's a similar problem as Ruby and Python, believe it or not.
- LiveTheDream 14y agoHeroku will host JVM-based webapps for you. They have Scala and Clojure support.
- bluesnowmonkey 14y agoActually, the GP was talking about running on your own server. Ruby, Python, Java, PHP, they're all close enough in terms of setup time that it need not factor into the decision. Or you can run any of them on dotCloud, EC2, Rackspace, lots of places. Deployability just isn't a differentiator nowadays.
- calinet6 14y agoNo, it isn't—but if you knew how to deploy any of that, you probably wouldn't consider PHP. 90% of people just run a web site on a hosting server. Granted it's getting less and less common with the advent of the centralized service-based web, but still, that's the source of success.
- __alexs 14y agoIs PHP really more memory efficient than the competition? I know it scores better on the computer benchmark game but the non-existent concurrency support and general leakyness of most the extensions (unless they've fixed that these days?) seems like the difference could actually be a lot narrower in practice.
- calinet6 14y agoNo, that part still might be bad. The advantage it has is that you can run a ton of hosted sites on one mod_php apache server. With Rails, for example, you have to run an environment. Same with many Python apps, or Java, etc. So it has the memory advantage of being able to run multiple sites on one environment. Not that big a deal if you're doing any serious deployment, but a big deal for its ubiquitous nature.
- bmj 14y agoI wonder if the better course of action would be to lobby the major hosting providers to include Ruby and/or Python with their base plans. Really, isn't that one thing that keeps PHP chugging along? In the consulting work I've done, my clients already have hosting plans for their website, so if I'm adding a sub-app, or even a new app, trying to convince them (and their IT staff) to manage multiple hosts/plans/etc is off the table.
- tlack 14y agoI think the problem is that the virtual hosting model doesn't work well for platforms where every site is a running app instance. Who starts the processes? How do you restart them when the code changes (some platforms don't do this)? Who assigns port numbers? etc etc etc.. With PHP, whose execution model was kind of built with this in mind, this works out of the box very easily.
- lucian1900 14y agoIt's pretty easy to do so with Python, at least. I don't know about Ruby. The only advantage PHP has in terms of deployment is that there are more cheap, crappy shared hosts that support it.
- xyzzyb 14y agoThat's the thing right? With PHP you need a server or you can't do anything. With Django, Sinatra, Rails, Flask, (Node?, Meteor?) you have all that for development as part of the application. To deploy you just push to a free heroku instance and you are fine until you get big. Much, much easier than setting up your own Apache+PHP. And much, much cheaper than buying hosting.
- hyuuu 14y agophp ships with server. Though frankly everyone would use XAMPP or WAMP or MAMP, for their development to mimic the production environment closer. It costs 3 bucks for host gator, hmm maybe 4, but heroku is very opinionated on how you should structure your project.
- Isofarro 14y agoSo many people point to Heroku as the comparator to the wide availability of PHP. Unfortunately Heroku is down right now. The wide-availability of choice, it's ubiquity, is why many PHP sites are still running right now - they are not reliant on a single point of failure. There are many thousands of hosts, spread across the world, offering Cpanel accounts so I'm not tied down to the meteorological events in North Virginia. If an act of God happens in Michigan right now, I can switch my site very quickly from there to a freshly minted Cpanel accout in California (thanks regular Cpanel backups!), or London or Manchester (Possibly not Newcastle right now, though). I'm really spoilt for choice here. What are the alternatives to Heroku that don't have the same failing that are running right now that are comparable in getting an app up and running equivalent to PHP time?