Live data from Hacker News

PHP needs to die. What will replace it?

seldo.com

31–40 of 160 posts

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

#31
post #19

He lost me at "The most obvious potential successor to PHP is Ruby on Rails". why compare RoR framework written in ruby vs PHP programming language... go for Ror VS cakephp, RoR vs codeigniter, RoR vs symfony etc

For better or worse, the Ruby web community is so centered around one specific framework that people tend to just say Rails instead of Ruby.

The post isn't comparing PHP with no frameworks versus Rails. Indeed, the author's conclusion is that Rails doesn't sufficiently separate itself from PHP with an MVC framework (and he listed a few).

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

#33
post #17

I'm surprised that you didn't mention HipHop, especially if performance is your biggest gripe. It really is the bee's knees and will only get better. I spent a good chunk of my day looking at PHP code and profiling data. Assocs are terrible for performance but it's not a fatal flaw IMO. What people really want are separate "vector", "dict" and "set" types. It also needs a decent standard library to replace dyslexic c…

If performance is a problem, then PHP is most certainly not the source of it, the vast majority of performance issues people are having in PHP are related to poorly written code, bad understanding of the language, and most of all use of third party software that were never meant to be performant(WordPress, SugarCRM, Symfony, ZendFramework ...).

And HipHop is most definitely not the solution, the only reason to use HipHop is if you are Facebook.

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

#34

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.

On an unrelated note, having the Heroku service around for low-traffic side projects or whatever is just plain awesome.

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

#35
post #2

Don't want to be inflamatory, but: PHP has already been replaced by Ruby/Rails as the good thing that should be used for new projects. Only PHP developers don't see that. You lost me when you tried to argue that ORMs are not useful. Its easy to see why PHP developers think that, though.

Because all projects are CRUD apps? You aren't going to convert the masses of php hacks with an opinionated and rapidly changing framework like Rails. These are people who still mix logic with templating and you want them to learn an ORM, Coffeescript, Sass and Moustache? > You lost me when you tried to argue that ORMs > are not useful. Its easy to see why PHP > developers think that, though. Really? So the object-re…

There are problems with ORM, but there are much larger problems with PHP+SQL. Most of the problems created by ORMs are easy to workaround, though (to the point of having to write SQL sometimes), while problems created by SQL only are not (like n+1).

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

#36
post #2

Don't want to be inflamatory, but: PHP has already been replaced by Ruby/Rails as the good thing that should be used for new projects. Only PHP developers don't see that. You lost me when you tried to argue that ORMs are not useful. Its easy to see why PHP developers think that, though.

As a Python developer in SF, I can 100% agree with this. Ruby/Rails has replaced PHP for almost the entirety of new projects going forward out here — at least with the developers I know and respect — and Python makes up the rest.

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

#37
post #2

Don't want to be inflamatory, but: PHP has already been replaced by Ruby/Rails as the good thing that should be used for new projects. Only PHP developers don't see that. You lost me when you tried to argue that ORMs are not useful. Its easy to see why PHP developers think that, though.

If you have unlimited hardware at your disposal, work on projects where a slightly faster development for certain, specific cases can be obtained, or work on projects of a size that can be managed by the performance of a single machine, sure. If not, R/R isn't replacing PHP.

Rails doesn't really need that much hardware, that's a very common misconception. PHP is not the fastest thing in the world either, unless you go with a compilation cache server. Rails can be easily perform well under single machines. I have VMs with 512Mb of ram handling thousands of users per day with Rails with no problem.

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

#39

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…

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.

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

#40
post #16

Earlier quoted context omitted.

You're being inflammatory. Rails has nowhere near the install base that PHP has, and furthermore, it's a framework, not a language, so the comparison is unequal. Further, setting up and installing Rails is nowhere near as frictionless as installing, for instance, CodeIgniter. Until that can be said, Rails is not a viable alternative. I'm all for a PHP alternative. I use it because it's ubiquitous, but I have no love…

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.

I take it you have never tried to get major changes to core server infrastructure approved at large bureaucratic institutions. Writing your code in php is often orders of magnitudes faster, easier and cheaper than getting a decent RoR setup installed.
Post reply on HN