Sinatra 成功案例 [英] Sinatra success stories

查看:41
本文介绍了Sinatra 成功案例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您成功使用过 Sinatra 吗?这是一个什么样的项目?在什么情况下您会建议使用 Sinatra 而不是 Rails 或 Merb?

Have you used Sinatra successfully? What kind of a project was it? In what situations would you recommend using Sinatra instead of Rails or Merb?

推荐答案

我接触过 Sinatra,但并没有真正用它写过任何严肃的东西.正如您上面所说,http://www.sinatrarb.com/wild.html,尽管那里列出的许多应用程序似乎都链接到 GitHub 页面,但我认为这些页面通常是人们尝试使用 Sinatra 并在线发布他们的结果.然后,还有 Sinatra 邮件列表,您可以在其中找到一些有趣项目的链接.[*]

I've dabbled with Sinatra, but haven't really written anything serious with it. As you said above, there's a list at http://www.sinatrarb.com/wild.html, although a lot of the applications listed there seem to link to GitHub pages, which I assume are often people experimenting with Sinatra and publishing their results online. Then, there's also the Sinatra mailing list, where you might find links to some interesting projects.[*]

至于您何时使用 Sinatra 的问题,我个人会回答对于较小的项目".当您想要快速启动并运行某些东西时,Sinatra 似乎是一个不错的选择.对于喜欢 Ruby 的人来说,这也很棒.我的意思是,当你在 Rails 中做某事时,你必须按照Rails 方式"来做.Rails 是您在其上构建应用程序的框架,您必须遵守其习惯和约定.另一方面,Sinatra 感觉就像一个图书馆.你觉得你在写 Ruby,如果你想连接到一个数据库,你使用你喜欢/认为适合工作的库,如果你想输出 HTML,你选择你喜欢的模板库,如果你想要一个简单的 Web 框架,您选择 Sinatra.Sinatra 不是您构建整个应用程序的基础,而是您在应用程序其余部分之外使用的东西.

As for your question on when to use Sinatra, I personally would answer "for smaller projects." When you want something up and running very quickly, it seems like Sinatra is an excellent choice. It's also great for people who like Ruby. With that I mean, when you're doing something in Rails, you have to do it "The Rails Way". Rails is the framework upon which you're building your application, and you have to adhere to its customs and conventions. Sinatra, on the other hand, feels like a library. You feel like you're writing Ruby, if you want to connect to a database, you use the library you like/think is appropriate for the job, if you want to output HTML you choose the templating library you like, and if you want a simple web framework, you choose Sinatra. Sinatra is not something upon which you build your whole application, it's something you use beside the rest of your application.

所以,正如您可能已经收集到的,我非常喜欢 Sinatra,我会将它用于个人(或小规模)项目.只要您知道自己在做什么,它就易于设置和使用.查看 http://www.sinatrarb.com/wild.html,似乎就是这样大多数人都在使用它,例如迷路了吗?无所事事的日历.

So, as you may have gathered, I'm quite fond of Sinatra, and I would use it for personal (or small-scale) projects. It's easy to set up and easy to use, as long as you know what you're doing. Looking through http://www.sinatrarb.com/wild.html, it seems like that's what most people are using it for, see for example Is Lost on yet? and Calendar About Nothing.

[*] 编辑:我找到了一个帖子 这里,人们链接到他们的项目.似乎有更大和更小的项目.很有趣的东西.

[*] Edit: I found a thread here, with people linking to their projects. There seem both larger and smaller projects. Very interesting stuff.

这篇关于Sinatra 成功案例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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