西纳特拉的成功案例

发布于 2024-07-13 18:57:12 字数 1459 浏览 8 评论 0原文

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

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

发布评论

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

评论(8

遗忘曾经 2024-07-20 18:57:12

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

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

因此,正如您可能已经了解到的那样,我非常喜欢 Sinatra,并且我会将其用于个人(或小规模)项目。 只要您知道自己在做什么,它就很容易设置和使用。 浏览http://www.sinatrarb.com/wild.html,似乎就是这样大多数人都使用它,例如参见 Is Lost on Yet?日历什么都没有

[*] 编辑:我在此处找到了一个帖子,人们链接到他们的项目。 似乎有更大和更小的项目。 非常有趣的东西。

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.[*]

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.

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.

三岁铭 2024-07-20 18:57:12

http://www.sinatrarb.com/wild.html 上有一个列表。

尽管如此,我还是想听听更多关于他们的信息。 我还怀疑在这个列表之外还有很多成功的 Sinatra 项目。

There is a list at http://www.sinatrarb.com/wild.html.

Still, I'd like to hear a bit more about them. I also suspect that there are lots of successful Sinatra projects outside that list.

手长情犹 2024-07-20 18:57:12

我刚刚发布了用 Sinatra 编写的 TweepDiff (http://tweepdiff.com)。 其他任何东西都有点过分了,但我也会将 Sinatra 用于更大的项目。

I just released TweepDiff (http://tweepdiff.com) written in Sinatra. Anything else would have been overkill but I would use Sinatra for bigger projects too.

沧笙踏歌 2024-07-20 18:57:12

我认为 sinatra 最适合微应用程序开发(这并不奇怪,它是一个微框架)

Sinatra 为您提供了足够的抽象级别来快速构建几乎所有您想要的东西。 我喜欢 sinatra 的一点是,该框架让您可以严格控制应用程序实际执行的操作,您可以真正“感受到”您正在编写的内容。 所以,我想说 Sinatra 是一个微妙平衡的框架。

我还认为 Sinatra 对于前面所说的“喜欢编写 Ruby 的人”很有吸引力。 在实现 sinatra 接口之前,您需要开始编写 ruby​​ 类。 (这里是这种工作流程的一个很好的例子:http://dev-logger.blogspot.com/2009/01/ric-rac-roe-in-soup-of-technologies.html)

I think sinatra is best suited for micro-applications development (no big surprise, it's a micro-framework)

Sinatra provides you with a sufficient level of abstraction to build almost everything you want quickly. And what I like about sinatra is that the framework gives you tight control over what your app is actually doing, you can really "feel" what you are writing. So, I would say Sinatra is a subtly balanced framework.

I also think Sinatra is attractive for "people who likes writing Ruby" as said before. You start writing ruby class before implementing a sinatra interface. (good exemple of this kind of workflow here : http://dev-logger.blogspot.com/2009/01/ric-rac-roe-in-soup-of-technologies.html)

箹锭⒈辈孓 2024-07-20 18:57:12

我希望能够从我的 Web 服务器运行简洁的独立 Ruby 脚本。 就功能而言,它类似于 CGI 库。 西纳特拉是完美的。 后来有了一个 sinatra 应用程序,我就有了一组可以通过简单的 sinatra 风格路由访问的脚本。

每当我需要编写一个不依赖于数据库的 Web 应用程序时,我怀疑 sinatra 将是我的第一个选择。

I wanted to be able to run succinct self-contained Ruby scripts from my web server. As far as functionality goes, it would be similar to a CGI library. Sinatra was perfect. One sinatra app later and I have a collection of scripts accessed through simple sinatra style routes.

Whenever I need to write a web application that doesn't depend on a database, I suspect sinatra will be my first port of call.

沙与沫 2024-07-20 18:57:12

我必须回应上述大部分评论。 我们正在实施 Sinatra/HAML 堆栈,用于数据浏览和基本报告。

我真的很喜欢简单性和与 Ruby 的直接连接的结合。 如果某些东西在浏览器中不起作用,可以很容易地将其移植到直接的 Ruby 程序中进行调试。

绝对有一种用 Sinatra 建造狗屋与用 Rails 建造泰姬陵的感觉。 它很容易理解(它也帮助我理解 MVC 和 Rails 的需求)。

总的来说,这是非常酷的东西,而且速度非常快。 我还没有强调它,所以我不能说它在现实世界中的表现如何。

I'd have to echo most of the above comments. We're in the process of implementing a Sinatra/HAML stack for browsing and basic reporting on data.

I really like the combination of simplicity and direct connection to Ruby. If something isn't working in the browser, it's pretty easy to port it out to a straight Ruby program for debugging.

There's definitely a feeling of building a dog house with Sinatra versus the Taj Mahal with Rails. It's easy to comprehend (it's also helping me understand the need for MVC and Rails).

Altogether very cool stuff and very fast. I haven't stressed it yet, so I can't say how well it'll behave in the real world.

永不分离 2024-07-20 18:57:12

我使用 sinatra 制作了 http://istay.com,我只能说它对于任何人来说都是一个很棒的小框架不直接使用或没有数据库的站点。

尽管我确实觉得 sinatra 已经达到了当前站点的极限,并且任何扩展都将使用 Rails 或其他框架编写。

I made http://istay.com using sinatra, all I can say is that it is a fantastic little framework for any site that doesn't directly use or doesn't have a database.

Though I do feel sinatra has reach it's limit with the current site, and any extensions will be written using Rails or other framework.

情魔剑神 2024-07-20 18:57:12

我将 Sinatra 用于小型“单一功能”类型的应用程序(我当前的博客引擎可能是一个很好的例子)。 我认为 Sinatra 的简单性最适合小型实用程序和基本 API 前端(Twitter 应用程序等)。

对于大型应用程序,甚至可以使用基于 Sinatra 的 Padrino 框架,其中包含您通常会达到的一些优点供 Rails 提供。

I use Sinatra for small 'one function' kinds of apps (My current blogging engine might be a good example). I think the simplicity of Sinatra works best for little utilities and basic API front-ends (Twitter apps, etc).

For larger scale apps there is even the Sinatra-based Padrino Framework with some of the niceties that you would usually reach for Rails to provide.

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