Camping 和 Sinatra 之间有什么重要区别吗?

发布于 2024-07-19 06:08:24 字数 130 浏览 5 评论 0原文

我的感觉是 Camping 和 Sinatra 之间的差异不是很大,你可以安全地选择其中之一就可以了。 但我想问问Ruby专家这是否属实。 事实上,Sinatra 和 Camping 微框架之间有什么重要的区别吗? 您将如何决定使用哪一个?

My feeling is that the differences between Camping and Sinatra are not very significant and that you could safely choose either one and be ok. But I want to ask the Ruby experts if this is true. Are there in fact any important differences between the Sinatra and Camping microframeworks? And how would you go about deciding which one to use?

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

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

发布评论

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

评论(3

情栀口红 2024-07-26 06:08:24

我知道的唯一显着区别是 Camping 基于 MVC 模式(如 Rails),并且与 ActiveRecord 耦合。 西纳特拉更加不可知论。

Camping 也不再维护,而 Sinatra 正在积极开发中。 仅此一点就足以成为首先关注西纳特拉的理由。

编辑:感谢菲利普的更正,很高兴听到露营开发正在进行中。 抱歉另有说明。

The only significant difference that I'm aware of is that Camping is based around the MVC pattern like rails, and is coupled to ActiveRecord. Sinatra is more agnostic.

Camping also is no longer maintained, while Sinatra is under active development. That alone is probably reason enough to look at Sinatra first.

edit: Thank you for the correction Philippe, and great to hear that Camping development is ongoing. Apologies for indicating otherwise.

是你 2024-07-26 06:08:24

需要考虑的一件事是,露营有点高尔夫练习。 本来是 4k,但 judofyr 已经把它降到了 3k。 尝试阅读源代码,我敢说。 现在,还有未删节版本,它可以为您提供不错的评论,但代码本身仍然令人痛苦地混淆。

借助 Sinatra,您可以轻松地深入内部并找到惯用的 ruby​​。 恕我直言,这非常重要,尤其是当您需要修补某些东西时。

(请记住,露营的设计很古怪,我无意做出判断。)

One thing to consider is that Camping is somewhat of a golf exercise. It was 4k but judofyr has gotten it down to 3k. Try reading the source, I dare you. Now, there's also the unabridged version which gives you decent comments, but the code itself is still painfully obfuscated.

With Sinatra you can pretty comfortably dig into the internals and find idiomatic ruby. That's pretty darn important, IMHO, especially if you ever need to patch something.

(Keep in mind that Camping is eccentric by design, I'm not aiming to pass judgment.)

二智少女 2024-07-26 06:08:24

露营正在维护中。 由于 _why 专注于 Hackety-Hack/Shoes 直到他消失了,(正如 semanticart 上面写的)Magnus Holm (judofyr) 已从事露营工作。 未删节版本有一些有用的文档。 它对我来说效果很好,尽管我还没有真正扩展它,但有一些露营应用程序(例如 Cheat) 运行良好。

您可能还想检查主要是什么Sinatra 和 Ramaze 之间的区别? 其中有一些到 Sinatra 和其他轻量级 Ruby 框架的有用链接。

Camping is being maintained. Since _why was concentrating on Hackety-Hack/Shoes until he kind-of-vanished, and (as semanticart writes above) Magnus Holm (judofyr) has been working on Camping. The unabridged version has some useful documentation. It works fine for me and, although I've yet to really stretch it, some Camping apps out there (like Cheat) run fine.

You might also like to check What are the main differences between Sinatra and Ramaze? which has some useful links to Sinatra and other lightweight Ruby frameworks.

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