Hacker News new | past | comments | ask | show | jobs | submit login
Python is exposed as main webdevelopment tool as it deserves
21 points by ergo14 on Aug 30, 2010 | hide | past | favorite | 24 comments
Did anyone notice that lately Python got a very strong stack of solutions that can be used in web development?

Frameworks and tools like Pylons, repoze.bfg, werkzeug, django reached maturity that allows to do virtually anything without any roadblocks. There is set of good template systems, awesome ORM - sqlalchemy + good standard lib and a pypi for all modules you can ever want. I'm a bit surprised that python is not mentioned often here as a solution to many problems (web)applications face in general - it's wonderfully all purpose.

Is it just because people are more used to ruby/php or python folks don't do good enough job in advertising their solutions?




Include tornado framework in consideration if you are starting out. I just love it - lightweight yet powerful. I just love how helpful Ben Darnell and folks who are maintaining the framework.

The latest YC fav kid, hipmunk.com is built using tornado.


Seconded. Its as minimal as web.py to get started but has all the templating, realtime events, and more waiting when you need them. Docs are great and sample code is shipped with it so you know it works.


Do you have any tangible metrics to prove this wide acclaim/adoption of Python relative to other languages? To me this screams of tunnel-vision; whatever language specific media and news-outlets you follow would impact your perception of the larger IT landscape.

"Allows to do virtually anything", "there is a set of good .." and "awesome .." are not facts or measurable quantities. I would like to see the underlying assumptions proven first, otherwise you're begging the question.


Well this has nothing to do with media or anything else. Before I decided to start my own company I was looking for a job. Moved to few places, and at least in my country I had a pretty decent overview of what is used in where. And the fact is that vast majority was php,rails,net.

"Allows to do virtually anything" {SNAP} are not facts or measurable quantities" Indeed, they are not - but the amount of programs in your favourite linux distribution based on python is measurable :] I assumed that I don't have to prove my assumptions because it's common knowledge in general.


I am not much into web development, but my impression is that there's nothing very much innovative in the Python's tools. It seems a lot of the path was already laid by rails and friends, and they did so well that Pythonist implemented similar ideas. That is not to say they are bad frameworks, just that catching up is not a good reason to drop what you know and move to Python.

On the other hand, there are people who don't like to be on the cutting edge. That is true. But then those same people will probably be more comfortable with PHP: it's been around a lot longer (and they probably already know it), and there's a lot more support and web tools around.

So Python for web development neither attracts those on the cutting edge nor the conservative people. I imagine that people who are in the middle may like it, but it's not something you can advertise much about.

Of course I can be completely off track: as I said I am not much into web development.

(incidentally: I am sad Ruby doesn't seem to have much adoption in the scientific community which seem to be mostly behind Python... sigh... ^_^)


I believe twisted was somewhat innovative in its space a few years ago, if you are willing to put it in the web development category.


I'm PHP all the way usually and I get a LOT of flak for that, but it works out fine for me and, given the exodus to Ruby/Python over the past few years, I'm picking up a load of work that people are finally realising they can't hand off to that schoolkid for $50. It would take a lot more than comparable or merely better tools for me to make the jump.

If you want a bad analogy (and I KNOW you do!), I want a VHS->DVD jump rather than DVD->Blu ray else it's just not worth my while.


I think the biggest issue facing Python as a web development tool is deployment. Among the people I've spoken with, they like Python and the frameworks but often fall back to PHP because the deployment is so simple (possibly to a fault). Doesn't stop me from using it, but i would gather it's a significant factor for a lot of newcomers.


This couldn't be more true. If you haven't already, you should check out Ian Bicking's Silver Lining. Its not an immediate solution, but its certainly an exciting development in this space for Python.

http://cloudsilverlining.org/


I haven't played with Silver Lining yet due to its infancy, but I personally considered the problem solved with virtualenv and fabric, though my deployments aren't exactly complicated anyway.


Um, but look at ruby - it faces exactly same deployment problems if I'm correct, and it didn't stop it's adoption in web development at least.


A strong stack doesn't mean quality. Django for example lacks on quality and maturity. There are great tools like cucumber, rspec and rails who delivery a dynamic and productive environment, they are ages ahead python based solutions.


I'm curious why you think Django lacks quality and maturity. Your specific examples seem to be about testing, but Django emphasizes unit tests quite a bit. If you're looking for BDD specifically, there is lettuce (http://lettuce.it), freshen (http://github.com/rlisagor/freshen), and pyccuracy (http://wiki.github.com/heynemann/pyccuracy/).


Unit testing... I think you missed what the real problem with django is about, or just your projects don't demand to use that kind of features etc.

How about something simple like pretending there we have django 1.0 (not 1.2 which is quite new), and let us try to connect to 3 databases at once with django's ORM?

Oh, we are screwed it can't do that. Ok, then lets try to swap out our ORM to sqlalchemy.... crap all nice plugins broke, admin panel doesn't work etc. This is why REALLY django lack quality and maturity - it's components are not versatile enough - and in my book this is a very serious issue because if my requirements are diffrent from what django makers assumed then I'm doomed. This is why people mention other (in my opinion superior, but not that easy to use), solutions to the problem. My point is - majority of people fail to notice such serious flaws like unability to use more than 1DB at once (yes i know it got finally fixed after few years). I'd rather use one tool that should cover my needs than be forced to switch them because they don't fit the needs of project.


Wow, stack the deck much?

If your application required connection to three databases concurrently, then you almost certainly wouldn't have chosen Django 1.0 as your application development platform.

If connecting to multiple databases is a new requirement, then you're likely going to have to change much of your code / environment anyway, no matter whether or not you're using Django 1.0, 1.2, or Rails.

Also, for what it's worth, the OP doesn't mention just Django, it mentions Pylons, Repoze, etc. Django isn't the only Python tool in the arsenal.

Besides that, if you swap out your database abstraction layer in almost any language that I know of, you're going to have bigger problems than 'finding new plug-ins'. I can't think of a single ORM that is replaceable to another without significant retooling above the model layer. Most notably though, since you cite it as an example, losing the admin panel can hardly be considered as too big a deal, since the last time I looked at Rails, Symfony or Cake, none of them even offered that as a feature.

As for your last sentence: I'd rather use one tool that should cover my needs than be forced to switch them because they don't fit the needs of project.

Can I safely assume that you're building everything in Java then? I mean, honestly, we pick the right tool for the job, don't we? We shouldn't be building things in Django because it's all we know, just as we shouldn't be building things in Ruby/Rails for that reason. Take a look at the challenges and figure out what makes sense.

If you don't know wha the challenges are before you start developing (they're often surprising), then just start iterating until you figure out what they are. In this case, whatever framework or development platform lets you iterate the most quickly is the winner, whatever language it happens to be written in.


How about you read that again, I think you misunderstood my point - or I was uncler, since english is not my native language. And i'm the OP in case you didn't notice that;-)

"I'm curious why you think Django lacks quality and maturity." - This is what he wrote, so i gave him main reason why django is not the tool for me.

Which are perfectly valid in my opinion. And no - with sqlalchemys design, it DOES NOT require you to change your code if you just need to use few models with other databases - the change was about 20 lines of code in my case. Which i take would be not possible at all with django 1.0. You are right about "right tool for the job", for the kind of work I do, glue frameworks like pylons or bfg are a lot better choice - it's really way harder to corner me with some requirement that this stack can't handle.

And as for challenges, like I said - business conditions changed and I had to connect to 3 db's at once, no problems at all - if one chooses his tools very carefully in advance that can save a lot of headache later. Like I said, sorry for confusing you.

You can't predict everything that client could need/forgot to mention, so the more versatile your toolbox is the better.


That's the point, why work with alternatives if you can bear all your stack with great dynamic and fast frameworks. Endorsing pycurracy is the worst part of your argument, this framework is terrible, its codebase is far away from mature, its TOTALY regex based what makes the testing experience painful.

I love python for many reasons, but I ain't convinced yet for web and tests


Actually, Django is just popular for python. But i consider other tools from the list to be a lot better solution. It's unfair to judge whole ecosystem just based on one framework - which is completly different to what others do.


I disagree that Django is lacking in quality, and I maintain that Python itself is one of the best things about Django.

I have experience with both Rails and Django. After careful deliberation, we chose to use Django over Rails in part because of Python and its extremely diverse community. Ruby on Rails is a cutting-edge framework, but the Python community was what really convinced us to use Django.


Yes, ActiveRecord is a joy to use, while Django's ORM is years behind.

Right. No.


I've down-voted this, but feel I owe you an explanation. In short - I have no idea what you're saying.

There are two cases - either I know about ActiveRecord and Django's ORM, and therefore I am in a position to assess what you say, or I don't.

In the first case you've told me nothing except your opinion, and you've added no information. That would be worth a down-vote.

In the second case, not knowing about these things I have no idea what your opinion is. I'm assuming there's an air of sarcasm, but I can't tell. Without expressing youself clearly and positively it can be hard to tell. Again, you've added no information. That would be worth a down-vote.

And that's why.


I think I was quite clear that there is a sarcasm, but oh well.

I responded to a vague comment which asserted that Django is "years behind", without any substantial proof, apart from "it lacks quality and maturity". Compared to that, I gave a lot more information, expressing my opinion on why that comment is far from the truth.

Granted, I didn't go into details - I did mention a specific part of both frameworks, where I think one framework (Django) has a significant advantage over the other.

But by all means, downrate me, but then please do that for the comment I responded to, which didn't add even as little information as I did, and only expressed his opinion without any specifics.


I think you misunderstand. I didn't downvote you because your comment contained no concrete information. I downvoted you because I couldn't work out what you were saying, and there was no concrete information (in either interpretation (to me)). Sarcasm doesn't convey well in the written medium, especially when there are multiple cultures in the readership.

You complain about an assertion without support, and then you appear (to me) to do the same.

It's the "double whammy". If you make a bald assertion without support then - if I care - I'll ask for your reasons and evidence, but I won't downvote for that alone.

You said:

  > I gave a lot more information, expressing my
  > opinion on why that comment is far from the truth.
Not as far as I can tell. You may think you explained, but to me, without your obviously extensive knowledge and experience, you didn't.

You say:

  > I did mention a specific part of both frameworks,
That wasn't clear to me at all.

If you had said something like:

  > I disagree - consider component/feature X.  It seems
  > to me that Django is *way* ahead in that regard, and
  > for some applications that's far more important.
... then you'd've got an instant up-vote for me. Useful, direct and concrete information without confrontation.

I hope that makes it clearer. You may disagree with that policy, but it's what I've gravitated to after some years of being here.


S P E E D




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: