Django 受欢迎的历史

发布于 2024-08-07 02:29:21 字数 262 浏览 4 评论 0原文

哪些事件使得 Django 成为最流行的 Python Web 框架......并且仍然如此?尽管存在其他几个框架。

注意:这个问题既不是争论性的,也不是对抗性的。我只是要求(客观的)导致其真正流行的“事件顺序”。意识到软件接受的动态,我不打算让任何人就技术优势进行争论。

What sequence of events made Django the most popular Python web framework .. and still so? Even though several other frameworks exist.

Note: This question is neither argumentative nor confrontational. I merely asked for (objective) "the sequence of events" that lead to its actual popularity. Being aware of the dynamics of software acceptance, I am not intending anyone to get into arguments over technical superiority.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

对不⑦ 2024-08-14 02:29:21

当 Django 在 2005 年出现时,许多 Python Web 框架就已经存在了——事实上,那个时候,这个笑话已经流传开来,Python 是“一种 Web 框架比关键字还多的语言”(Guido 拒绝了我在 Py3k 中修复这个问题的提议,添加很多很多关键字)。现在,“django”本身作为搜索词有点含糊(它也是一位流行吉他手的名字,他的生活启发了伍迪艾伦电影等),但在搜索中添加“python”以删除这些其他含义您可以在 这张图与另一个经典的 Python Web 框架 Zope 相比,它的相对受欢迎程度如何变化。季度与季度之间的增长基本稳定,2008 年第二季度初出现了令人惊讶的大幅增长……这恰好与 Google 发布 App Engine 的日期重合(在这种情况下不可能证明因果关系,但巧合的是至少有趣;-)。

App Engine 基本上排除了任何深度依赖于自定义 C 编码组件或本质上需要“高度相关”功能的 Python Web 框架;在仅使用纯 Python 代码即可运行良好的工具中,Django 可能是 App Engine 最直接、最明显支持的工具。然而,这只是一个推动,增加了 Django 潜在的健康增长趋势。对这种趋势的解释(实际上也是对 App Engine 团队和用户如此大力支持 Django 的决定的解释)必须在于 Django 本身固有的特征。

与 Pylons、TurboGears、Werkzeug 等轻量级(尤其是后者是我最喜欢的;-),更透明,并且允许更轻松地换入和换出特定组件(ORM、模板等)。然而,Django 的受欢迎程度告诉我们,对于大多数对开发服务器端网站和应用程序感兴趣的人来说,这些 Django 设计选择都得到了积极的认可:Django 被视为一个非常丰富且集成良好的框架(并且它确实有很多附加功能)并贡献了“插件”,但这些更多的是其优势的结果而不是原因)。

易于上手、自动的“管理页面”等等——以及 Django可以可以用来制作真正丰富和复杂的网站/应用程序并适应特殊或独特的需求,大量的技能和一些工作——可能是“杀手级功能”。为了最好地使用 Werkzeug,您需要了解 HTTP 和 WSGI,并选择并集成您最喜欢的存储和模板——基于 Python 的网站和应用程序的开发人员(从某种意义上来说,Rails 的用户或 Rails 的用户)甚至更流行的 PHP!-) 正在“用他们的思想投票”来选择一个环境,在这个环境中,他们不一定需要做任何这些事情,但可以主要关注他们的应用程序领域。我不得不承认他们可能确实有道理;-)。

Many Python web frameworks already existed when Django appeared in 2005 -- indeed, the joke was already going around, by then, that Python is "the language with more web frameworks than keywords" (and Guido rejected my proposal to fix that in Py3k by adding many, many more keywords). Now "django" per se is a bit ambiguous as a search term (it's also the name of a popular guitar player whose life inspired a Woody Allen movie, etc, etc), nevertheless adding "python" to the search to remove those other meanings you can see e.g. in this graph how its relative popularity changed in comparison to another classic Python web framework, Zope. Mostly steady growth quarter over quarter, with a huge surprising jump up at the start of Q2 2008... which just happens to coincide with the date in which Google announced App Engine (it's impossible to prove causation in such case, but the coincidence is at least interesting;-).

App Engine essentially rules out any Python web framework that deeply depends on custom C-coded components, or intrinsically require "heavily relational" functionality; out of those that run well with just pure Python code, Django is probably the one that App Engine most directly and visibly supports. However, this was just a boost, adding to Django's underlying healthy growth trend. The explanation for that trend (and indeed for App Engine team and users' decision to support Django so well) must lie in characteristics that are intrinsic to Django itself.

Django is sometimes criticized (including by... yours truly;-) for being "too magical" or "too monolithic", compared to alternatives such as Pylons, TurboGears, Werkzeug, &c, which are lighter-weight (esp. the latter, my favorite;-), more transparent, and allow easier swapping in and out of specific components (ORM, templating, &c). However, Django's popularity tells us that, for most people interested in developing server-side web sites and apps, these Django design choices are perceived positively: Django's seen as a very rich and well integrated framework (and it does have a lot of add-ons and contributed "plugins", but those are more a consequence than a cause of its ascendancy).

Ease of getting started, automagical "admin pages", and the like -- as well as the fact that Django can be bent to make really rich and complex sites/apps and accommodate peculiar or unique requirements, with much skill and some work -- are probably the "killer features". To use Werkzeug at its best, you need to understand HTTP, and WSGI, and pick and integrate your favorite storage and templating -- developers of Python-based web sites and apps (like, in a sense, users of Rails, or users of even-more-popular PHP!-) are "voting with their mindshare" for an environment in which they need not necessarily do any of that, but can mostly focus on their application domain. I will have to admit that they probably do have a point;-).

杯别 2024-08-14 02:29:21

我认为有几个因素,这些因素的组合大于它们各自权重的总和。

其中一个只是时机问题:Django 的出现恰逢 Rails 炒作的第一波浪潮正在兴起,因此它立即被描述为“Python 对 Rails 的回答”。这使得该项目几乎从一开始就吸引了不少眼球。事实上,Adrian 参加了在芝加哥举行的“Snakes and Rubies”聚会,并参加了有关 Rails 和 Django 的并行讨论,为此做出了很大贡献。

另一个因素是 Django 一直都是单包安装(好吧,不完全是:你仍然需要一个数据库适配器,除非你使用的是 Python 2.5+ 并使用 SQLite,但已经足够接近了)。非 Zope 替代方案都专注于将组件选择权交给开发人员,需要做更多的工作才能完成基本教程:您需要寻找一个 ORM,一个模板语言等等,然后将它们全部安装和配置。尽管这些年来情况已经好多了,但我认为挥之不去的记忆仍然有影响。

Django 带着文档(如果我自己可以这么说的话)走出大门,远远高于开源项目的通常标准,并且随着时间的推移只会变得更好。尽管本教程有很多缺点,但它触及了 Django 有用的许多要点,并且文档的其余部分始终具有良好的质量,根据需要混合了 API 参考和重要的“如何做”部分。这会产生良好的开箱即用体验,并有助于改善教程后的学习曲线(这一直困扰着 Zope)。

我还认为,有一种看法(正确或错误),即 Pylons 或 Werkzeug 对于已经了解 WSGI 和 Python Web 生态系统的经验丰富的开发人员来说确实更好;事实上,我认为,它们往往是采用您现有的最喜欢的库并将它们插入在一起的强有力的选择,这就是原因,并且可能会促使一些新人转向 Django 的集成方法。当然,另一面是,很多在尝试 Django 之前最好预先学习更多知识的人不会这样做;)

最后,我认为对于 Django 的营销方式有一些话要说,也就是说,它确实没有很长一段时间被推向市场,或者至少不像 Rails 那样被推向市场。在 Django 1.0 落地之前,“营销”工作主要包括人们写博客(并且有一些值得注意的事件,人们被要求稍微降低一点)、PyCon 上的演讲,然后主要只是改进框架,用它构建很酷的东西并让结果说明一切。当然,现在,在后 1.0 世界中,我们有 DSF 和 DjangoCon 以及以业务为导向的顾问进行培训课程,还有大量书籍等等,但这一切仍然很新。

我预计将会出现强烈反对,就像 Rails 一样,事实上我认为它已经酝酿了一段时间并且已经开始了。但到目前为止,我认为我在这里列出的因素至少是 Django 自首次发布以来受欢迎程度持续稳定增长的主要因素。

I think there were a few factors, the combination of which was greater than the sum of their individual weights.

One is simply timing: Django appeared right as the first big wave of Rails hype was ramping up, and so it was immediately portrayed as being sort of "Python's answer to Rails". That resulted in a not-insignificant number of eyeballs on the project almost from the start. The fact that Adrian was at the "Snakes and Rubies" meetup in Chicago and got to take part in side-by-side talks about Rails and Django did a lot for that.

Another factor is that Django is and always has been a single-package install (well, not quite: you still need a database adapter, unless you're on Python 2.5+ and using SQLite, but close enough). The non-Zope alternatives, which all focused on leaving component choices in the developer's hands, required quite a bit more work just to get to the point where you could do a basic tutorial: you'd need to go hunting down an ORM, a template language, etc., etc. and get them all installed and configured. Though that's gotten much better over the years, I think the lingering memory of that still has an effect.

And Django came out of the gate with documentation that (if I may say so myself) was far above the usual standard for open-source projects, and has only gotten better over time. The tutorial, for all its many faults, hits on a number of the high points that make Django useful, and the remainder of the documentation has always been of good quality, mixing both API reference and important "how to" bits as needed. This produces a good out-of-the-box experience and helps with the post-tutorial learning curve (something which has always plagued Zope).

I also think there's a perception -- rightly or wrongly -- that, say, Pylons or Werkzeug really are better for experienced developers who already know their way around WSGI and the Python web ecosystem; the fact that they tend to be strong choices for taking your existing favorite libraries and plugging them together is the source of this, I think, and perhaps nudges some newer folks over toward Django's integrated approach. The flip side, of course, is that a lot of people who'd be better off learning more up-front before trying Django don't do that ;)

Finally, I think there's something to be said for the way Django's been marketed, which is to say that it really wasn't marketed for a long time, or at least not in the sense that, say, Rails was marketed. Until Django 1.0 landed, the "marketing" effort mostly consisted of people blogging (and there were some notable incidents where people were asked to tone it down a bit), talks at PyCon and then mostly just improving the framework, building cool things with it and letting the results speak for themselves. Now, of course, in the post-1.0 world we have the DSF and DjangoCon and business-oriented consultants doing training sessions and lots of books and all the rest, but that's all still quite new.

I expect that there will be a backlash, just as there's been with Rails, and in fact I think it's been brewing for a while and has already started. But up until now I think the factors I've listed here are at least the major ones behind the consistent, steady growth in popularity Django has seen since its initial release.

青衫儰鉨ミ守葔 2024-08-14 02:29:21

我可以想到 Django 受欢迎的三个原因,据我所知,其他答案中只解决了其中一个原因:

  1. 文档。它结构良好、全面,并且适合多种技能水平。

  2. 设计。管理、错误页面和项目站点的视觉设计远远高于大多数开源项目的设计水平。设计

  3. 社区支持。从 World Online 团队开始,Django 很早就招募了一些有影响力的布道者。我不确定您能否夸大 Jeff Croft 的 Django for Non-Developers(我认为这就是标题)等博客文章的重要性。

I can think of three reasons for Django's popularity, only one of which has been addressed in other answers as far as I see:

  1. Documentation. It's well structured, comprehensive, and approachable from a number of skill levels.

  2. Design. The visual design of the admin, error pages and the project site are far above the level of design seen with most open source projects.

  3. Community support. Starting with the team at World Online, Django picked up some influencial evangelists early on. I'm not sure you can over state the importance of blog posts like Jeff Croft's Django for Non-Developers (I think that was the title).

憧憬巴黎街头的黎明 2024-08-14 02:29:21

“我个人最喜欢的,并且我希望它会在很长一段时间内一直是我个人最喜欢的,是一个名为 Django 的东西” - Guido Van Rossum 在 FLOSS 每周第 11 集,2006 年 8 月 4 日播出

[点击此处](收听采访的最后三分之一)

您认为这可能有帮助吗?或者至少是 Google 选择它作为 AppEngine 的原因?

当然,django 社区(包括开发人员)做了很多正确的事情。例如(链接中的一些分析):

提高模块化:
[点击此处]

很棒的文档
点击此处

社区还有一些东西让人们想要我还没有指出的贡献:
单击此处

当然,所有这些都导致 Django 成为异常值:
单击此处

Django 的受欢迎程度是毫无疑问的。

"My personal favorite, and I expect that that will remain a personal favorite for a long time, is something named Django" - Guido Van Rossum on FLOSS weekly episode 11, aired aug 4th 2006

[Click Here] (listen to last third of the interview)

Think this might have helped? or at least the reason why Google chose it for AppEngine?

of course, the django community (including devs) are doing alot of things right. For example (Some analysis in the links):

Improving modularity:
[Click Here]

kick ass documentation
Click Here

There is also something about the community that gets people to want to contribute which I've yet to put my finger on:
Click Here

Of course, all that lead to Django being an outlier:
Click Here

There is no question about Django's popularity.

丑疤怪 2024-08-14 02:29:21

就我而言,我买了《TurboGears》这本书,并努力克服其不一致和随意的解释方式。
然后我得到了 Django 书,瞧!我的第一个付费项目是在完成本书中的示例项目时创建的。再加上在线文档,这笔交易就达成了。
对我来说,这很简单:文档、文档、文档。

In my case, I'd bought the TurboGears book, and struggled through its inconsistencies and haphazard route to explaining things.
Then I got the Django book, and voila! My first for-pay project was created while working my way through the sample project in the book. That plus the online documentation sealed the deal.
For me, it was simple: Documentation, documentation, documentation.

白云不回头 2024-08-14 02:29:21

我注意到它经常被宣传为 Python 中的 Ruby on Rails 等价物。它还与 Google 连接(Google 托管 Django 事件,并在其 App Engine 中支持它)。得到谷歌认可的网络框架必须有所作为。 :)

I noticed that it often got promoted as being the Ruby on Rails equivalent in Python. It's also has a connection to Google (Google hosts Django events, and supports it in their App Engine). A web framework being endorsed by Google has to amount for something. :)

一张白纸 2024-08-14 02:29:21

至少对我来说,一个重要的因素是 Simon Willison 和 Adrian Holovaty 以及后来的 Jeff Croft 已经是“Web 标准”领域的知名参与者。

这不仅是一个质量印记,而且还使 Django 非常适合网络,因为它尊重 HTTP、标记,甚至是来自 PHP 的人习惯的快速而肮脏的“打印调试”工作方式。

我在这里可能是严重错误的,没有数据支持这一点,但我觉得 Django 从来自 PHP 的人们那里获得了更多的吸引力,而不是 Rails,后者从 Java/.NET 获得了很多转换。

正如其他人已经指出的那样,该文档远远高于平均水平。据我所知,这是我见过的最好的。

At least for me, an important factor was that Simon Willison and Adrian Holovaty were already well known players in the "Web Standards" scene, as well as Jeff Croft later.

That wasn't only a quality seal, but also made Django very web-friendly, with its respect for HTTP, markup, and even the quick and dirty, "print debugging" way of working that people coming from PHP were used to.

I might be heavily wrong here, no data to back this up, but I feel that Django gained a lot more traction from people coming from PHP, as opposed to Rails which got a lot of conversions from Java/.NET.

As others already noted, the documentation is way above average. The best I've seen, as far as I recall.

还如梦归 2024-08-14 02:29:21

事实上,有几个大容量网站已经在使用 Django(即 lawrence.com 等...) - 即使到了 0.96 天 - 帮助我说服管理层它可以安全使用。像 Pylons 和 Turbogears 这样的东西确实没有。

The fact that there were several high volume sites already using Django (i.e. lawrence.com etc...) - even by the 0.96 days - helped me convince management it was safe to use. Things like Pylons and Turbogears really did not have that.

混浊又暗下来 2024-08-14 02:29:21

至于 Django 随着时间的推移的受欢迎程度(您的问题标题的字面意思,如果不是您的实际问题),请查看 谷歌趋势

As for Django's popularity over time (the literal meaning of your question title, if not quite your actual question), have a look at the google trend.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文