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

    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0

    Question How is the python web programming ecosystem?


    Compared to Java, .net, php, etc., How "good" or "big" is the Python ecosystem? It is difficult to put into a question, but I don't see a lot of webstuff in Python but would really like to use it. I've only seen Django, and Python does not really seem to do well for templating. But it is very OOP and leads to good design.

    By ecosystem, I mean IDEs, community (web particularly), resources for web, and so on.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,616
    Rep Power
    4247
    If you are talking web frameworks, then Django is the most popularly used python framework, but it's not the only one. There is also TurboGears, Zope, Grok, Pylons etc. These are only some of the popular ones, there are a lot of other frameworks as well. Similarly, there are also a number of popular templating frameworks for python.

    As for IDEs, there are a number of them. First, there is IDLE, which comes included with python. A number of editors also support python (syntax highlighting, auto completion, context help etc.). Please see:
    http://wiki.python.org/moin/Integrat...ntEnvironments
    and
    http://wiki.python.org/moin/PythonEditors
    for a list. (Oddly enough, PythonWin doesn't seem listed -- that's the one I use when programming in Windows. PythonWin comes included along with the python windows extensions package)
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0
    Why don't more people use it for the web? Is it because it is harder or at least you need some knowledge of oop?
  6. #4
  7. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480
    I think successful web browsers support javascript and java, but somehow python didn't make it. java is everywhere. Python isn't.
    [code]Code tags[/code] are essential for python code and Makefiles!
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Location
    Usually Japan when not on contract
    Posts
    240
    Rep Power
    12
    Originally Posted by ooprogrammer
    Why don't more people use it for the web? Is it because it is harder or at least you need some knowledge of oop?
    No. Its used all over the place for server-side development (I write Django code nearly every day). What's better about Python in this use is that in the Linux world Python is also used for writing core system utilities whereas Ruby, PHP and Java are not (Python is included in most bare installs along with Bash and awk, and somewhat displaced Perl). As for "in the browser" type development, of course, I don't think any browser supports Python as a "document scripting" language like JavaScript.

    Anyway, you don't need knowledge of OOP per se. I write mostly functional-style code for the web and only touch the object system of Django where it makes sense to. Naturally this involves use of the host of factory classes Django makes available, but those objects aren't talking to anything or messaging around for the most part -- they mostly represent a structural heirarchy of function containers (a consequence of the way Python's module system works with instead of against its Modula-3 style objects). The object system of Python is quite flexible, as are the support mechanisms for most other programming styles -- you're not forced into doing anything any certain way, but there are ways that are more "pythonic" than others, though this rarely has anything to do with whether user-defined objects are employed or not.

    On non-trivial schemas that face the web and don't actively simulate anything OOP is a horribly convoluted proposition -- and "active simulation" is a farce on the web anyway, considering the statelessness of the document publication protocol the web is built on... so functional mapping of inputs to outputs make the most sense there anyway. But most people are obsessed with OOP, especially those in management, so there's plenty of job security wrapped up in maintaining the accidental complexity of OOP-only stateless web code.

    Come to think of it, "stateless OOP" is an oxymoron, which is nature trying to tell us something...

    On the way to getting a rendered answer to return to the web server objects may or may not be involved, but that's implementation detail living within beyond the veil of abstraction (and as I mentioned above, OOP on a non-trivial schema is a pain anyway).

    Blah blah. Anyway, there are tons of Python web frameworks and a rather large Python web dev community. But from the flavor of your questions it sounds like you might like Ruby on Rails more.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    153
    Rep Power
    5
    I prefer Flask myself, though I'm a fairly recent convert from PHP.

    I wrote up my opinions on going from PHP to Python in a blog post a while back, you may find it edifying:

    http://www.alandmoore.com/blog/2013/02/02/from-php-to-python-things-i-wish-id-known/

    The reason it's not more popular than other languages/frameworks:

    - PHP: I can get a server with PHP from just about anyone for a couple dollars a month. Most Linux distros do LAMP out of the box. It's just too ubiquitous and PHP is conceptually easier for beginners coming from doing flat-file HTML development.

    - .NET: Microsoft. What else can I say?

    - Java: Enterprises love Java, most colleges teach Java, tomcat is mature and powerful.

    - Ruby: Rails was first-to-the-game with easy-to-deploy web frameworks, and to someone who's only done PHP or Java, Ruby seems like the Promised Land. Ruby can be a fun language in its own way.

IMN logo majestic logo threadwatch logo seochat tools logo