javascript Node.js/Express.j 或 Ruby on Rails 适合绝对初学者

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14844812/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 22:44:15  来源:igfitidea点击:

Node.js/Express.j or Ruby on Rails for an ABSOLUTE beginner

javascriptruby-on-railsnode.jsexpress

提问by Cptobvious

I had asked a question previouslyregarding the use of Javascript or Ruby on Rails for the development of web apps and got some very good advice from maericswhich basically boiled down to Javascript for Frontend/Smaller apps, RoR for service-side/larger apps (Groupon scope).

我之前曾问过一个关于使用 Javascript 或 Ruby on Rails 开发 Web 应用程序的问题,并从maerics那里得到了一些非常好的建议,这些建议基本上归结为前端/小型应用程序的 Javascript,服务端/大型应用程序的 RoR( Groupon 范围)。

After a little digging however, I found out about Node.jsand Express.jsSo my decision is basically back at square one.

然而,经过一些挖掘,我发现了Node.jsExpress.js所以我的决定基本上回到了原点

I'm looking for a language I can use to take an idea to a functional stage (again, the scope is something like Groupon or Twitter). I am an absolutebeginner. I know HTML/CSS and a little jquery, but that's about the extent of my knowledge on web technologies.

我正在寻找一种语言,我可以用它来将想法带到功能阶段(同样,范围类似于 Groupon 或 Twitter)。我是一个绝对的初学者。我知道 HTML/CSS 和一点 jquery,但这与我对 Web 技术的了解程度有关。

I've heard about RoR being very easy to learn, or at least pick up, and has a lot of community/support. But Javascript is everywhere, and can be useful for more than just large scale web apps (and I'd be using it anyway if I used RoR), though is far more complex. Seeing as I have no experience in either, I thought I should pick one now and stick to it for the next ~6 months and see how I go.

我听说 RoR 非常容易学习,或者至少是上手,并且有很多社区/支持。但是 Javascript 无处不在,不仅对大型 Web 应用程序有用(如果我使用 RoR,我还是会使用它),尽管它要复杂得多。鉴于我在这两个方面都没有经验,我想我现在应该选择一个并在接下来的 6 个月内坚持下去,看看我会如何。

But can anyone recommend which one to go for?

但是有人可以推荐去哪一个吗?

回答by abject_error

When you asked about Javascript and RoR in your previous question, you effectively asked about Node.js and RoR.

当您在上一个问题中询问 Javascript 和 RoR 时,您实际上是在询问 Node.js 和 RoR。

If you are building a commercial/enterprise level application, stick with RoR. There are way more resources, bigger communities, relatively stable releases, and you can easily find good developers with RoR experience.

如果您正在构建商业/企业级应用程序,请坚持使用 RoR。有更多的资源、更大的社区、相对稳定的版本,并且您可以轻松找到具有 RoR 经验的优秀开发人员。

Express.js is like Sinatra for Ruby. Neither is as advanced as Rails, preferring to be more 'basic' and providing a minimal feature set rather than try to be an 'everything at once' framework that Rails is.

Express.js 就像 Ruby 的 Sinatra。两者都不如 Rails 先进,宁愿更“基本”并提供最少的功能集,而不是尝试成为 Rails 那样的“一次性”框架。

Right now, Node.js is rapidly changing its API, still has not hit version 1 and hard to find developers for(you often get people claiming they know node and have 1 year exp with it, when they actually mean they have 1 year exp with client side javascript). Besides, for 99% of the web's purposes, RoR will suffice. Most people only use Node for their pet projects, for testing out the next generation of super dynamic interfaces or websocket integration with Socket.io. If you just want to build an application for commercial purposes, use RoR.

现在,Node.js 正在迅速改变它的 API,仍然没有达到版本 1 并且很难找到开发人员(你经常让人们声称他们知道 node 并且有 1 年的经验,但实际上他们的意思是他们有 1 年的经验)与客户端javascript)。此外,对于 99% 的网络用途,RoR 就足够了。大多数人只将 Node 用于他们的宠物项目,用于测试下一代超级动态接口或与 Socket.io 的 websocket 集成。如果您只是想构建一个用于商业目的的应用程序,请使用 RoR。

As for difficulty, when you start out, Rails will be a bit magical, it does so many things under the hood, you'll have a little bit of difficulty doing something that doesn't already have a tutorial. But look through the source code of some popular gems or even rails itself, and you'll be up to speed in no time. Ruby is an amazingly simple and beautiful language, and you'll find it simpler and probably more fun than javascript.

至于难度,当你开始时,Rails 会有点神奇,它在幕后做了很多事情,你在做一些没有教程的事情时会有点困难。但是查看一些流行的 gems 的源代码甚至 rails 本身,你会很快跟上进度。Ruby 是一种非常简单和美丽的语言,您会发现它比 javascript 更简单,也可能更有趣。