JavaEE vs PHP - why so many people thinks Java is better? [closed]

Asked
Active3 hr before
Viewed126 times

2 Answers

90%

An addition to the FrustratedWithFormsDesigner's answer: Since I guess that your question more targets towards smaller sites, there is an important aspect that you need to consider for a lot of people: Hosting is ubiquitous for PHP but its harder for Java or ASP sites. This however is not a defect of those languages.,I think the reason that a lot of the start-ups are using other technologies is because theyre sexier and have a more publicized an open source push behind them.,There is also a lot less boilerplate code to do the same thing in python, so I spend less time developing the code as well., 34 Just try to get rid of some misconceptions. Java EE is not the only thing on the Java server side as many seem to think. – Jonas Aug 18 '11 at 16:19

load more v
88%

And like most any situation where multiple approaches are possible, it’s not just a matter of which one is better, it’s a matter of understanding the tradeoffs. Let’s take a walk across the I/O landscape and see what we can spy.,While the factors involved with your overall throughput are many and also vary widely from application to application, the more you understand about the guts of what is going on under the hood and the tradeoffs involved, the better off you’ll be.,As you can see above, the basic code structure of what we are doing resembles that of the more simplistic approaches, and yet achieves non-blocking I/O under the hood.,Java gets us closer and certainly has some good out-of-the-box functionality for I/O, but it still doesn’t really solve the problem of what happens when you have a heavily I/O bound application that is getting pounded into the ground with many thousands of blocking threads.

And of course the actual code is simply embedded right into your page, and operations are blocking:

< ? php

// blocking file I/O
$file_data = file_get_contents(‘/path/to / file.dat’);

// blocking network I/O
$curl = curl_init('http://example.com/example-microservice');
$result = curl_exec($curl);

// some more blocking network I/O
$result = $db - > query('SELECT id, data FROM examples ORDER BY id DESC limit 100');

?
>
load more v

Other "undefined-undefined" queries related to "JavaEE vs PHP - why so many people thinks Java is better? [closed]"