西纳特拉的极限是什么?

发布于 2024-09-06 03:12:52 字数 207 浏览 0 评论 0原文

我最近一直在学习 Ruby Web 框架 Sinatra,我发现它非常好用。我读过的大多数文章和博客似乎都认为它只适用于小型网站或“小型”网络应用程序。这是真的吗?可以在 Sinatra 中构建完整的 Web 应用程序,还是 Ruby on Rails 才是正确的选择?

I've been learning the Ruby web framework Sinatra lately, and I'm finding it great to use. Most of the articles and blogs I have read about it seem to assume that it is good only for small websites, or 'tiny' web-apps. Is this true? Can a complete web application be built in Sinatra, or is Ruby on Rails the way to go?

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

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

发布评论

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

评论(2

暖阳 2024-09-13 03:12:53

理论上,您可以使用 Sinatra 构建整个 Web 应用程序,并且它将为您提供比 Ruby on Rails 更精确的控制。

也就是说,它还删除了 ruby​​ on Rails 为您提供的所有优秀功能,例如模型-视图-控制器架构。

如果您希望构建一个具有数据库交互功能的 Web 应用程序,我强烈建议您使用 Ruby on Rails。

如果您希望构建一个非常简单的 API 或只需要一些数据并将其发布到 Twitter 或其他东西上的东西,请继续使用 Sinatra。

You could, in theory, build an entire web application using Sinatra, and it would offer you more precision control than Ruby on Rails would.

That said, it also removes all of the nice features ruby on rails gives you, such as the Model-View-Controller architecture.

If you're looking to build a web application with database interaction, I strongly advise you use Ruby on Rails.

If you're looking to build a very simple API or something that just takes some data and throws it up onto Twitter or something, go ahead and use Sinatra.

生生不灭 2024-09-13 03:12:53

没有理由不能用来建立企业网站。它快速且直观。构建更大的 Web 应用程序的两个关键事项。虽然它确实缺乏 Rails 的许多功能,但我还没有遇到障碍。

我个人喜欢 Sinatra 的纤薄特性。它支持路由而不是让它变得令人头痛。

我经常发现自己在与 Rails 较量,而我则根据自己的喜好配置 Sinatra。

至于数据库交互,mongo_mapper + Sinatra 效果很好。

There is no reason that it couldn't be used to build an enterprise website. It's fast and intuitive. Two key things in building a larger web application. While it does lack many of the features of Rails, I am yet to run into a road block.

I personally like the slim nature of Sinatra. It embraces routing instead of making it a headache.

I usually find myself wrestling with Rails, whereas I configure Sinatra to my liking.

As for database interaction, mongo_mapper + Sinatra works very well.

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