Go Back   SitePoint Forums > Forum Index > Program Your Site > General Development Issues
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Sep 6, 2003, 17:43   #1
hotnuts21
eCommerce specialist
 
hotnuts21's Avatar
 
Join Date: Apr 2002
Location: Aberystwyth, UK
Posts: 1,368
PHP vs Python

Now I found out recently that

Quote:
a good chunk of Google is written in Python, a slow semi-compiled language
2 bits of news to me firstly google is written in python and secondly python is slow!!

A friend of mine who has been writing software and working for a large development company for some years now, all they use is open source software so to give the client value for money and for all the other good things about OS.

For a lot of CMS work they use Zope a very powerfull and clever CMS based on the Python language, and have tried to get me to use it a few times, I have dabbled but untill i can php inside out im gonna leave python well alone

Anyway as a cms I have found EZ publish a very good product and I was wondering basically what people think is better and why Ez or Zope ?

I would like to know what people think of the technology behind both and what benefits or downfalls both have.

Your thoughts please!!
__________________
Search & Rescue Aberystwyth Lifeboat
CSS Tutorials/Guides

Sitepoint signatures are not visible to Search Engines More info
hotnuts21 is offline   Reply With Quote
Old Sep 9, 2003, 07:25   #2
Hartmann
chown linux:users\ /world
SitePoint Award Recipient
 
Hartmann's Avatar
 
Join Date: Aug 2000
Location: Houston, TX, USA
Posts: 6,343
I'd like to know where you read that. Yes Google is partially written in Python, but slow, I mean, have you used Google?

In my experience with Python the only time I noticed slowdowns was when I programmed quickly and didn't use the proper steps to keep my code clean, fast, and readable. The other reason Python code would be slow is when it is doing a lot of calculations or system I/O. Other than that Python works just as good as any other language.

Zope is actually a really good CMS and site management piece of software.

Anyway, just give Python a chance. It is easy to install and uninstall if you don't like it.
Hartmann is offline   Reply With Quote
Old Sep 9, 2003, 07:32   #3
hotnuts21
eCommerce specialist
 
hotnuts21's Avatar
 
Join Date: Apr 2002
Location: Aberystwyth, UK
Posts: 1,368
I cant for the life of me remember where I read that now, I think it was in the google seo forum, but I am not sure!!

I am not against either piece of software I am learning Ez publish but I am having a few problems I will eventually move over to zope. I have played with plone which is based on zope and it is excellent.

I really started this thread as php and ez publish are very well known and talked about but python and zope are not and I really wanted to start a debate on which one is best or which one I should really concentrate on.

The big drawback is that a lot of hosts, mine included still do not and will not install/support python so its a no go from the start.

Come on people give us your thoughts
__________________
Search & Rescue Aberystwyth Lifeboat
CSS Tutorials/Guides

Sitepoint signatures are not visible to Search Engines More info
hotnuts21 is offline   Reply With Quote
Old Sep 9, 2003, 07:44   #4
Hartmann
chown linux:users\ /world
SitePoint Award Recipient
 
Hartmann's Avatar
 
Join Date: Aug 2000
Location: Houston, TX, USA
Posts: 6,343
Python and Zope have their own little communities. I think the reason for its lack of notariety is because of something you stated, hosts don't install it. I have only found a handful of hosts that don't run Python and the reasoning behind it is because people don't need/want it. So it is a catch 22.

Let me stop and say it here... Python is run as CGI (although there are Apache/Python modules) and it acts a lot like Perl and has come from the same type of needs system. It was originally meant as a tool to automate tasks on *NIX/Linux systems (much like Perl).

I cannot say which of the two are best because that is an opinion. Both stack up pretty evenly (you can do most of the things you do in PHP with Python).

If you are a big OOP programmer then Python might be the way to go. However with PHP5 that could all change.

I only rarely use Python for web apps and the reasons being are that:
1) Hosts don't install it
2) Hosts don't have the MySQL libraries built in
3) I have the code already in PHP, why spend time porting it.

I do however write a lot of client side software with Python because I find it easier than pulling out C/C++ to write a small application and since it is cross platform there isn't a whole lot I have to do to make it work on other types of OSs.
Hartmann is offline   Reply With Quote
Old Sep 9, 2003, 07:54   #5
hotnuts21
eCommerce specialist
 
hotnuts21's Avatar
 
Join Date: Apr 2002
Location: Aberystwyth, UK
Posts: 1,368
So as far as learning a CMS inside out, which one would it be Ez pub or zope/plone
__________________
Search & Rescue Aberystwyth Lifeboat
CSS Tutorials/Guides

Sitepoint signatures are not visible to Search Engines More info
hotnuts21 is offline   Reply With Quote
Old Sep 9, 2003, 07:56   #6
Hartmann
chown linux:users\ /world
SitePoint Award Recipient
 
Hartmann's Avatar
 
Join Date: Aug 2000
Location: Houston, TX, USA
Posts: 6,343
Well I like EzPublish and I feel that Zope is bloated for my needs. So EzPublish for me.
Hartmann is offline   Reply With Quote
Old Sep 9, 2003, 08:21   #7
hotnuts21
eCommerce specialist
 
hotnuts21's Avatar
 
Join Date: Apr 2002
Location: Aberystwyth, UK
Posts: 1,368
One thing I do like is that ez publish has a lot of example sites that are good but the plone example sites list
NASA
NATO
a UK police force
CBS new york and more. Now thats good PR
__________________
Search & Rescue Aberystwyth Lifeboat
CSS Tutorials/Guides

Sitepoint signatures are not visible to Search Engines More info
hotnuts21 is offline   Reply With Quote
Old Sep 9, 2003, 08:28   #8
anode
Sidewalking
 
anode's Avatar
 
Join Date: Mar 2001
Location: Philadelphia, US
Posts: 2,213
The "slow" comment was mine, and is taken a bit out of context(open source search engine thread.) Of course, as anyone that knows me knows, Python is my language of choice. That doesn't make it any faster, but as Hartmann said, it's fast enough for most problem domains.
Quote:
Originally Posted by Hartmann
Let me stop and say it here... Python is run as CGI (although there are Apache/Python modules) and it acts a lot like Perl and has come from the same type of needs system. It was originally meant as a tool to automate tasks on *NIX/Linux systems (much like Perl).
This is not really that accurate. Most Python web frameworks either use their own server (Zope comes to mind, although it can run behind Apache) or embed themselves in Apache(mod_python, as an example.) With that said, there is unfortunately no one single standard for Python based web apps.
__________________
TuitionFree — a free library for the self-taught
Anode Says...Blogging For Your Pleasure
anode is offline   Reply With Quote
Old Sep 9, 2003, 08:37   #9
hotnuts21
eCommerce specialist
 
hotnuts21's Avatar
 
Join Date: Apr 2002
Location: Aberystwyth, UK
Posts: 1,368
Quote:
The "slow" comment was mine, and is taken a bit out of context
Thanks for clearing that up, it just made me think a bit and so i put my thoughts down in a thread, I wanted a debate hence the title and its slowly happening. I used your comment with a bit of artisitic licence as hartmann pointed out google isnt exactly slow

I think you also said its a semi compiled language, but I am right in thinking that it can be used fully compiled cant it?
__________________
Search & Rescue Aberystwyth Lifeboat
CSS Tutorials/Guides

Sitepoint signatures are not visible to Search Engines More info
hotnuts21 is offline   Reply With Quote
Old Sep 9, 2003, 08:38   #10
Hartmann
chown linux:users\ /world
SitePoint Award Recipient
 
Hartmann's Avatar
 
Join Date: Aug 2000
Location: Houston, TX, USA
Posts: 6,343
Quote:
Originally Posted by anode
The "slow" comment was mine, and is taken a bit out of context(open source search engine thread.) Of course, as anyone that knows me knows, Python is my language of choice. That doesn't make it any faster, but as Hartmann said, it's fast enough for most problem domains.

This is not really that accurate. Most Python web frameworks either use their own server (Zope comes to mind, although it can run behind Apache) or embed themselves in Apache(mod_python, as an example.) With that said, there is unfortunately no one single standard for Python based web apps.
Yeah, that was what I was trying to say... unfortunately it didn't come out that way

I will say that mod_python is probably the de facto standard for myself. I won't use a host that has Python but a different implementation, however, that is personal preference.
Hartmann is offline   Reply With Quote
Old Sep 9, 2003, 09:04   #11
coo_t2
Non-Member
 
coo_t2's Avatar
 
Join Date: Feb 2003
Location: Dog Street
Posts: 1,819
I've dabbled in python a small bit. My impression with it is that it's a better general purpose language than either Perl or PHP.
And I think Perl is a better general purpose language than PHP.

Correct me if I'm wrong.

--ed
coo_t2 is offline   Reply With Quote
Old Sep 9, 2003, 09:08   #12
anode
Sidewalking
 
anode's Avatar
 
Join Date: Mar 2001
Location: Philadelphia, US
Posts: 2,213
This would probably be a good time to drop a link to the Python Web Framework Shootout.
Quote:
Originally Posted by hotnuts21
I think you also said its a semi compiled language, but I am right in thinking that it can be used fully compiled cant it?
You can compile it down to C for desktop apps, but I can't think of a reason to do that for web stuff. A more likely (and common) scenario is re-writing bottleneck modules in C.
__________________
TuitionFree — a free library for the self-taught
Anode Says...Blogging For Your Pleasure
anode is offline   Reply With Quote
Old Sep 9, 2003, 09:22   #13
Hartmann
chown linux:users\ /world
SitePoint Award Recipient
 
Hartmann's Avatar
 
Join Date: Aug 2000
Location: Houston, TX, USA
Posts: 6,343
Great link anode!

I agree that compiling Python to C for web apps is a little odd and I haven't done much compiling to C for desktop apps either. But I know it has been done, especially when desktop speed is an issue.
Hartmann is offline   Reply With Quote
Old Sep 9, 2003, 11:21   #14
coo_t2
Non-Member
 
coo_t2's Avatar
 
Join Date: Feb 2003
Location: Dog Street
Posts: 1,819
Quote:
Originally Posted by anode
You can compile it down to C for desktop apps, but I can't think of a reason to do that for web stuff. A more likely (and common) scenario is re-writing bottleneck modules in C.
Speaking of desktop apps. Have you done anything with
wxPython ?
That is one of the impressive projects in the python community.
Not only can you easily write nice GUI apps, but there is a large, helpful user community, which is something that wxPerl is missing IMHO.

--ed
coo_t2 is offline   Reply With Quote
Old Sep 9, 2003, 11:42   #15
anode
Sidewalking
 
anode's Avatar
 
Join Date: Mar 2001
Location: Philadelphia, US
Posts: 2,213
Quote:
Originally Posted by coo_t2
Speaking of desktop apps. Have you done anything with
wxPython ?
That is one of the impressive projects in the python community.
Not only can you easily write nice GUI apps, but there is a large, helpful user community, which is something that wxPerl is missing IMHO.
I've done a bit of messing around with it, but I'm too much of a Mac GUI snob to give it serious thought yet (the Mac version is a bit behind the others at the moment and higher standards apply regardless.) PyOBjC has been seeing the most of my GUI tinkering.
__________________
TuitionFree — a free library for the self-taught
Anode Says...Blogging For Your Pleasure
anode is offline   Reply With Quote
Old Sep 9, 2003, 11:46   #16
hotnuts21
eCommerce specialist
 
hotnuts21's Avatar
 
Join Date: Apr 2002
Location: Aberystwyth, UK
Posts: 1,368
Now im lost :s
__________________
Search & Rescue Aberystwyth Lifeboat
CSS Tutorials/Guides

Sitepoint signatures are not visible to Search Engines More info
hotnuts21 is offline   Reply With Quote
Old Sep 9, 2003, 13:52   #17
Hartmann
chown linux:users\ /world
SitePoint Award Recipient
 
Hartmann's Avatar
 
Join Date: Aug 2000
Location: Houston, TX, USA
Posts: 6,343
I do most of my GUI work in wxPython, just because I used the wxWindows with C++ so the library was easy for me to pick up. I think it is probably one the faster cross-platform GUI libraries which is another good reason to try it out.

There are some really cool tools for wxPython (wxDesigner) that allow you to create the GUI much like you would create one in Visual Studio, using RAD. The tool isn't free but in my opinion it's worth the $$$.
Hartmann is offline   Reply With Quote
Old Sep 24, 2003, 17:09   #18
pata
SitePoint Evangelist
 
Join Date: May 2002
Location: Barcelona, Spain
Posts: 406
I'm really interested in this thread. I just got started with Python mainly because I needed to write a watch script (for a folder) to put in a cron job and the only scripting language I knew was PHP. Unfortunately, only linux has php on the command line and my development machine (and everything else machine) is a Powerbook Titanium running Mac OS X. And also, PHP is not a good language for the sort of script I needed. So I looked at Python and was awed by its ease and power. I'm just a beginner in it, but I like it quite a bit, though I hate the syntax (no curly braces, no end of lines, etc).

For you mac guys I suggest MacPython. Not only does it install a higher version of Python than the one that comes with Jaguar (2.2), but it also comes with a nice bare-bones IDE which includes debugging and a secret syntax coloring feature (the latter not very robust, but better than nothing).

I'd like to get more into building GUIs with it, any suggestions?
__________________
Used to prefer ColdFusion.
Used to prefer PHP.
Now I prefer Maya
kakuweb.com
pata is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

 
Forum Jump


All times are GMT -7. The time now is 09:24.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved