我只需要 ActiveRecord 和 ActiveMailer,我应该使用 Rails/Merb 吗?

发布于 2024-07-14 07:20:52 字数 343 浏览 8 评论 0原文

我有一个小型 Web 应用程序,当前正在 Sinatra 上运行。 它只有两个页面,所以我实际上不需要控制器或很多视图。 我已经包含了 ActiveRecord 来与数据库交互,并包含 ActiveMailer 来发送和接收邮件。

在这么小的项目上使用 Rails 或 Merb 值得吗? 我发现自己添加了 Rails 中包含的功能。 我以前没有使用 Merb 的经验,所以我真的不知道这是否是一个合适的选择。 但据我所知,Merb 可能是进行只需要几个组件的项目的方法。

谢谢。

I have a small web application that is currently running on Sinatra. It only has two pages so I don't really need controllers or many views. I have included ActiveRecord to interact with a database and ActiveMailer to send and receive mail.

Would it be worth it to use Rails, or Merb on a project as small as this? I find myself adding features that are included in Rails. I haven't had any experience with Merb before so I don't really know if that would be a suitable option. But from what I hear Merb may be the way to go on a project that only needs a few components.

Thanks.

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

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

发布评论

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

评论(3

汹涌人海 2024-07-21 07:20:52

如果您已经在 Sinatra 上运行一个小项目,则无需切换到 Rails。 您可以在 Rails 之外使用 ActiveRecord 和 ActiveMailer。

No need to switch to Rails if your already running on Sinatra for a small project. You can use ActiveRecord and ActiveMailer outside of Rails.

潜移默化 2024-07-21 07:20:52

Merb 正在与 Rails for Rails 3.0 版本合并。 作为此过程的一部分,核心 Rails 架构将被“merbified”,以便更轻松地配置为仅使用您需要的特定组件。

随着您的应用程序的增长,您可能会发现自己正在重新发明已经存在的功能,在这种情况下,我会考虑切换框架。

就我个人而言,即使是非常小的项目,我也会使用 Rails。 这意味着我对我所做的一切工作都有一个单一的框架和部署环境。

Merb is merging with Rails for Rails version 3.0. As part of this process, the core Rails architecture is going to be "merbified" so as to be more easily configured to only use the particular components you need.

There may going to be a point as your application grows that you find yourself reinventing features that already exists, in this case I would consider switching frameworks.

Personally, I use Rails even for quite small projects. It means I have a single framework and deployment environment for everything that I work on.

梦归所梦 2024-07-21 07:20:52

我经常使用 Sinatra 来处理比你描述的更大的事情。 您发现需要添加 Rails 的哪些功能? 如果只是像 5.hours.ago 这样的东西,您始终可以:a) 将这部分代码从 activesupport 中取出,并将其粘贴到项目中的“通用”/类似文件中,或者b) 只需要主动支持并使用它的功能。

I use Sinatra often for stuff much bigger than what you describe. What features of Rails do you find you are needing to add? If it's just stuff like 5.hours.ago and stuff, you could always: a) pull that part of the code out of activesupport and paste it into a 'common'/similar file in your project or b) just require activesupport and use it's features.

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