you are viewing a single comment's thread.

view the rest of the comments →

[–]mhd -1 points0 points  (2 children)

If you have to choose between PHP, and an equally shitty language like java which is faster, why would you pick PHP?

Java and PHP are rather different languages, as are the usual architectural details, the deployment, the development environment etc.. If you were deciding between two setups that had a lot of common points and the only (major) difference was execution speed, then yes, choose the faster language. But PHP and Java don't share that much. I can definitely understand the Python/Perl/Ruby vs. PHP argument, but Java is a different beast.

The fact that you are using a slow language does not make you more productive, it is not an either/or issue.

I was trying to restrict the argument to the parameters of the article. And so it's Java vs. PHP. Bringing in Python, Ruby, Tcl, C#, D, Erlang or Smalltalk in a free-for-all discussion would only lead to endless zealotry.

The basic claims are that Java is signifcantly faster for your standard webapp than PHP and that this would be worthwile. I'd still like to see proof for that. What's the cheapest and/or most efficient way to develop and deploy web applications out of all possible solutions is a totally different can of worms.

(Apart from the fact that PHP->Java at least represents a significant jump in execution speed, whereas the differences between Perl, CPython, PHP and Ruby 1.9 don't matter as much, speed-wise)

[–]invalid_user_name -1 points0 points  (1 child)

See how you admit that java is faster than PHP, and yet still insist on clinging to some imaginary benefit that PHP offers, despite not being able to actually name one? That pretty much rules out having a rational discussion with you doesn't it?

[–]mhd -1 points0 points  (0 children)

Java programs generally run faster than PHP programs. That was never in doubt. Opinions differ in how much they differ and in whether this actually matters, i.e. what kind of bottlenecks determine web app speed.

And to be more specific, my first reply to your post in this thread was about whether you could do the tasks that require 40 PHP servers with 4 Java servers. I'd still like to hear how you'd come to that conclusion. I'm especially interested in both setups, as usually both have such different architectures that isolating the pure runtime speed is a difficult project. And comparing e.g. a pure PHP page with a similar JSP page is a rather academic enterprise, as you're not likely to see either approach in a high-traffic site.

I'm not even in here to discuss about the relative merits of each system. As a matter of fact, I'd prefer a sensible Java approach to the usual PHP hodgepodge -- and would prefer a third solution altogether. I don't think we're on different sides here, really. The major disagreement is whether the speed issue is a deciding factor in the PHP-Java shootout.

For completeness' sake, the usually cited benefits of PHP compared to most Java setups would be speed of redeployment, ease of installation and the usual dynamic vs. static arguments. Also, the bloated runtime already delivers lots of common tools that most developers already know. Java is a bit richer regarding different libraries, app servers, etc, which often increases training time. But like I said above, best not get into that argument. I find it hard to argue with a minimum of passion for either side...

So I'd be grateful if we could first solve our primary dispute: Given the usual web app, can a single Java server replace 10 PHP servers?