Re: [PHP4BETA] PHP vs Servlet, where is php_java
| From: | Rasmus Lerdorf | Date: | Wed, 05 Apr 2000 04:34:08 +0000 |
| Subject: | Re: [PHP4BETA] PHP vs Servlet, where is php_java | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-13136@lists.php.net to get a copy of this message | ||
> PHP might work faster on simple tests because it has a very large,
> powerfull library already compiled as native code, so even it is basically
> an interpreter, all native-code functions are faster than equivalent
> java bytecode.
>
> But the interpreted (PHP's language) libraries you might need to provide
> to build will be almost sure slower than java bytecode...
This point can be addressed by identifying which parts of a PHP library is
the bottleneck and writing native PHP functions that do the same thing.
> Other advantages of java vs. PHP:
>
> - More powerfull object-oriented language,
That's true.
> - Java better for large projects.
Debatable.
> - Lots of libraries,
True, Java probably has more libraries.
> - Performance can be improved by using faster JVMs
> or faster servlet engines.
Can't argue with this either.
> - Have not working for long with PHP but I dont remember it
> keeping session state. (even considering the fact it can run as
> plain CGI)
Not true for PHP 4, and not really true for PHP 3 either as there are
plenty of add-ons that implement sessions for PHP 3.
> - Limited number of databases supported.
Hrm.. I doubt PHP has support for less databases than Java. Just about
every database out there has ODBC drivers and as such PHP supports them.
> Database calls are very much database-dependent, changing database
> used might be a lot of pain..
I really hate this point. How often do you change databases in a
project? And, even if you do 90% of your work will be related to porting
your schemas, stored procedures, triggers, etc. Stuff that a database
abstraction layer won't help you with at all. However, we are adding a
database abstraction layer in PHP 4 so this silly argument will go away.
-Rasmus