📜  Ruby 和 Ruby on Rails 的区别

📅  最后修改于: 2021-09-15 02:00:32             🧑  作者: Mango

1. 红宝石:
Ruby 是一种面向对象的脚本语言,于 1995 年推出,被称为通用编程语言。它是用C编程语言编写的。 Ruby 是一种安全的编程语言,其语法类似于 Perl 和Python。它是根据用户界面设计原理开发的,主要用于开发桌面应用程序。在开发应用程序时主要使用C++、 Java、VB.net。

一些使用 Ruby的顶级公司是 Github、Twitter、Airbnb、SCRIBD、Slideshare、Fiverr 等。

红宝石的优点:

  • 良好的内存管理和垃圾收集。
  • 良好的依赖管理。
  • 及时行乐。

红宝石的缺点:

  • 语法复杂性和错误出现。
  • 支持多种编程范式
  • 共享可变状态。

2. Ruby on Rails:
Ruby on Rails 是一个基于 MVC 系统的 Web 应用程序开发框架,它被称为数据库驱动的 Web 应用程序框架。它是用 Ruby 编程语言编写的。它被认为比 Ruby 语言更安全,其语法类似于 Elixir、 Python的Phoenix。它是根据 DRY(不要重复自己)和 COC(Convention Over Configuration)的原则开发的,主要用于开发 Web 应用程序。在开发应用程序时,主要使用 HTML、CSS、JavaScript 和 XML。

一些使用 Ruby on Rails的顶级公司是 Bloomberg、Crunchbase、zendesk、PIXLR 等。

Ruby on Rails 的优点:

  • 安全工具
  • 多才多艺的
  • 性价比高

Ruby on Rails 的缺点:

  • 运行时速度和性能。
  • 缺乏灵活性。
  • 开发成本高。

Ruby 和 Ruby on Rails 的区别:

S.NO.

RUBY

RUBY ON RAILS

01. Ruby is an object oriented scripting language launched in 1995.  Ruby on Rails is a web app development framework based on MVC system.
02. It is known as a general purpose programming language. Where as it is known as a framework for data base driven web app.
03. It was programmed in C programming language. It was programmed in Ruby programming language.
04. It is considered as a secure programming language. While it is considered as more secure than Ruby language.
05. It is not a framework. While it is a web development framework.
06. Ruby is commonly used in static website development. Ruby on Rails is not generally recommended when creating static website.
07. Ruby programming language is considered as taking inspiration from Perl and Smalltalk. Ruby on Rails is considered as taking inspiration from Django, Python’s Laravel, and PHP, respectively.
08. Ruby programming language is used to develop desktop applications. While it is used to develop web applications.
09. It was developed on the principle of user interface design. It was developed on the principle of DRY and COC.
10. Its syntax is similar to Perl and Python. Its syntax is similar to Phoenix in Elixir, Python.
11. While developing applications mainly C++, Java, VB.net are used. While developing applications mainly HTML, CSS, JavaScript and XML are used.
12. Some of the top companies which are using Ruby are Github, Twitter, airbnb, SCRIBD, slideshare, fiverr etc. Some of the top companies which are using Ruby on Rails are Bloomberg, crunchbase, zendesk, PIXLR etc.