5 ms·
"Jeff Atwood has stated publicly that one of his ulterior motives with the Discourse project is get people to stop using PHP and start using Ruby." This just w
by mgkimsal 13y ago
"Jeff Atwood has stated publicly that one of his ulterior motives with the Discourse project is get people to stop using PHP and start using Ruby."
This just won't ever happen. The people that wanted to drop PHP for something else (Ruby, etc) largely did so years ago. The hosting/running situation for PHP is just too basic and easy for people to get in to vs having to 'run a server' (Rails, etc).
PHP is still the only language that assumes HTML output by default. Put a file on a web server, hit it via a URL, and get HTML output. It's that simple. You can start at 'simple' then graduate up to complex stuff like Symfony if/when you want to. Every other language or platform forces a lot of extraneous concepts on you on day one, which is always going to be a turn-off for a not-insignificant portion of the people coming in to the field.
- wyclif 13y agoRelevant reference wrt this thread: http://www.phptherightway.com/ http://www.phptherightway.com/
- DangerousPie 13y agoExactly. I am still using PHP for pretty much all of my projects despite all of its shortcomings. The reason for this is just how easy it is to write simple scripts and deploy them. For most small hobby projects it is just not worth spending hours setting up the development environment required to create a Ruby/Flask/... project when you can achieve the same thing with a single PHP file. And when it comes to deploy it, virtually every single managed web hoster out there supports PHP, so you just upload the file and it works. I did play around a bit with Flask a while ago and it does feel a lot cleaner and more efficient. But once you actually try to deploy your app you realize that hardly any web hoster actually supports the required Apache extensions and suddenly you end up having to set up your own server and fiddle with config files to get it to work.
- orf 13y agoAfter you do it once you realize its not that hard to deploy. Nginx -> Gunicorn -> your app
- FooBarWidget 13y agoIt is even easier if you use Phusion Passenger, either in combination with Nginx or with Apache. It is almost as easy as PHP. Put your Ruby app somewhere, set your document root to it, done. Nowadays, Phusion Passenger even supports Django and Node.js.
- randallsquared 13y agoWhat faint praise this is. "Not that hard". :)
- mikepurvis 13y agoI've deployed a number of small PHP-based websites in a similar way for similar reasons over the years. However, I think the next "simple" project like that that I need to do will be statically rendered from frozen-flask and hosted on S3, with any small interactivity provided on the client, with JavaScript.
- jonahx 13y agoI opened the comments section to make a similar post. From the OP: > The days when programmers opened up a blank file, named it index.php, and said, "time to start coding!" are over. That is actually the only thing better about php than... well, pretty much any other option. As for the rest of it... "lipstick on a pig"
- Joeboy 13y ago> PHP is still the only language that assumes HTML output by default. For me, that's not a feature, it's an oddity that I have to work around. I guess it's a feature if you're using PHP as the HTML template language it was designed to be, but I suspect that's a minority use case these days.
- nodata 13y agoBut that's what it was designed for..
- 616c 13y ago> For me, that's not a feature, it's an oddity that I have to work around. Well, I would venture a guess that you should have looked up the language's name and its meaning, then the entire focus of PHP might not come as much of a surprise.
- rbanffy 13y ago"Personal Home Page"?
- gnerd 13y ago> Zeev Suraski and Andi Gutmans rewrote the parser in 1997 and formed the base of PHP 3, changing the language's name to the recursive acronym PHP: Hypertext Preprocessor. http://en.wikipedia.org/wiki/Php#History http://en.wikipedia.org/wiki/Php#History
- 616c 13y agoYes, to get back to my point, it is basically a templating language for HTML, hence the hypertext. I think the name made it clear being ambitious with it outside of HTML was going to be difficult, unless you like the challenge of making cars into airplanes, and submarines in to hang-gliders.
- tudborg 13y agoHow is the default header of `Content-Type: text/html` Any different form a default header of `Content-Type: text/plain`? It takes you about 3-4 seconds to change it for your entire project.
- colinbartlett 13y agoI prefer rails specifically because the "hosting/running situation" for Rails is so FAR superior to that of PHP. $ git push heroku master ...done.
- albertojgomez 13y agoyou know you can do the same with php, right? $ git push fortrabbit master ...done
- tomjen3 13y agoNot really. That only works with one host, whereas PHP works with just about any 5 dollar/month host in the world.
- jonahx 13y agoI don't really want to stand up for php, but this just isn't true. "git push heroku master" comes at a steep price. PHP hosting is, in general, ubiquitous, cheap, and incredibly easy. You can get comparable pricing for ruby hosting, but you'll be doing some server setup yourself.
- pcunite 13y agoI use PHP because it is absolutely everywhere. If you're supporting shared hosting environments ... it is the JavaScript of the backend.
- pcunite 13y ago"his ulterior motives with the Discourse project is get people to stop using PHP" Their is money in syntax now.
- etler 13y agoI think node can beat out php in regards of ease of hosting. I've simply never worked with a version or package manager that works as well as nvm and npm. Trying to do the same thing with Ruby or Python is like pulling teeth. Even compared to PHP it's a breeze. I know it isn't on all hosting solutions like PHP, but Heroku and Nodejitsu are free for small or open source projects respectively. But you're right, PHP assuming HTML output by default is a huge boon. With node you have to set up your own server and routes, and more... That's a lot more work than installing WAMP, running it, and putting your php files in the right folder.