ruby on rails_为什么你应该在2019年学习Ruby on Rails

ruby on rails

by Błażej Kosmowski

通过BłażejKosmowski

为什么你应该在2019年学习Ruby on Rails (Why you should learn Ruby on Rails in 2019)

Every trend, technology, and even programming language has its peak in popularity that sooner or later will decrease slightly or by a considerable amount. If we lookup “state of ruby language” in Google we will most likely get many results concerning Ruby’s alleged death and decrease in popularity. Still, I believe the truth is, Ruby is doing great and still remains a good technology to choose in 2019.

每种趋势,技术,甚至编程语言都已达到流行的顶峰,迟早会有所减少或会大大减少。 如果我们在Google中查找“Ruby语言的状态”,我们很可能会获得许多有关Ruby所谓的死亡和流行度下降的结果。 尽管如此,我相信事实是,Ruby的表现不错,并且仍然是2019年可供选择的好技术。

Here is why:

原因如下:

1. Ruby仍然是十大编程语言之一 (1. Ruby is still among the top 10 programming languages)

It is very unlikely that Ruby will die anytime soon as it is still featured among GitHub’s top programming languages of 2018. What’s more? Large enterprises like GitHub and Airbnb are continuously using Ruby on Rails. Just a couple days ago, cloud computing giant AWS added Ruby to its serverless computing solution — AWS Lambda right next to Java, C#, Python and Node.js, which proves the stable position of the language.

由于Ruby仍是GitHub 2018年顶级编程语言之一 ,因此Ruby几乎不可能很快消失。 更重要的是? 像GitHubAirbnb这样的大型企业正在不断使用Ruby on Rails。 就在几天前,云计算巨头AWS 在其无服务器计算解决方案中添加了Ruby — AWS Lambda紧挨Java,C#,Python和Node.js,这证明了该语言的稳定地位。

Ruby may have slowed down (no pun intended) but it is far from dying, especially due to the vast amount of existing projects that have to be maintained and extended.

Ruby可能已经放慢了速度(没有双关语),但是它远未消亡,特别是由于必须维护和扩展大量现有项目。

2.社区是积极和支持的 (2. The community is active and supportive)

The Rails framework has over 3,500 contributors on GitHub. Frequent updates and new gems created by developers ensure that the applications created using the framework can be developed more easily and delivered more quickly.

Rails框架在GitHub上有3500多个贡献者。 开发人员经常进行更新和创建新的gem,以确保使用该框架创建的应用程序可以更轻松地开发并更快地交付。

The active community regularly shares experiences and troubleshooting problems. With over 300,000 questions on Stackoverflow it is unlikely that you will have a really hard time finding a solution for a problem you are experiencing. Not only Ruby, but also Ruby on Rails has become mature over the years and its documentation has gotten very detailed and extensive — a great starting point for newcomers.

活跃的社区定期分享经验和故障排除问题。 关于Stackoverflow的问题超过300,000个,您不太可能很难为遇到的问题找到解决方案。 多年来,不仅Ruby变得更加成熟,而且Ruby on Rails也变得更加成熟,其文档也变得非常详细和广泛-对于新手来说是一个很好的起点。

Ruby is not only Rails. More lightweight solutions like Sinatra, frameworks offering different approaches like Hanami, and even frameworks for event sourcing are growing in popularity and improving on what Ruby can offer.

Ruby不仅是Rails。 诸如Sinatra之类的更轻量级解决方案,诸如Hanami之类的提供不同方法的框架,甚至用于事件源的框架也在日益流行,并在Ruby所提供的功能上得到了改进。

3. Ruby不断发展 (3. Ruby constantly evolves)

With updates at least twice a year, Ruby creators make sure the language is not dying and constantly evolves. Despite the fact that the performance issues will not likely disappear any time soon due to some basic characteristics of Ruby (especially its dynamic nature), the release of Ruby 3 in 2020 is expected to introduce several improvements that can make Ruby significantly faster.

通过每年至少两次的更新,Ruby的创建者可以确保该语言不会消失并不断发展。 尽管事实上由于Ruby的某些基本特性(尤其是其动态特性),性能问题不会很快消失,但2020年Ruby 3的发布预计会引入一些改进,这些改进可以使Ruby 显着更快

4.对于初创公司,内部工具,原型设计和其他方面来说,这确实很棒 (4. It’s really great for startups, internal tools, prototyping and whatnot)

Thanks to its intuitive, simple, and readable syntax resulting in much higher productivity, Ruby has been a great fit for startups or any company that would like to deliver (and extend) software products as soon as possible. Faster development means better savings (quicker time-to-market), which is important for startups with a limited budget. This way, more money can be invested in the development of additional stuff like updating features and marketing.

凭借其直观,简单和易读的语法可提高生产率,Ruby非常适合初创企业或任何希望尽快交付(和扩展)软件产品的公司。 更快的开发意味着更好的节省(缩短上市时间),这对于预算有限的初创公司而言非常重要。 这样,可以将更多的钱投入到其他东西的开发中,例如更新功能和营销。

On the other hand, large-scale projects can benefit from Ruby on Rails using it as a prototyping tool or an efficient way to deliver proof-of-concept solutions. Because it is relatively easy and cheap to build and extend applications with Ruby, it is also a great option for building internal/back-end tools, where the performance is not a top priority.

另一方面,大型项目可从Ruby on Rails中受益,将其用作原型工具或提供概念验证解决方案的有效方法。 因为使用Ruby构建和扩展应用程序相对容易且便宜,所以它对于构建内部/后端工具也是一个不错的选择,在这些工具中,性能并不是最重要的。

It is not uncommon to use Ruby even for large, high-performance applications. This usually requires engineers that know how to craft high-performance applications in Ruby though, as speed is not inherently bundled with this language. Also, it might require some horizontal scaling.

即使对于大型的高性能应用程序,也经常使用Ruby。 但是,这通常需要工程师知道如何在Ruby中制作高性能应用程序,因为这种语言并非固有地捆绑了速度。 另外,它可能需要一些水平缩放。

5. Ruby有完善的代码风格建议 (5. Ruby has a well-established code style recommendations)

Ruby is a mature programming language and stable technology, bringing more to the picture than simply being ‘trendy’. It is still possible to write bad code in Ruby, and some say it is fairly easy as the language is very flexible — it allows achieving the same result in multiple ways (not always the prettiest ones).

Ruby是一种成熟的编程语言和稳定的技术,它带来的不仅仅是简单的“时髦”。 仍然可以用Ruby编写错误的代码,并且有人说这很容易,因为该语言非常灵活-它允许以多种方式(并非总是最漂亮的方式)获得相同的结果。

On the other hand, the language itself allows writing beautiful and readable code — this is encouraged by a well-established set of best practices related to implementation and testing. Such code, if written properly, can be easily understood and maintained by fellow developers, further improving on the stability and maintainability of the whole solution.

另一方面,该语言本身允许编写漂亮且易读的代码-一组与实施和测试相关的完善的最佳实践鼓励了这一点。 如果编写正确,则此类代码可以被其他开发人员轻松理解和维护,从而进一步改善了整个解决方案的稳定性和可维护性。

6.开发者的幸福 (6. Developer happiness)

A vast amount of libraries and resources for learning, a helpful and active community, well established best practices and beautiful, readable syntax — all this makes Ruby a programming language that is a pleasure to work with. It’s a language oriented on developer happiness.

大量的学习资源和图书馆,有用且活跃的社区,完善的最佳实践以及美观,易读的语法-所有这些使Ruby成为一种令人愉快的编程语言。 这是一种面向开发人员幸福的语言。

In most cases, happy developers deliver better value to their customers. While there are other languages that try to mimic best aspects of Ruby (like Crystal), those are still immature technologies that need to prove themselves in production environments.

在大多数情况下,快乐的开发人员可以为客户提供更好的价值。 尽管还有其他语言试图模仿Ruby的最佳方面(例如Crystal),但这些语言仍是不成熟的技术,需要在生产环境中证明自己。

但是为什么Ruby会变慢? (But why is Ruby slowing down?)

There is no easy answer to that question, but we can theorize about it. It is likely that Ruby has matured enough and has started to lose some momentum. Lots of solutions, libraries and techniques were already created or designed so the need for new ones is not as significant as it once was. We can also see a slight decrease when it comes to appearance of new learning materials — most likely due to same reason.

这个问题没有简单的答案,但是我们可以对此进行理论化。 Ruby可能已经足够成熟并且开始失去动力。 已经创建或设计了许多解决方案,库和技术,因此对新解决方案的需求已不如从前。 在出现新学习材料方面,我们还可以看到略有下降,这很可能是出于相同的原因。

Furthermore, the appearance of new languages and frameworks better suited for particular applications/solutions forced Ruby to share its part of the cake with the new players. Languages that are much less resource intensive, languages providing efficient libraries for specialized solutions related to ML/AI or other new concepts, and finally, languages designed around parallel processing — Ruby cannot compete with them in those areas, at least not yet. It is best to always use the right tool for the right job and Ruby is not one-size-fits-all kind of tool.

此外,新的语言和框架的出现更适合于特定的应用程序/解决方案,这迫使Ruby与新的参与者共享蛋糕的一部分。 这些语言的资源消耗要少得多,这些语言为与ML / AI或其他新概念相关的专用解决方案提供了有效的库,最后,围绕并行处理设计的语言-Ruby至少不能在这些领域与它们竞争。 最好始终使用正确的工具来完成正确的工作,而Ruby并不是一种千篇一律的工具。

结论 (Conclusions)

Even in 2019 Ruby remains a great choice for your development needs. There is no doubt that it is still a relevant language and it still attracts new followers and developers.

即使在2019年,Ruby仍然是满足您的开发需求的绝佳选择。 毫无疑问,它仍然是一种相关的语言,并且仍然吸引着新的追随者和开发人员。

Last but not least, what should be kept in mind that there are no ‘bad’ programming languages in and of themselves, there are only badly chosen languages for particular use cases. So if you feel Ruby seems to be a great fit for you, do not hesitate, it is still out there among the top most popular technologies.

最后但并非最不重要的一点是,应该牢记的是,本身就没有“不良”的编程语言,只有针对特定用例的不良选择语言。 因此,如果您觉得Ruby似乎非常适合您,请不要犹豫,它仍然是最流行的技术之一。

Originally published at selleo.com.

最初发布于selleo.com

翻译自: https://www.freecodecamp.org/news/why-ruby-on-rails-is-a-good-choice-in-2019-11abcc10f5a/

ruby on rails

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值