#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Posts
    11
    Rep Power
    0

    web APIs and web apps: Php and Python ?


    I am planning to learn a language for the P component in the LAMP model, is there a significant difference in Python vs PHP ? I want to create a couple of websites which leverage Google /Amazon APIs and I don't know which langauge offers better long term returns for web development and leveraging these APIs with SOAP etc ? I would appreciate your
    suggestions for this.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    89
    Rep Power
    13
    yes there is a significant difference between the two, with PHP you are restricted to pretty much web development only, Python on the other hand is a full programming language that you can use for almost anything
  4. #3
  5. No Profile Picture
    Brony & F/OSS Advocate
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2003
    Location
    Anaheim, CA (USA)
    Posts
    6,655
    Rep Power
    2476
    Originally Posted by jimmy2k1
    yes there is a significant difference between the two, with PHP you are restricted to pretty much web development only, Python on the other hand is a full programming language that you can use for almost anything
    PHP can also be used as a stand-alone interpreted programming language.

    ashish_gup, you may inadvertently be inciting a flamewar. PHP and Python are both good languages and there is never one "right" language: you should simply use the one you prefer. It's all choice. I choose PHP simply because it was simpler for me to learn quickly and adapt with, since I was already and still am C/C++ person.
    ~~ Peter ~~ :: ( Who am I? ) :: ( Peter's Musings: Uploading myself, bit by bit... ) :: ( Electronic Frontier Foundation ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key ) :: ( About me on the WIki )
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    461
    Rep Power
    25
    I personly like php for web work. it seems faster, even though with say mod_python it should be about the same speed. I did however find development with php was easyer and the documention for just web design is insainly larger than web design with python. However the docs for application and all purpose stuff is much much much better with python.

    I use both hevaily with my web site. I mainly right things that deal with how the server runs and administrative stuff in python and web front end with php. I choose this route because it is really what each language is generaly best for. However, both can be used for each others place and do it pretty well.

    php has A LOT of built in functions and does a lot of stuff for you, while python does make you import stuff for differnt functionality. witch can't be a pain however it really isnt to bad. Where as php does that automaticly when needed and such.


    so in reality it is just a matter of choice, pick one and stick with it, I would personly recommend both since they both have what they are ment for. I personly still do not think of php as a stand alone interpriter. Even tho i suppose some people actually use it. I would recommend python for anything that is ment for standalone apps. IMO

    Comments on this post

    • SimonGreenhill agrees : Exactly.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    Atlantic City, NJ
    Posts
    327
    Rep Power
    13
    In my limited python experience I've been using mod_python with psp pages on a few test sites I'm running and a project I'm doing at work. psp is similar to php in the respect that you embed the code right into the html with special tags(<% %>). Its also extremly fast. Ridiculously faster then cgi last I checked.

    The reason I chose to learn python rather then php is because in my opinion python is a more feature rich(*ducks*) language then php. So if psp pages can do the same as php pages I use them.
    I'll learn this stuff someday.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    461
    Rep Power
    25
    I think python in some ways has more features, however all the features needed to you to develope a web site is givin to you in a nice easy way with php, where as with python it isn't. You do have to do a lot more work to set up mod_python and learn it, a much higher learning curve IMO. With php its probably a bit easyer. However it is also harder to find python support on hosting companys, so php would be more cross serverible. The hosting companys that do offer python support usually have python setup though cgi so it is slow.

    But i think you should probably still learn or at least play with both and pick one that suits you the best.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    Atlantic City, NJ
    Posts
    327
    Rep Power
    13
    Originally Posted by CyBerHigh
    I think python in some ways has more features, however all the features needed to you to develope a web site is givin to you in a nice easy way with php, where as with python it isn't. You do have to do a lot more work to set up mod_python and learn it, a much higher learning curve IMO. With php its probably a bit easyer. However it is also harder to find python support on hosting companys, so php would be more cross serverible. The hosting companys that do offer python support usually have python setup though cgi so it is slow.

    But i think you should probably still learn or at least play with both and pick one that suits you the best.
    Thats a good point. PHP is more widely excepted and your right about hosting companies. I host my own sites so I was thinking too one dimensionally.
    I'll learn this stuff someday.

IMN logo majestic logo threadwatch logo seochat tools logo