Python vs. PHP (& Java?)

Martijn Faassen m.faassen at vet.uu.nl
Sat Dec 30 21:23:23 EST 2000


Ben Ocean <beno at thewebsons.com> wrote:

[snip]
> Python has the advantage of byte-code and
> compilation, but it’s server-side. PHP might not be as fast on the server,
> but it doesn’t have to make as many trips back and forth between server and
> client.

It appears as if you're misunderstanding something here. Firstly, 
I don't know which of the languages is faster; it probably depends on the
task as much on the language itself. I don't know much about PHP, but I thought
it could be compiled to bytecode or at least some intermediate format as well?

PHP and Python when used for website programming are both server side only.
There are no 'trips back and forth' between server and client more than
the regular HTTP requests coming from the client and the resultant web
pages being delivered from the server. There is no difference between Python
and PHP in this respect at all.

Perhaps you got confused by DTML in Zope? DTML allows you to embed calls
to Python methods (and callable Python objects in general) in a web page,
for instance like this:
  
 <p><dtml-var "myfunction()"></p>

Where myfunction is some Python function (defined as an external method,
for instance). But the client never calls myfunction() in this example;
the *server* does the calling before the resultant web page is sent out
to the client.

Anyway, I saw some other misunderstandings in your post as well, but 
from my brief reading of some answers I didn't see anyone go into this
one yet. Good luck and have fun with Zope and Python!

Regards,

Martijn  
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list