Rails vs Ruby CGI [英] Rails vs Ruby CGI

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

问题描述

我有一个老板,他坚信在Apache上可以直接使用Ruby作为CGI应用程序运行时,学习Rails的学习曲线过于陡峭,并且从劳动角度来看并不具有成本效益。对于我们的重写,他提议我们使用不带框架的纯Ruby,而不是Rails(或Merb,Sintratra等),我坚信这是一个坏主意,但我很难将案例纳入话。到目前为止,我已经提出了一些想法:

I have a boss who is convinced learning Rails is too steep a learning curve and not cost effective from a labor standpoint when straight Ruby running as a CGI app on Apache is available. He is proposing, for our rewrite, that we use straight Ruby w/ no framework rather than Rails (or Merb, Sinatra, etc.) I believe in my heart that this is a bad idea but I'm having trouble putting my case into words. Some ideas I've come up with so far:


  • Rails通过MVC促进更好的代码重用和关注点分离

  • 一家商店的Rails对于合格的求职者而言将更具吸引力,因为Rails的履历看起来更好,与他一起工作更有趣,等等。

  • (在这一点上我可能是错的。)Rails会在乘客上获得更好的性能,因为乘客会自动合并到数据库的连接,而手动CGI应用程序必须自行管理该数据库,否则根本无法管理它,从而导致性能下降。

  • Rails是一项经过验证的技术,至少可以肯定比手动CGI框架还要多

  • Rails promotes better code reuse and better separation of concerns via MVC
  • A shop running rails will look more attractive to the qualified job seeker, since Rails looks better on his/her resume, is more fun to work with, etc.
  • (I may be wrong on this one) Rails will have better performance on Passenger because Passenger automatically pools connections to the database where as a handrolled CGI app would have to manage that itself or not at all resulting in worse performance.
  • Rails is a proven technology, at least certainly more than a handrolled CGI framework

我是否有任何理由我想念还是错了?有我不知道的有效折衷方案吗?

Are there any reasons I'm missing or wrong about? Are there valid tradeoffs I'm not aware of?

推荐答案

偶尔会有很好的理由让公司采用自己的框架使用标准的Rack兼容框架。但是 Rails的学习曲线太陡并不是其中之一。

There are occasionally good reasons for a company to roll their own framework instead of using a standard Rack-compliant framework. But "Rails has too steep a learning curve" is not one of them.

进行蛮力实际上比较复杂,而不是较少。如果您的老板真的很担心学习曲线,那么他应该使用具有文档文章截屏整个 托管 公司专用于此。

Doing it brute-force is actually more complex, rather than less. If your boss is really worried about learning curve, he should use the standard framework that has documentation and articles and screencasts and entire hosting companies dedicated to it.

此外,Rails很容易开发。我在Rails上举办了为期一天的讲习班,甚至以前从未编程的人到一天结束时都可以使用可部署的应用程序。经验丰富的开发人员会更轻松。

Besides, Rails is dead easy to develop for. I've taught one-day workshops on Rails, and even people who have never programmed before have a working, deployed app by the end of the day. Experienced developers have an even easier time of it.

如果您的老板不了解Rails,而不是弄清楚了,他会向您介绍有关Ruby而不是CGI的内容...小心。科技让他落后了15年前,他不再有资格做出技术决定。

If your boss doesn't understand Rails, and rather than figure it out, he's giving you this line about Ruby over CGI...be careful. Technology left him behind 15 years ago, and he's no longer qualified to make technical decisions.

他应该立即进入市场行销。

He should be moved into marketing without delay.

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

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