查看: 866|回复: 9

Best Ruby Frameworks: Find One That Suits Your Needs

[复制链接]
认证徽章
论坛徽章:
1054
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
发表于 2019-1-3 18:10 | 显示全部楼层 |阅读模式
In today’s post, we’ll cover Ruby frameworks. There is one I’m pretty sure you’ve heard about, and its name is Ruby on Rails. If you walk up to a random software developer and ask them to name a Ruby framework, it’s very likely that Ruby on Rails will be their answer and that would hardly be surprising.
I think it’s fair to say that Ruby on Rails changed the landscape of web development. This highly successful framework managed to put some best practices and conventions on a lot of developers’ radar, and it also helped to bring some revolutionary services to life, especially the usage of Model-View-Controller (MVC). Last but not least, it’s responsible for skyrocketing the popularity of the Ruby programming language to a whole new level. For that reason, Stackify has started supportingRuby on Rails monitoring as well. If you’re using Ruby on Rails, it’s worth checking out Retrace.
That’s not to say that Ruby itself isn’t awesome. It is. And as proof of said awesomeness is the sheer number of Ruby frameworks out there. There are full-blown, monolithic ones and tiny, minimalistic ones. You can have frameworks that stand on their own; others, you must use as a complement to other tools.
The Ruby ecosystem has plenty of options to cover the needs and preferences of all developers, as you’ll see in this post.

认证徽章
论坛徽章:
1054
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
发表于 2019-1-3 18:11 | 显示全部楼层
Top 7 Ruby Frameworks
1. Ruby on Rails
I know you could’ve seen this coming miles away, but it’s impossible to talk about Ruby frameworks without mentioning the most famous among them. So, Rails it is.
Ruby on Rails, sometimes called just “Rails,” is an open-source web development framework. David Heinemeier Hansson, a.k.a. DHH, released the first version of Rails as an open-source project back in 2005, after using it to build what would become the Basecamp project management system.
Besides using the popular model-view-controller (MVC) pattern, Rails is based upon some well-known software development guidelines and philosophies. Probably chief among them is “convention over configuration.” That means that, unlike many popular frameworks, Rails doesn’t generally require the user to create a lot of mappings and configurations. Instead, the framework itself makes many assumptions based on some simple conventions.
The Rails framework enables developers to get a database-backed website up and running in way less time than it would’ve been possible by using its competitors. Due to its convention-based approach, the Rails framework saves developers from writing a lot of boilerplate code, freeing them to focus on the business part of the code.
Ruby on Rails has been successful in increasing the popularity of not only Ruby itself, but also the convention-based approach to web frameworks. Nowadays, there are database-backed, MVC-convention-based web frameworks available in a variety of languages and platforms that clearly took inspiration from the “Rails way.”


使用道具 举报

回复
认证徽章
论坛徽章:
1054
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
发表于 2019-1-3 18:25 | 显示全部楼层
2. Hanami
The second Ruby framework on our list is Hanami. Released initially as Lotus by Luca Guidi, the framework was renamed to Hanami in 2016, due to trademark issues.
The framework’s site describes it as a “modern web framework for Ruby”, and claims it’s optimized for performance. Hanami makes use of CDNs (content delivery networks) to deliver responses as fast as possible, and it consumes 60% less memory than other Ruby frameworks.
Hanami is heavily influenced by Robert “Uncle Bob” Martin’s clean architecture. Its architectural style assumes your project can contain n apps. The same Ruby process runs all apps in your project, and they all reside in the same codebase. The most popular type of application is the web app, so Hanami automatically generates that one for you. You could have different apps for what Martin calls “delivery mechanisms.” In clean architecture lingo, a delivery mechanism is just a way of delivering functionalities to the final user.
Similar to Rails (and several other Ruby frameworks), Hanami follows the MVC pattern. Unlike Rails, though, it splits the functionality of the Model class into two parts. One is an entity class that models the behavior you need to express. The other is a repository class that handles the persistence for the entity.

使用道具 举报

回复
认证徽章
论坛徽章:
1054
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
发表于 2019-1-3 18:26 | 显示全部楼层
3. Sinatra
Sinatra is a web application framework, first released in 2007. According to its site, Sinatra is a “DSL for quickly creating web applications in Ruby with minimal effort.” As you’ve probably guessed, the creators named the framework after singer Frank Sinatra.
Sinatra aims to be small and flexible. It doesn’t follow the typical MVC patterns used in other Ruby frameworks (and web frameworks in general, not only Ruby ones). Instead, it provides the developer a DSL with which they can define routes.
A route in Sinatra is a pair composed of an HTTP method and a pattern. The pattern is used to match URLs to blocks.

使用道具 举报

回复
认证徽章
论坛徽章:
1054
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
发表于 2019-1-3 18:26 | 显示全部楼层
4. Cuba
The next Ruby framework on our list is Cuba. According to the description on its GitHub repository, Cuba is “a microframework for web development originally inspired by Rum, a tiny but powerful mapper for Rack applications.”
It integrates many templates via Tilt, and it integrates testing via Cutest and Capybara.

使用道具 举报

回复
认证徽章
论坛徽章:
1054
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
发表于 2019-1-4 10:46 | 显示全部楼层
5. Nancy
The next Ruby framework on our list is Nancy. Nancy is a web development microframework that took inspiration from other frameworks such as Cuba and Sinatra. Sinatra’s influence on Nancy goes all the way to the naming of the framework: Nancy is Frank Sinatra’s daughter.
According to its GitHub repo, some of Nancy’s main features include its high speed, support for “Sinatra-like” routes, the possibility of halting execution at any point by employing Ruby’s native throw/catch mechanism, and last but not least, thread-safety.

使用道具 举报

回复
认证徽章
论坛徽章:
1054
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
发表于 2019-1-4 10:46 | 显示全部楼层
6. Grape
The next item on our list is Grape, which is yet another Ruby framework that falls into the category of microframeworks. Grape is one of the newest Ruby frameworks out there. Its website describes it as an “opinionated framework for creating REST-like APIs in Ruby.” That pretty much sums it up.
You can run Grape on Rack or use it as a complement to other frameworks.

使用道具 举报

回复
认证徽章
论坛徽章:
1054
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
发表于 2019-1-4 10:46 | 显示全部楼层
7. Padrino
After covering so many minimalist frameworks, it’s time to get back to a more full-fledged framework with Padrino. This framework uses Sinatra as its core. According to its site, Padrino “was created to make it fun and easy to code more advanced web applications while still adhering to the spirit that makes Sinatra great!”
So, while Padrino is a “full” framework, closer to Rails in essence than to Grape, Cuba, or other microframeworks, it also strives to be as small, fast, and lightweight as possible.
One of the main selling points of Padrino is probably its agnosticism. It doesn’t ship with default libraries for concerns such as JavaScript, testing, mocking, and ORM. Instead, it allows the developer to choose among available libraries according to their own needs and preferences.

使用道具 举报

回复
认证徽章
论坛徽章:
1054
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
发表于 2019-1-4 10:47 | 显示全部楼层
Ruby frameworks in all sizes and shapes!
In today’s post, you’ve learned about some of the Ruby frameworks available out there. Some are very famous, while others are less so. Regardless, I think this drives its message home: there are many Ruby frameworks at your disposal. Ruby on Rails is without a doubt the most famous of them all. If it suits your needs, go for it. But if it doesn’t, you have plenty of options to choose from.
And, of course, frameworks aren’t all there is to software development. There are a plethora ofuseful Ruby tools out there, so you must keep your eyes open for opportunities to boost both your team’s productivity and the quality of its output. More specifically, we invite you to take a look at Stackify’s Retrace, which can make application monitoring and profiling in Ruby as easy as 1-2-3.

使用道具 举报

回复
认证徽章
论坛徽章:
1054
紫蜘蛛
日期:2015-09-22 15:53:22紫蜘蛛
日期:2015-10-15 13:48:52紫蜘蛛
日期:2015-10-15 14:45:48紫蜘蛛
日期:2015-10-15 14:47:47紫蜘蛛
日期:2015-10-15 14:48:45九尾狐狸
日期:2015-09-22 15:53:22九尾狐狸
日期:2015-10-15 13:50:37九尾狐狸
日期:2015-10-15 14:45:48九尾狐狸
日期:2015-10-15 14:47:47九尾狐狸
日期:2015-10-15 14:48:45
发表于 2019-1-4 10:47 | 显示全部楼层

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

PostgreSQL中国大会,参会票抢购!

由 PostgreSQL中文社区与ITPUB联合主办的第九届《PostgreSQL 中国技术大会》将在北京隆重召开。PostgreSQL 作为功能最强的的开源关系型数据库之一,得到了越来越多企业的推广和运用,也越来越受到广大技术爱好者的欢迎和重视。这将是 PostgreSQL 的又一次交流盛会。
----------------------------------------
时间:2019年11月29~11月30日

点击报名>>
TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 
京ICP备09055130号-4  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表