什么时候使用 node.js、sinatra 和 rails? [英] When to use node.js vs sinatra vs rails?

查看:41
本文介绍了什么时候使用 node.js、sinatra 和 rails?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这 3 种语言/框架的最佳用途是什么?混合所有这些(或 2 个)有用吗?

What are the best uses for these 3 languages/frameworks? Is it useful to mix all of them (or 2)?

推荐答案

如果您正在构建一个完整的 Web 应用程序,您可能应该使用 Rails,因为它提供了最全面的服务.您还可以利用社区产生的大量工作.

If you're building a complete web application, you should probably use Rails as it provides the most comprehensive services. You can also leverage an enormous amount of work produced by the community.

Sinatra 非常适合制作非常精简、严肃的应用程序服务.你没有太多的工作,但它非常快.如果您需要一个数据库连接,则必须添加它,而这样的事情甚至可以使创建中等规模的应用程序成为一项挑战.基本上,如果您需要非常简单的东西并且不需要 Rails,那么您可能需要 Sinatra.

Sinatra is great for producing really thin, no-nonsense application services. You don't get much to work with, but it is very fast. If you need a database connection, you will have to add it in, and things like this can make creating even medium-sized applications a challenge. Basically if you need something very simple and don't need Rails, you probably need Sinatra.

node.js 是一个伟大的新框架,用于生成响应式、可扩展的应用程序,但它几乎没有像 Rails 这样的成熟平台所拥有的附加组件库.node.js 确实擅长基于流和按需数据转换的应用程序.Node Knockout 中制作的一些示例非常有趣,但这些示例是由一些出色的团队制作的.

node.js is a great new framework for producing responsive, scalable applications, but it doesn't have nearly the library of add-ons that a mature platform like Rails does. node.js really excels at applications based on streaming and on-demand data transformation. Some of the examples produced in Node Knockout are very interesting, but these were produced by some exceptional teams.

虽然 Node Knockout 条目做得非常好,但与 2009 年开发的应用程序相比,Rails隆隆声 它们似乎被认为是缺乏深度和复杂性的玩具.这并不是要诋毁 Node Knockout 团队所做的工作,但它确实表明 node.js 的优势主要与实时事件有关,而不是与传统的更普通的基于数据库的应用程序有关.

While the Node Knockout entries are very well done, when compared to the sort of applications that were produced in the 2009 Rails Rumble they seem to come across as toys lacking depth and complexity. This is not to discredit the work done by the Node Knockout teams, but it does show that the strengths of node.js are mostly to do with real-time events and less with conventional more ordinary DB-based apps.

这篇关于什么时候使用 node.js、sinatra 和 rails?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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