SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2005
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is Python impractical for web development?

    As a language, I like Python better than PHP. But, for web development, I am afraid that python may not be a practical choice.

    Python requires special, non-standard, expensive, hosting. This is especially true if you want to use one of the popular python frameworks, and frameworks are probably the most practical way to develop web sites with python. In the likely case that a client already has a host, and that host does not work with python; it may be difficult to tell a client that he/she will have to change hosting, and pay much more.

    If you need to hire developers, you will find that python developers are much more difficult to find.

    If you want a job as a web developer, you will find that python is not a commonly demanded skill. Demand for python web developers certainly lags far behind demand for PHP, .Net, Java, or RoR, developers.

    It seems like, if you are going to work on web-sites, you need to know PHP anyway. It's like know html, and javascript.

    Or is python such a great language, that it's worth all the extra trouble? Or, am I wrong about everything?

  2. #2
    SitePoint Addict ruby-lang's Avatar
    Join Date
    Aug 2007
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't give up on Python so fast. It is certainly gaining traction, and hosting isn't all that much more expensive. Webfaction, to cite one, offers Python/Django for $9.50/mo (less if you pay in advance.)

    If you plan to find a job in an area that isn't a technological hot spot or maintain pre-existing sites, then you won't escape from the triad PHP, Java, and C#, with the occasional RoR if you are lucky. But if you are creating your projects from scratch, Python is a great option.

  3. #3
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    It depends what you class as expensive hosting, many hosts now automatically include both ruby on rails and django (python) scripting as part of the package.

    I am currently with mediaTemple and they offer RoR and Django containers at $20 a month (on top of the existing $20 a month you pay for hosting)... but for that you are getting dedicated resources over the usual grid / cluster hosting so your apps are going to be more stable as a result rather than them running just as part of a shared service, it's almost to the point of cloud hosting

  4. #4
    SitePoint Zealot
    Join Date
    Sep 2005
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can get PHP hosting for $10 a year.

    http://www.dollar-hosting.net/

  5. #5
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Sure but PHP is designed for something totally different to Python.

    If you are doing general purpose server-side scripting, PHP is file.
    If you are making web applications or extensive multi-function scripts, python may be better.

  6. #6
    SitePoint Zealot
    Join Date
    Aug 2008
    Location
    NC
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I like python, a lot. But I know where you're coming from. My webhosts only allow python on the high end Dedicated Server plans. I use it mostly for prototyping and proof of concept stuff, but I think it's worth knowing and keeping in your toolbox.

  7. #7
    SitePoint Enthusiast stakes's Avatar
    Join Date
    Sep 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is Python impractical for web development?

    By itself, compared to PHP it would be highly impractical.

    On a higher lever, with a framework like Django, it's extremley practical. I come from a PHP background and I can say I haven't really looked back, but there are some drawbacks (some of which you mention)

    1) Hard for beginners

    I'm self taught, and I've found the documentation and tutorials available for python are offen much more theoretical than practical, and to start with, it was hard for me to wrap my head around it. The people who write/work with python/django tend to discuss the language on such a high level that it's not even remotely interesting to me.

    2) Code evolution

    This is only applies to Django, about 90% of blog posts and articles I find about Django are outdated, because only since last year, there has been so many changes/upgrades to the the framework. For a beginner, it's really hard knowing what to believe and learn, thankfully though, the official django documentation is mostly really good, and their IRC channel is very friendly too

    3) Hosting

    Like you mentioned, deploying a python/django website takes more trickery than just uploading a PHP file. You need more knowledge and time setting it up to run smoothly. As a result, finding web hosting that supports it, and knows how to run it well, is harder and maybe just a little bit more expensive to find. But those that DO host it, tend to be very good.

    Having said all this, I've totoally falled in love with Python and Django, and once you get rolling, there's nothing stopping you

    Cheers
    webcloud.se - Articles on web development

  8. #8
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Python is indeed very good for webdevelopment, nice language! I also was a Python fan before I saw Coldfusion going! The problems of the most Python web frameworks are:

    - You need to have some OOP knowledge.
    - Not easy to learn.

    Coldfusion takes rid of this problems! It is possible to use OOP (CFC's) but it's not necessary.

  9. #9
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could set up a server yourself. It's not that hard.

  10. #10
    SitePoint Enthusiast
    Join Date
    May 2005
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We're currently doing web development with Python and Django and I wouldn't go back to PHP .

    Hosting is indeed a but tricky. But there are shared hosts that support running Python with Fastcgi. And also VPS prices are going down and you can have a more than decent full root machine for $10 a month.
    IntoVPS - Unmanaged VPS hosting
    IntoDNS - Check your DNS health and configuration

  11. #11
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by walterbyrd View Post
    Python requires special, non-standard, expensive, hosting.
    Free hosting through Google for your Python apps isn't all that expensive (unless you get so many visitors that they actually do start charging you for it).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  12. #12
    SitePoint Member
    Join Date
    Jul 2009
    Location
    Cyberspace
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I chose what I am going to use for a project Python vs. PHP it comes down to scale. If it is small, it is normally far faster to hack something together in PHP.

    However if it is something larger, take for example the current site I am working on ~12000 lines of python. I could never maintain that by myself in PHP, in python I find it easy.

    If which one you chose really comes down to who/what you are. Single programmer who knows both and your working on you own thing and it is going to be something non trivial Python I think is a better choice.

    If your going to pay someone else to write something for you, Python may not be the correct choice because of the problem finding developers who can use it.

    Also Python is only now really starting to gain traction, so all the tools to make it easier don't exist yet.

    @PhazeStone
    That Python frameworks are OOP based is a good thing. It might be a hurdle for beginner programmers doing small sites, but if your doing something much larger it makes a lot more sense. The amount of code I chose to write as OO has been roughly linked to my experience as a programmer.
    Toolbar Buttons - buttons for everying
    Text Formatting Toolbar - make posting easy and fun
    MinimizeToTray Plus

  13. #13
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,287
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Perl has this same problem, as far as the hosting. Often, they may even say "yeah we have perl (or python)" and it turns out they have some very old version with no modules. Often you need root access to load your desired modules.

    One solution is some package you can get loaded onto the server that can load all the other stuff for you. A bit more palatable for the GoDaddies out there. I've seen some for Perl and I would think there are packages for Python that do the same thing.

    While it's likely true you won't find Python guys running around as much as PHP guys, I think in general you would get higher quality guys period if you use Python. The shear number of available PHP guys doesn't mean much if they're very low level. Compare instead the number of available Pythong guys to the number of PHP guys who can code to high standards, preferably also with knowledge of one of the other OO programming languages too. They may even up more.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •