473,806 Members | 2,321 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python v PHP: fair comparison?

I don't know if this is a fair comparison or not. Any comments
appreciated.

- Python is more readable, and more general purpose
- PHP has awful backward compatibility
- PHP has a lower barrier to entry
- Most inexpensive web-hosters support PHP, but not Python
- PHP has far more pre-writen scripts available
- Newer versions of mod_python require Apache 2.0, which few hosters
have
- There is more demand for PHP developers, than Python developers

Nov 14 '06
50 2672
"Luis M. González" <lu*****@gmail. comwrote:
>
Fredrik Lundh ha escrito:
>Luis M. González wrote:
But as a web development language, it's olnly when people started
to look for the "rails killer" and many python alternatives started
to come up (although Django has been in development for a long time
before all this hype).

nah, people have built web stuff on Python for as long as we've had a
web.

</F>

I know, but would you consider a python cgi application a good
competence against php?
php running as cgi you mean.

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
Nov 16 '06 #41

James Cunningham wrote:
Nope. It disproves your assertion that "certainly all of the lower
priced hosters" use Apache 1.3.
Okay, where can I get Python and Apache 2.X for $10 a year?

Nov 16 '06 #42
On 2006-11-16 12:46:05 -0500, "walterbyrd " <wa********@ina me.comsaid:
>
James Cunningham wrote:
>Nope. It disproves your assertion that "certainly all of the lower
priced hosters" use Apache 1.3.

Okay, where can I get Python and Apache 2.X for $10 a year?
Frankly, I can't find *anybody* who advertises hosting for <= $10 a
year - the cheapeast I can find is $18 - and such a plan would be too
limited for me to consider anyway.

But with easily-available promotional codes, you can pay less than that
at least for Dreamhost, which offers Apache 2.x and Python 2.4. I
consider it low-cost hosting, but YMMV.

Best
James

Nov 16 '06 #43
James Cunningham <ja************ **@gmail.comwro te:
On 2006-11-16 12:46:05 -0500, "walterbyrd " <wa********@ina me.comsaid:
>>
James Cunningham wrote:
>>Nope. It disproves your assertion that "certainly all of the lower
priced hosters" use Apache 1.3.

Okay, where can I get Python and Apache 2.X for $10 a year?

Frankly, I can't find *anybody* who advertises hosting for <= $10 a
year - the cheapeast I can find is $18 - and such a plan would be too
limited for me to consider anyway.
hostingforabuck .com : $12/year, without domain name of course. Not sure on
Apache version or Python, but the guy who runs it is extremely helpful and
fast.

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
Nov 16 '06 #44
John Bokma wrote:
"Luis M. González" <lu*****@gmail. comwrote:

I know, but would you consider a python cgi application a good
competence against php?

php running as cgi you mean.
Perhaps not: he's referring to deployment on really cheap hosting
solutions which might support mod_php but wouldn't support anything
better than CGI for Python software. The suitability of mod_php and the
supposed unsuitability of mod_python for commodity hosting did come up
on comp.lang.pytho n some time ago, a while before certain other trends,
and has seemingly been discussed every year for several years:

http://groups.google.co.uk/group/com...f390af4ed6e92e

"Thus, for mod_python hosting to be reliable, you have to give each
user their own instance of the Apache server (proxied through a central
instance of Apache). This might, in fact, no longer be needed with the
latest mod_python, but I leave that to the mod_python experts in this
newsgroup to expound upon if so." (To which there was no response.)

This discussion only differs from those previous discussions [1] in the
sense that better hosting is now available for less, although you can't
get a virtual server for $1/month unless you have some contacts in the
business.

Paul

[1] http://groups.google.co.uk/groups?oi...on+PHP+hosting

Nov 16 '06 #45
Luis M. González wrote:
Cameron Laird ha escrito:
Perhaps it's timely to clarify the "newer" above: Guido
made Python public in '89-90, and Rasmus showed PHP to
others in '94-95.

OK. But since when has python been considered a viable alternative for
web development?
As a generalp purpose language, it's older.
But as a web development language, it's olnly when people started to
look for the "rails killer" and many python alternatives started to
come up (although Django has been in development for a long time before
all this hype).
Huh? I've been doing paid python web work since 2000. I'm fairly sure
that Yahoo! groups predates that by a while, and I know that
mod_python/httpdapy goes back at least to 1998 (and Python CGI predates
that significantly).

Nov 16 '06 #46

sj*******@yahoo .com ha escrito:
Luis M. González wrote:
Cameron Laird ha escrito:
Perhaps it's timely to clarify the "newer" above: Guido
made Python public in '89-90, and Rasmus showed PHP to
others in '94-95.
OK. But since when has python been considered a viable alternative for
web development?
As a generalp purpose language, it's older.
But as a web development language, it's olnly when people started to
look for the "rails killer" and many python alternatives started to
come up (although Django has been in development for a long time before
all this hype).

Huh? I've been doing paid python web work since 2000. I'm fairly sure
that Yahoo! groups predates that by a while, and I know that
mod_python/httpdapy goes back at least to 1998 (and Python CGI predates
that significantly).
Do not forget the subject of this thread.
Nobody is criticizing python here. I am a "believer"!
We are talking about important details that matter when choosing a
language, and specially when choosing one for web development.
I'm sure Yahoo, Google and other companies can afford having
knowledgeable people, hardware and resources to use python they way
they like.
The problem is (or was) for mere mortals trying to create a web site on
shared hostings.

We all know that mod_python has its issues, and still is not a common
or affordable feature in the vast mayority of web hosts. And prior to
that, you only had cgi or other rather unknown solutions.
mod_php had a clear advantage here. Perhaps not as a language but as an
ubiquitous and cheap alternative.

In the last months (and I said "months" not years) the situation
improved a lot, but still it is a fair to make a comparison.
My opinion is that python, as a language, is by far a much better
alternative for any use.
But php, as a platform, still has a many advantages, being availability
the main one.

Luis

Nov 17 '06 #47
sj*******@yahoo .com wrote:
Huh? I've been doing paid python web work since 2000. I'm fairly sure
that Yahoo! groups predates that by a while
http://en.wikipedia.org/wiki/EGroups

</F>

Nov 17 '06 #48
Luis M. González skrev:
OK. But since when has python been considered a viable alternative for
web development?
[...]
The problem is (or was) for mere mortals trying to create a web site on
shared hostings.
Yes, that was the "barrier to entry" observation, but you have to
implicitly narrow the discussion to just that if you want statements
like the one above to stand. I agree with what you're saying in the
context of "mere mortals", but for businesses and other organisations,
who have more control over hosting infrastructure, Python has been
viable for a long time.
We all know that mod_python has its issues, and still is not a common
or affordable feature in the vast mayority of web hosts. And prior to
that, you only had cgi or other rather unknown solutions.
True. This kind of thing is what put the brakes on the adoption of
Webware and similar technologies where you have a long-running process
alongside the Web server processes: something a lot of commodity
hosting companies aren't interested in managing. I imagine that
mod_python could have been an acceptable vehicle for higher performance
Python hosting, given that you could just add it to the server program,
but the necessary isolation mechanisms were never developed. (And in
this context, it's interesting that the principal author of mod_python
now runs a hosting operation based on Linux-VServer technologies.)
mod_php had a clear advantage here. Perhaps not as a language but as an
ubiquitous and cheap alternative.
Agreed.
In the last months (and I said "months" not years) the situation
improved a lot, but still it is a fair to make a comparison.
The number of providers willing to run long-running processes alongside
Web server processes has certainly increased, due to an increased
demand for a certain non-Python Web framework whose technical
foundations virtually mandate such an environment. Nevertheless,
WebFaction (as an example of a more flexible provider) has been around
since the start of 2003.

Paul

Nov 17 '06 #49
Luis M. González wrote:
sj*******@yahoo .com ha escrito:
Luis M. González wrote:
OK. But since when has python been considered a viable alternative for
web development?
As a generalp purpose language, it's older.
But as a web development language, it's olnly when people started to
look for the "rails killer" and many python alternatives started to
come up (although Django has been in development for a long time before
all this hype).
Huh? I've been doing paid python web work since 2000. I'm fairly sure
that Yahoo! groups predates that by a while, and I know that
mod_python/httpdapy goes back at least to 1998 (and Python CGI predates
that significantly).

Do not forget the subject of this thread.
Nobody is criticizing python here. I am a "believer"!
I was responding to the statement "since when has python been
considered a viable alternative for web development".

At any rate, I haven't had any problems finding cheap Python hosts, so
I think that's largely a straw man--there are _more_ PHP hosts out
there, but it's not as though you're limited to only 2-3 Python hosts.
There are plenty to choose from.

Nov 17 '06 #50

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
34290
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
59
4322
by: Hugh Macdonald | last post by:
I've recently been trying out various different GUI frameworks in Python and was wondering if I could get your input on the pros and cons of the different ones... wxPython: I love the programming side of wxPython, but I find it's just so slow to initialise in the first place. Tkinter: While it's fast to load up, the syntax has never really appealed to me
114
9899
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
10
1894
by: walterbyrd | last post by:
I don't know if this is a fair comparison or not. Any comments appreciated. - Python is more readable, and more general purpose - PHP has awful backward compatibility - PHP has a lower barrier to entry - Most inexpensive web-hosters support PHP, but not Python - PHP has far more pre-writen scripts available - mod_python is difficult to set up, and use, and is buggy and prone to crash
0
1594
by: Paul Boddie | last post by:
QOTW: "I think you've got the wrong intuition about the balance between the amount of bandwidth and the amount of computation a given numer of dollars would buy. You've hundreds of CPU cycles available per bit transmitted; space enough to stick in even Python." - Thomas Womack (on comp.lang.lisp, earlier this year, so it's not a true QOTW) http://groups.google.com/group/comp.lang.lisp/msg/453239d7b8e0ef72 "I'm a recent, belated convert...
71
3369
by: Jack | last post by:
I understand that the standard Python distribution is considered the C-Python. Howerver, the current C-Python is really a combination of C and Python implementation. There are about 2000 Python files included in the Windows version of Python distribution. I'm not sure how much of the C-Python is implemented in C but I think the more modules implemented in C, the better performance and lower memory footprint it will get. I wonder if it's...
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9597
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10618
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10110
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3850
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.