LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   A couple questions about Arch servers and Python vs PHP... (https://www.linuxquestions.org/questions/linux-server-73/a-couple-questions-about-arch-servers-and-python-vs-php-626523/)

sajro 03-07-2008 10:00 PM

A couple questions about Arch servers and Python vs PHP...
 
I am setting up an Arch Linux server for my personal site and my band site. It will be a LAMP, but I only want one language for the P part. I am trying to decide if it will be better to use Python or PHP.

I need to make ecommerce and a simple blog/news system (two things I want to build myself for experience). So, I need to know:
  • From someone with ecommerce experience in either/both languages, how easy is it to integrate with Paypal and Credit/Debit card payments?
  • Which would be more important to get experience in? I'm thinking Python as it's quite widely used on desktop AND web, but is there another side?
  • Since *nix doesn't require the stupid file extension (replaced with the shebang line), can I setup urls to be like
    Code:

    http://arandomsite.not/shop/quadraticfunc?ran=025105
    . I have always hated file certain extensions in web URLs for some reason

Those are my important concerns. I'll probably think of some more, though.

Thanks in advance.

pgpython 03-08-2008 02:01 AM

It depends really on what you want to do. The thing to bear in mind though is that python isn't designed to be a web language while php is and because of that it easier to work with php because it does things like db integration, templating, cgi a lot better without any help and there are more web tools that work with php.

Thats not to stay however that you can't build production class sites with python, You can, if you seriously want to use python for whatever reason. I would take look a good luck at zope and plone as these take modpython and build on it to make it more productive for a web application point of view.

Finally yes you can setup urls to sensible names. Though personally I would keep the file extension as it allow you to distinguish what file types are on your web server and the add something like this in the apache config

Code:

<DocumentIndex>
*.py *.php
</DocumentIndex>


jantman 03-08-2008 04:02 PM

I use both Python and PHP, but for different things. If you're looking into web stuff, especially eCommerce or blogs, you'll probably be able to find a lot more pre-written code, packages, and help for PHP.

That being said, when I load a new web server, I put PHP, Python, and Perl on it. There's no reason why you have to choose one, and it's usually helpful to have all 3 on the system - even if all of you web site is in PHP, you may want to run an administrative script in Python or Perl.


All times are GMT -5. The time now is 12:12 PM.