|
Posted by NC on 11/15/07 23:19
On Nov 14, 9:35 am, flarosa <fr...@franklarosa.com> wrote:
>
> I'm wondering if I can get a reasonably civil (without
> starting any huge wars) opinion on how server-side PHP
> compares to server-side Java.
The biggest difference is architecture. PHP does not have an
application server in the Java meaning of the term; the PHP
interpreter is either loaded into the HTTP server as a module at the
startup or runs as a CGI/FastCGI executable.
Both PHP and Java work well with Oracle; when it comes to MySQL,
however, Java (at least in its Tomcat implementation) tends to have
performance issues. One widely publicized example is Friendster; the
performance problems in its Linux/Tomcat/MySQL stack were so pervasive
that the whole application had to be rewritten in PHP. So for
applications where license costs are a factor (or, to put it another
way, for situations when you can't afford Oracle and a commercial
application server), PHP (or Python) is usually preferable.
> I've been strictly a Java developer for almost 10 years
> now, and I'm pretty happy with it. However, I can't help
> but notice that there are a significant amount of PHP-based
> development projects where I live
Maybe, but have you looked into going pay rates for those projects?
> and I've also noticed when searching around the internet for
> ready-made web applications that a lot of them are in PHP.
Well, PHP hosting is by far the easiest to come by...
> As an object-oriented programmer I've always assumed PHP was
> more of a scripting language for doing things on individual
> web pages or writing small applications and that Java/J2EE
> was better positioned for writing large applications, but maybe
> that's no longer true.
It's never been true in the first place. PHP is easier to learn than
most alternatives, so there are a lot of inexperienced, yet eager, PHP
developers out there, who keep cranking out operational, but poorly
structured, code. It does not mean, however, that it is impossible to
produce a well-designed application in PHP...
Cheers,
NC
Navigation:
[Reply to this message]
|