5 ms·
Doesn't making a new X because it's easy violate the "There should be one-- and preferably only one --obvious way to do it" rule? From the way the Python commu
by wycats 15y ago
Doesn't making a new X because it's easy violate the "There should be one-- and preferably only one --obvious way to do it" rule?
From the way the Python community talks about its strengths, I'd expect there to be pressure against creating a new X just because you can.
- anthonyb 15y agoLanguage features and third party libraries are different things though.
- nerfhammer 15y agoarguably, arguably all the 'interfaces' needed to make code do a web site end up being a domain-specific language
- reuser 15y ago"Arguably" every API ever written is a domain-specific language.
- fennecfoxen 15y agoRumor (and by rumor I mean a couple of opinionated coworkers) says: the Python community has a lot of cases of "This project didn't have the feature I needed and has a couple of problems, so I went and wrote a whole new one with a different set of problems." By contrast, the Ruby community settles down on one, maybe two things as the primary way to do it. This article lends weight to the rumor.
- anthonyb 15y agoIt works the way that most open source third party libraries do: There'll initially be some hacked together stuff, then a couple of contenders will emerge, copying each other's features. After the dust has settled there'll be a few decent libraries. Examples that I can think of off the top of my head are freshen/lettuce/behave, there were also a bunch of XML parsers leading into elementree (which is now in the standard library). In Ruby you have Rails, Sinatra, and a couple of other frameworks, as well as Mongrel2 and friends to run it all.
- hello_moto 15y agoYep, except nobody cares about "the rest" and Rails becomes almost de-facto choice for web-app with Sinatra trailing for the so-called "API" project (whether that choices make sense or not is not of my concern, in Java, API == XYZService.java with a facade skeleton implementation utilizing JAX-WS [SOAP, WS-*], JAX-RS [RESTful], or Servlet (Web) all deployable easily in 1 JAR).
- anthonyb 15y agoWell, ditto with Python and Django these days. There are other frameworks, each with their own strengths (werkzeug, web.py, bottle, etc.), but Django is the default choice. Back when this article was written there were at least five or six Python frameworks, all competing. If Django ever starts sucking, I'm sure one of them, or a completely new one, will step up to take it's place. Ditto for Rails. All part of the open-source circle of life :)
- DasIch 15y agoWhile some people may choose Django per default, there are also quite a lot of people that will choose Flask/Werkzeug, Pyramid or one of the less popular frameworks. The Python web development community is very much divided into different, although largely cooperating, groups. Django is definitely not the default choice when it comes to web development in Python and I doubt anyone seriously involved in the Django project would ever claim that.
- anthonyb 15y agoI would disagree with that fairly strongly. While there are other choices for specific niches, for most web development Django is the first thing that most Python developers will look at, mainly due to it's user base and libraries.
- tbatterii 15y agoi would say django is the default choice for "yet another website" with some application logic sprinkled in. I wouldn't use it for anything other than a website serving up dynamic pages. I also feel I am fortunate to not have to build those websites anymore.
- hello_moto 15y agoSeems like it too. I like Python language because whenever I read them I can guess/kind of know what it's trying to do (unlike Ruby) despite my short learning session of Byte of Python. But when it comes to web-framework, boy... this one is tough. I lost count on how many Python web-framework or web-library out there (feel free to debate the semantic of Flask vs Bottle vs Django vs Pylons vs Pyramid vs Plone vs Zope).
- unimpressive 15y agoIf you read to the end of the article it tells you (Implies) that making Yet Another X is a bad idea, and that you should really go work on an already established project. EDIT: Or rather, skimmed to the end of the article. (Like I did because I have no interest in building a python web framework and thought the title was sarcastic.)
- reactor 15y ago"There should one - and preferably only one - obvious way to do it" is applicable only at language level, not at application level. These are just another applications and one cannot enforce a rule that "there should be only one application/solution for a problem at hand", is it ?
- FraaJad 15y agoThere is a difference between reducing entropy in core language vs individual developers' freedom to build things (libs, frameworks) as they see fit. Your comment is surprising given your expertise. Guess you are not immune to taking pot shots at Python.
- DasIch 15y agoThis rule applies to the language and APIs on a project level but it doesn't extend beyond that. If you look at the web frameworks that are available or libraries such as requests you also see why this is a very good thing.
- reuser 15y agoThere is no Pope of Python to tell you "you can't write new code to do xyz, because someone else is already working on that." How would that be enforced? Would someone's Python privileges be taken away? What if the person working on xyz was inactive for a while? What if their xyz had a problem and they didn't want to fix it? The "obvious way to do it" does not and was never, ever intended to bind anyone's hands from writing a library or app similar to something someone else wrote. It is a principle of language design, that it should give SOME consideration to readability and learnability rather than giving 100% of everything to nifty obscure features that help you write awesomely clever executable line noise.