如果我打算使用 Node,那么直接跳到像 Zappa 这样的 CoffeeScript 框架是否是一个错误?
自 00 年代初以来,我就没有使用太多 JavaScript,并且我开始发现我当前的应用程序非常适合 Node.js。但作为一名 Ruby 开发人员,Coffeescript 看起来更适合我。但我担心,如果我直接跳入像 Zappa 这样的框架,而没有花费任何时间使用 Node.js,那么我的理解中将会出现一些漏洞。这是一种合理的恐惧吗?
I haven't used much JavaScript since the early 00s, and I'm starting to see that my current app is well suited for Node.js. But as a ruby developer, coffeescript looks like it will be more my forte. But I'm concerned that if I jump right into a framework like Zappa without having spent any time with bare bones Node.js, that there will be some holes in my understanding. Is this a valid fear?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在某种程度上是的。 Zappa 是一个非常新的框架,正在非常活跃的开发中。我在七月份用它编写了一个应用程序,从那时起该框架经历了两次向后不兼容的更新。在这样的环境中,了解框架在幕后所做的事情通常会很有帮助。
此外,由于咖啡脚本允许您混合 JavaScript 库(Zappa 本身就是这样做的),因此他们的文档将提供 JavaScript 示例 - 因此您必须能够流利地使用 JavaScript。
另一方面,Node 本身的经验并不是那么重要,因为 Node 提供了相当少的 API,其中大部分是由 Express.js(也是 Zappa 的一个组件)很好地抽象的。您需要了解的有关 Node 的大部分内容都可以在一个下午内学会。
TL;DR 不完全了解咖啡和 JS 可能是一个问题,对 Node 的了解也不多。
To a certain extent yes. Zappa is a very new framework in very active development. I wrote an app in it in July and since then the framework has undergone two backwards incompatible updates. In an environment like that it is often helpful to be able to understand what the framework is doing behind the scenes.
Also since coffee script allows you to mix in JavaScript libraries (and Zappa itself does that) their documentation will provide examples in JavaScript - so you have to be able to speak JavaScript fluently.
On the other hand, experience with Node itself is not that essential, since Node provides a rather minimal API, which is for the most part well abstracted by Express.js (also a component of Zappa). Most of what you need to know about Node can be learned in an afternoon.
TL;DR Not knowing coffee and JS perfectly may be a problem, not knowing Node not that much.
如果您所说的“Ruby 开发人员”是指“Rails 开发人员”,那么 Zappa 可能是您实现的最短的飞跃。它提供了很多“魔力”,就像 Rails 所做的那样。这在某些方面是好的(执行传统的 Web 应用程序需要更少的代码),但在其他方面则不好(很难弄清楚事情发生在哪里,例如在哪里设置了特定的 HTTP 标头)。
那么,在不了解 Ruby 的核心 HTTP 库或 Rack 的情况下,是否有可能成为一名优秀的 Rails 开发人员呢?当然。同样,即使不了解 Node 的 HTTP 库或 Connect/Express,您也可能成为一名优秀的 Zappa 开发人员。我预计随着 Zappa 的成熟及其文档的扩展,这一点将变得更加真实。
If by "Ruby developer" you mean "Rails developer," Zappa may be the shortest leap for you to make. It provides a lot of "magic," the way Rails does. That's good in some ways (it takes less code to execute a conventional web app), and bad in others (it can be hard to figure out where things are happening, e.g. where is a particular HTTP header being set).
So is it possible to be a good Rails developer without knowing Ruby's core HTTP library, or Rack? Sure. And similarly, you can probably be a good Zappa developer without learning much about Node's HTTP library, or Connect/Express. I expect that'll become more true as Zappa matures and its documentation expands.