Python CGI vs PHP

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2009
Posts: 38
Reputation: Garrett85 is an unknown quantity at this point 
Solved Threads: 0
Garrett85 Garrett85 is offline Offline
Light Poster

Python CGI vs PHP

 
0
  #1
32 Days Ago
I am currently reading two books, one on PHP and one on Python. Not that I'M good at ether. I'M about half way through the book on PHP or less and almost done with the one on Python. Though I haven't actually read anything web related in this particular Python book, I am aware that it can do web programming. My question is, which is better. Could I should I go ahead and drop the book on PHP considering that Python can do web programming as well as regular computer programming? Or does PHP have enough of an advantage to keep it up as well? Thanks.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 147
Reputation: mn_kthompson is an unknown quantity at this point 
Solved Threads: 32
mn_kthompson mn_kthompson is offline Offline
Junior Poster
 
0
  #2
32 Days Ago
I think both would work really well, but you'll have an easier time getting support if you're using PHP because that is a very common setup. PHP makes it really easy to grab the form fields and it might not be that easy in python. There are tons of directions on how to make Apache or IIS run PHP apps, but you'll have a more difficult time finding instructions on doing it with python.

Just my thoughts. It's probably not as difficult as I make it sound.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 101
Reputation: jomanlk is an unknown quantity at this point 
Solved Threads: 18
jomanlk jomanlk is offline Offline
Junior Poster
 
1
  #3
32 Days Ago
I haven't worked with Python, but I work with PHP and JSF. If your focus is just on web programming I'd recommend PHP. But you should always keep in mind to choose the correct language for your solution.

PHP is a good choice because it's specifically made for the Web and as such has massive support and is easy to setup with other web related technologies. It also has a pretty large collection of libraries that you can just drop into the ext folder and use.

Don't stick to just one, use the best tool. Being loyal to one language is nice, but it won't get the job done.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 149
Reputation: jice is on a distinguished road 
Solved Threads: 38
jice jice is offline Offline
Junior Poster
 
1
  #4
32 Days Ago
You can have a look at this to have an idea of web programming in python
http://webpython.codepoint.net/
and this
http://webpy.org/
I've never done web programming in python because norm in my job is php so i had to learn php. And i find it much less pleasant to write.
If I had choice, i'd certainly give a chance to python because it's very pleasant and fast to write.
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 4
Reputation: axaroth is an unknown quantity at this point 
Solved Threads: 0
axaroth axaroth is offline Offline
Newbie Poster
 
0
  #5
31 Days Ago
I am working with python on web applications from 2002. For the most I use Zope and Plone on it (a CMS). It is not a common choose because the object database backend, but there are al lot of python framework using the standard way of a relational DB: Pylons, TurboGears and Django (the most notables). All these frameworks can easily integrated wich Apache or other web server, but you need a hosting that provide python or a complete server.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,389
Reputation: evstevemd has a spectacular aura about evstevemd has a spectacular aura about evstevemd has a spectacular aura about 
Solved Threads: 127
evstevemd's Avatar
evstevemd evstevemd is offline Offline
Nearly a Posting Virtuoso
 
0
  #6
28 Days Ago
Python is easy to write, but I find setting it up for even local development is a headache! If it is such a headache to Just setup it, how can I practice?? For this one, I suggest PHP. PHP isn't difficult either though it is C++ish
Atheist: God is man made imagination, he doesn't exist!
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 4
Reputation: axaroth is an unknown quantity at this point 
Solved Threads: 0
axaroth axaroth is offline Offline
Newbie Poster
 
0
  #7
28 Days Ago
Originally Posted by evstevemd View Post
Python is easy to write, but I find setting it up for even local development is a headache! ...
Under linux you have Python by default. If you need to experiment with libraries and don't want to mess the system, Python has virtualenv, installable as package. If you want to try the last version compiling Python from sources takes 10-20 minutes... maybe under Windows is another story, I don't know.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,389
Reputation: evstevemd has a spectacular aura about evstevemd has a spectacular aura about evstevemd has a spectacular aura about 
Solved Threads: 127
evstevemd's Avatar
evstevemd evstevemd is offline Offline
Nearly a Posting Virtuoso
 
0
  #8
26 Days Ago
Originally Posted by axaroth View Post
Under linux you have Python by default. If you need to experiment with libraries and don't want to mess the system, Python has virtualenv, installable as package. If you want to try the last version compiling Python from sources takes 10-20 minutes... maybe under Windows is another story, I don't know.
I meant to set it up for Web applications. I use windows.
I have Installation and works fine for desktop apps
Atheist: God is man made imagination, he doesn't exist!
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 4
Reputation: axaroth is an unknown quantity at this point 
Solved Threads: 0
axaroth axaroth is offline Offline
Newbie Poster
 
0
  #9
26 Days Ago
Originally Posted by evstevemd View Post
I meant to set it up for Web applications. I use windows.
I have Installation and works fine for desktop apps
Usually the python frameworks have its web server so under Linux we install the available package for Apache and use it only as a proxy and only on production machines. mod_python and mod_wsgi are used from few people.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,389
Reputation: evstevemd has a spectacular aura about evstevemd has a spectacular aura about evstevemd has a spectacular aura about 
Solved Threads: 127
evstevemd's Avatar
evstevemd evstevemd is offline Offline
Nearly a Posting Virtuoso
 
0
  #10
25 Days Ago
Originally Posted by axaroth View Post
Usually the python frameworks have its web server so under Linux we install the available package for Apache and use it only as a proxy and only on production machines. mod_python and mod_wsgi are used from few people.
I tried to set up mod_python to work with WAMP so as to use PHP/Python side by side, and guess what? I ended giving up. The process is so convoluted that It was only headache to me. Not so fun!
Atheist: God is man made imagination, he doesn't exist!
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
Reply With Quote Quick reply to this message  
Reply

Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC