网络框架和可用的库:选择 Node.js 而不是 Python 是一个勇敢的举动吗? [英] Web Frameworks & Available Libraries: Is it a brave move to opt for Node.js instead of Python?

查看:41
本文介绍了网络框架和可用的库:选择 Node.js 而不是 Python 是一个勇敢的举动吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我真正开始学习网络编程语言之前,我现在有很长一段时间(一两个月);所以我还在发愁要学什么语言.

I have quite sometime now (a month or two) before I can actually start learning a web programming language; so I am still worrying about what language to learn.

无论我选择哪种编程语言,我还必须在学习该语言的同时学习 JavaScript,因为它是编写客户端脚本的必经之路.

Whatever programming language I choose, I'd also have to learn JavaScript alongside that language as it's the go to for client-side scripting.

我在看: (1) Python、Ruby、JavaScript(Node.js -- 服务器端和 jQuery -- 客户端);(2) DBMS - PostgreSQL (3) 无论如何我都会学习 C/C++(但在我学习了上述提到的高级编程语言之后).

I am looking at: (1) Python, Ruby, JavaScript (Node.js -- server-side & jQuery -- client-side); (2) DBMS - PostgreSQL (3) I am going to learn C/C++ anyway (but after I learn a high-level programming language among those mentioned above).

那么,问题是,选择 Node.js/JavaScript 进行服务器端编程是否勇敢?(从某种意义上说,勇敢,学习 Python 会更容易和好得多,而您只是通过选择 Node.js 来尝试变得勇敢/愚蠢)

So, the question is, is it a brave move to choose Node.js/JavaScript for server-side programming? (brave in the sense, learning Python would be a lot easier and good, and you're only trying to be brave/foolish by choosing Node.js)

需要考虑的要点:

  • 我相信 Python、Ruby 以及所有这些都会有美好的未来.Node.js 也会享受同样的待遇吗?你认为?(长期计划)

  • I am sure Python, Ruby and all will have a great future. Will Node.js enjoy the same too? Do you think? (long-term plans)

可用性网络框架:有没有像 Django(或 Pylons)一样成熟和完整的 Node.js 框架?

Availability web frameworks: Is there a framework for Node.js that is as mature and complete as Django (or Pylons)?

来自 SO 社区和网络的支持可用性:也就是说,如果出现问题并且我需要帮助,我能否确定我会从 SO 社区获得一些好的答复?我的意思是,如果是 Python、C/C++ 等,我相信我会.

Availability of support from SO community and the web: that is, can I be sure that I would get a few good replies from the SO community if something goes wrong and I need help? I mean, I am sure that i would, if it is Python, C/C++ etc.

Node.js 的编码速度是否比 Python 慢?

is Node.js too slow to code than Python?

为什么我什至在考虑 Node.js?

  • 我读过关于 SO 的评论/答案,说 Node.js 比 Python、Ruby 或 PHP 等其他高级语言快得多.抱歉,正如我所说,这不是我的观点[阅读].
  • 如果我选择 Node.js,我基本上只需要学习一种编程语言——JavaScript.(我不是在找工作,我想开发一个(大型?)网络应用程序,如社交网络或照片共享服务)

[我相信任何人都会有这些问题,所以这并不完全是主观的]

推荐答案

1) 我个人喜欢 (!) Ruby,我认为它是可以编写代码的最漂亮的语言,但我也喜欢 Node.js 的速度和 JavaScript.幸运的是,我可以将我喜欢的两者结合起来,答案是 CoffeeScript(它具有 Ruby/Python 编程风格,但可以编译为纯 JavaScript).注意:你应该正确地学习 JavaScript,然后才传递给 CoffeeScript.

1) I personally love (!) Ruby, I think it's the most beautiful language one can possibly code in, but I also love the speed of Node.js and JavaScript. Fortunately I can combine what I love about the two, the answer is CoffeeScript (it has a Ruby / Python style of programming, but it compiles to plain JavaScript). Note: you should learn JavaScript properly and only then pass to CoffeeScript.

2) 我不会使用 PostgreSQL,因为我想使用更快速"的东西,比如 MongoDB(DB 上的 JavaScript 也是 - 如果你只知道 SQL,学习 MongoDB 比 CouchDB 更容易)或 CouchDB(这是一个非常惊人的数据库,也在 JavaScript 中 - 它默认支持同步).但是,如果您想使用 PostgreSQL,则有相应的驱动程序.

2) I wouldn't use PostgreSQL, because I would like use something more "speedy" like MongoDB (JavaScript on the DB also - it's easier to learn MongoDB than CouchDB if you only know SQL) or CouchDB (which is a pretty amazing db, also in JavaScript - it supports synchronization by default). However if you want to use PostgreSQL there are drivers for it.

3) 很高兴您计划学习 C/C++,因为每种语言都是建立在此之上的.您可以为 Ruby、Node 或 Python 编写 C/C++ 模块.

3) It's great that you are planning on learning C/C++, since every language is built on top of that. You could write C/C++ modules for Ruby, Node or Python.

回答您的(额外)3 分:

1) 有一个非常好的 web 框架叫做 Express,它的灵感来自于 Sinatra (Ruby).还有其他框架,但我相信 Express 是最好的(您甚至可以在它之上构建自己的框架等,它是灵活的").

1) There is a really good web framework called Express, which is highly inspired by Sinatra (Ruby). There are also other frameworks, but I believe Express is the best there is (you can even build your own framework on top of it etc, it's "flexible").

2) 我实际上订阅了 SO 上的node.js"标签,我可以说,如果你发布一个有效的问题,你会在 1 分钟到 24 小时内得到答案.不仅如此,只需加入 Node 的 IRC 频道(#node.js #express #socket.io #nodejitsu)并查看那里的活动.我可以向你保证,在我学习的过程中,我没有任何悬而未决的问题(真的,这些人非常有帮助).

2) I am actually subscribed to the "node.js" tag on SO and I can say that if you post a valid question you'll get an answer from 1 minute to 24h. More than that, just join the IRC channels for Node ( #node.js #express #socket.io #nodejitsu ) and checkout the activity over there. I can assure you while I was learning, I didn't have any unanswered question (for real, the guys are extremely helpful).

3) 不,一旦你习惯了,情况就不是这样了.在 Node.js(不仅是 Erlang、Twisted 或 EventMachine 也是如此)中编码时,您唯一需要习惯的是异步编程方式.此外,几乎所有内容都有大量模块和帮助程序(这样也可以加快您的编码速度,您不必为所有内容重新发明轮子 - 您也可以在前端使用一些 JS 代码).

3) No, that's not the case once you get used to it. The only thing you need to get used to when coding in Node.js (not only, Erlang, Twisted or EventMachine also) is the asynchronous way of programming. Also there are a ton of modules and helpers for almost everything (so that can speed up your coding too, you don't have to reinvent the wheel for everything - you can also use some JS code for the frontend).

我可以根据自己的经验告诉您,一旦您习惯了异步编程风格(使用回调等),就再也没有什么可以让您慢下来了.

I can tell you from my own experience that once you get used to the async style of programming (with callbacks etc) there's nothing that can slow you down anymore.

额外

虽然 Node.js 还很年轻(2009 年),但 Github、Linkedin、Yahoo、37signals、Learnboost、Trello 都在使用它,所以你不会那么勇敢:P

While Node.js is kind of young (2009), Github, Linkedin, Yahoo, 37signals, Learnboost, Trello are using it, so you won't be that brave :P

这篇关于网络框架和可用的库:选择 Node.js 而不是 Python 是一个勇敢的举动吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆