Live data from Hacker News

PHP needs to die. What will replace it?

seldo.com

41–50 of 160 posts

Re: PHP needs to die. What will replace it?

#41
post #16

Earlier quoted context omitted.

If installing Rails (or Flask, or whatever) isn't trivial compared to the difficulty of writing the actual code, then either your project is a toy, or your web host needs to get its act together.

Let's be clear, we're talking about popularity here. We're talking about the massive popularity of Wordpress and Joomla, of which no Rails project can match. We're talking about the fact that most websites on the web, by that standard, would be "toys". But that doesn't matter, because those toys are what power the web. Not everybody is Facebook, not everybody is looking to secure VC, not everybody is coding their own…

I was not talking about popularity, I was talking about mindshare, two very different things. If you're talking about popularity, Java, C and C++ are more popular than php, but I don't see you pointing them as viable solutions. tiobe.com

Re: PHP needs to die. What will replace it?

#43
post #20

The article states that php doesn't have lambdas and method chaining, although it does. They aren't well done, as per usual, but it definitely has them. Honestly, we may be best off doing a CoffeeScript style pre-processor for PHP. Because PHP isn't going anywhere, no mattter how much we may prefer other languages, PHP's popularity is one of pure pragmatism, something the language purists don't seem to understand. Ge…

>> Get me from 0 to "Hello, World" as fast as you can. That's how you build the next PHP. Well put.

[deleted]

Re: PHP needs to die. What will replace it?

#44

One word: deployment To me, the best thing about PHP is that it is so easy to deploy to pretty much any shared hosting on the planet, not to mention really easy to set up on your local machine (with WAMP/MAMP). I love Rails, but on many occasions have built projects in PHP (using a decent framework like Kohana) just because I was putting this on my client's shared hosting account and didn't want to deal with having t…

One of the interesting things about doing Passenger deployments for Rails is that it's very similar to doing PHP deploys, with the added benefit of the server not reloading any application code until you tell it to. For example: you can update the Rails code on the server, maybe run some data migrations or last-minute production tasks against the new codebase, and THEN tell Passenger to reload the application code. O…

Don't get me wrong -- passenger is great. But it's not set up by default (or even possible to set up often) on most shared hosts. Heroku is cool, but as a freelance developer I've found that it's best for me to not take any responsibility whatsoever for the hosting side of things -- just leads to the most un-fun kind of responsibility down the road.

Also, we're mostly programmers here, but there are a vast number of websites created by designers who have very limited understanding of programming and hosting setups, and all they know is shared hosting, copying files via ftp, and setting up wordpress (and maybe creating a database in phpMyAdmin).

Speaking of wordpress, that reminds me of the #2 reason for PHP's continued popularity despite its arguable sucktitude: applications! See http://www.codinghorror.com/blog/2008/05/php-sucks-but-it-do...

Re: PHP needs to die. What will replace it?

#45
post #41

Earlier quoted context omitted.

Let's be clear, we're talking about popularity here. We're talking about the massive popularity of Wordpress and Joomla, of which no Rails project can match. We're talking about the fact that most websites on the web, by that standard, would be "toys". But that doesn't matter, because those toys are what power the web. Not everybody is Facebook, not everybody is looking to secure VC, not everybody is coding their own…

I was not talking about popularity, I was talking about mindshare, two very different things. If you're talking about popularity, Java, C and C++ are more popular than php, but I don't see you pointing them as viable solutions. tiobe.com

but I don't see you pointing them as viable solutions

Java, C and C++ are viable solutions, due to their popularity.

Re: PHP needs to die. What will replace it?

#46

Earlier quoted context omitted.

One of the interesting things about doing Passenger deployments for Rails is that it's very similar to doing PHP deploys, with the added benefit of the server not reloading any application code until you tell it to. For example: you can update the Rails code on the server, maybe run some data migrations or last-minute production tasks against the new codebase, and THEN tell Passenger to reload the application code. O…

Lots of PHP folks call that a disadvantage... It's nice knowing I can mess with files and after pressing F5 I'll always have the latest version. Yes, ok, caches can get out of sync, but they're easy to clear. There are furthermore no good PHP deployment automations, things Rails and Python have because of the level of complexity.

You do know that reloading is just a configuration option, right?

Re: PHP needs to die. What will replace it?

#49

The article states that php doesn't have lambdas and method chaining, although it does. They aren't well done, as per usual, but it definitely has them. Honestly, we may be best off doing a CoffeeScript style pre-processor for PHP. Because PHP isn't going anywhere, no mattter how much we may prefer other languages, PHP's popularity is one of pure pragmatism, something the language purists don't seem to understand. Ge…

Exactly. To beat PHP, you have to be as easy to write as static HTML. Even though I have done Ruby, Node.js and ASP.NET projects, I still go back to PHP because of how easy it is to go from 0 to hero without all the fuss.

The closest thing I've found is the serve gem, which lets me launch a web server from my current working directory. It lets me quickly mock something up in ERB, Haml and SASS without messing with Rails or Sinatra. As a complete newbie, with no coding experience, PHP is a much easier hill to climb than Rails or Django, which is Mt Everest by comparison.

Re: PHP needs to die. What will replace it?

#50

The article states that php doesn't have lambdas and method chaining, although it does. They aren't well done, as per usual, but it definitely has them. Honestly, we may be best off doing a CoffeeScript style pre-processor for PHP. Because PHP isn't going anywhere, no mattter how much we may prefer other languages, PHP's popularity is one of pure pragmatism, something the language purists don't seem to understand. Ge…

I agree with you and I think it goes even further than that: get me from hello world to mockup of my final app to my final app. Coding in php isn't pretty, but it's fast, even once you get past that hello world part.

Look at all the questions on stackoverflow from total beginners: they don't understand much of what they are doing yet, but they already have working forms and several pages and, well, results.

Of course, that's also part of what makes people hate php.

Post reply on HN