Баарлашуу:Ruby on Rails

Wikipedia дан
Jump to navigation Jump to search

Кичи пейилдикке, бул макала толук түрдө которулгандан соң жайгаштырылса ...

Ruby on Rails was extracted by David Heinemeier Hansson from his work on Basecamp, a project management tool by 37signals (now a web application company).[1] 2004-жылы Теке айында Hansson Ruby on Rails'ти ачык баштапкы код менен чыгарган, бирок 2005-жылы Бирдин айына чейин did not share commit rights to the project.[2] In August 2006 the framework reached a milestone when Apple announced that it would ship Ruby on Rails with Mac OS X v10.5 "Leopard",[3] which was released in October 2007.

2009-жылы Жалган куран айынын 15-де Ruby on Rails'тин 2.3 версиясы чыгарылган. Major new developments in Ruby on Rails include templates, engines, Rack and nested model forms.

  • Templates enable the developer to generate a skeleton application with custom gems and configurations.
  • Engines let one reuse application pieces complete with routes, view paths and models.
  • The Rack web server interface and Metal allow one to write optimized pieces of code that route around ActionController.[4]

2008-жылы Бештин айынын 23-дө, Merb аталыштуу, башка бир веб программанын фрэймворку чыккан, жана Ruby on Rails бирге иш жүргүзүүгө ниет бардыгын жарыялады. The Ruby on Rails team announced they would work with the Merb project to bring "the best ideas of Merb" into Ruby on Rails 3, ending the "unnecessary duplication" across both communities.[5] Merb was merged with Rails as part of the Rails 3.0 release.[6][7]

Техникалык Жак[булагын оңдоо]

Көптөгөн фрэймаворктордой, Ruby on Rails программалоонун уюштуруу үчүн Model-View-Controller (MVC) архитектурасынын үлгүсүн колдонот.

Ruby on Rails includes tools that make common development tasks easier "out of the box", such as scaffolding that can automatically construct some of the models and views needed for a basic website.[8] Also included are WEBrick, a simple Ruby web server that is distributed with Ruby, and Rake, a build system, distributed as a gem. Together with Ruby on Rails these tools provide a basic development environment.

Ruby on Rails relies on a web server to run it. Mongrel was generally preferred over WEBrick at the time of writingКалып:Citation needed, but it can also be run by Lighttpd, Abyss, Apache, nginx (either as a module - Passenger for example - or via CGI, FastCGI or mod_ruby), and many others. From 2008 onwards, the Passenger web server replaced Mongrel as the most used web server for Ruby on Rails.[9]

Ruby on Rails is also noteworthy for its extensive use of the JavaScript libraries Prototype and Script.aculo.us for Ajax.[10] Ruby on Rails initially utilized lightweight SOAP for web services; this was later replaced by RESTful web services. Ruby on Rails 3.0 uses a technique called Unobtrusive JavaScript to separate the functionality (or logic) from the structure of the web page, and jQuery is fully supported as a replacement for Prototype.

Since version 2.0, Ruby on Rails by default offers both HTML and XML as output formats. The latter is the facility for RESTful web services.

Ruby on Rails 2.3 relies on Ruby 1.8.6. Ruby on Rails 3.0 has been designed to work with Ruby 1.8.7, Ruby 1.9.2, and JRuby 1.5.2+; earlier versions are not supported.[11]

Фрэймворктун түзүлүшү[булагын оңдоо]

Ruby on Rails бир канча пакетчендерге бөлүнгөн, namely ActiveRecord (an object-relational mapping капмалга жетүү үчүн тутум), ActiveResource (веб тейлөөлөр менен камсыздайт), ActionPack, ActiveSupport and ActionMailer. Prior to version 2.0, Ruby on Rails also included the Action Web Service package that is now replaced by Active Resource. Apart from standard packages, developers can make plugins to extend existing packages.

Өнүгүшү[булагын оңдоо]

Ruby on Rails is often installed using RubyGems, a package manager[12] which is included with current versions of Ruby. Many Linux distributions also support installation of Ruby on Rails and its dependencies through their native package management system, however, these packages can often be outdated and unmaintained.

Ruby on Rails is typically deployed with a database server such as MySQL or PostgreSQL, and a web server such as Apache running the Phusion Passenger module.

There are many Ruby on Rails hosting services such as Heroku, Engine Yard, and Rails Playground.

Философиясы жана түзүлүшү[булагын оңдоо]

Ruby on Rails is intended to emphasize Convention over Configuration (CoC), and the rapid development principle of Don't Repeat Yourself (DRY).

"Convention over Configuration" means a developer only needs to specify unconventional aspects of the application. For example, if there is a class Sale in the model, the corresponding table in the database is called sales by default. It is only if one deviates from this convention, such as calling the table "products sold", that the developer needs to write code regarding these names. Generally, this leads to less code and less repetition.

"Don't repeat yourself" means that information is located in a single, unambiguous place. For example, using the ActiveRecord module of Rails, the developer does not need to specify database column names in class definitions. Instead, Ruby on Rails can retrieve this information from the database based on the class name.

Trademarks[булагын оңдоо]

In March 2007, David Heinemeier Hansson filed three Ruby on Rails related trademark applications to the USPTO. These applications regard the phrase "RUBY ON RAILS",[13] the word "RAILS",[14] and the official Rails logo.[15] As a consequence, in the summer of 2007, Hansson denied to Apress the permission to use the Ruby on Rails logo on the cover of a new Ruby on Rails book written by some authoritative community members. The episode gave rise to a polite protest in the Ruby on Rails community.[16][17] In response to this criticism, Hansson replied:

"I only grant promotional use [of the Rails logo] for products I'm directly involved with. Such as books that I've been part of the development process for or conferences where I have a say in the execution. I would most definitely seek to enforce all the trademarks of Rails."[16]

Reception[булагын оңдоо]

Rails running on Matz's Ruby Interpreter (the de facto reference interpreter for Ruby) had been criticized for issues with scalability.[18] These critics often mentioned various Twitter outages in 2007 and 2008, which spurred Twitter's partial transition to Scala (which runs on the Java Virtual Machine) for their queuing system and other middleware.[19][20] The user interface aspects of the site continue to run Ruby on Rails.[21]

References[булагын оңдоо]

  1. Grimmer, Lenz Interview with David Heinemeier Hansson from Ruby on Rails. MySQL AB (February 2006). Текшерилген күнү 8 Июнь (Кулжа) 2008.
  2. 37 Signals, Rails core team profiles.. Текшерилген күнү 15 Июль (Теке) 2008.
  3. Hansson, David Ruby on Rails will ship with OS X 10.5 (Leopard) (August 7, 2006). Текшерилген күнү 8 Июнь (Кулжа) 2008.
  4. Hansson, David Rails 2.3: Templates, Engines, Rack, Metal, much more! (March 16, 2009).
  5. The day Merb joined Rails (27 Декабрь (Бештин айы) 2008).
  6. Ruby on Rails 3.0 Release Notes
  7. Ruby on Rails 3.0 goes modular. sdtimes.com (10 Февраль (Бирдин айы) 2010). Текшерилген күнү 6 Август (Баш оона) 2010.
  8. There were quite a few changes in the 2.0 release, including the way that Ruby on Rails generates scaffolding code.
  9. Official deployment instructions suggests use of Passenger
  10. Ruby on Rails includes the Prototype JavaScript framework and the Scriptaculous JavaScript controls and visual effects library.
  11. Rails 3.0: It's ready!. rubyonrails.org. — «Rails 3.0 has been designed to work with Ruby 1.8.7, Ruby 1.9.2, and JRuby 1.5.2+.»  Текшерилген күнү 30 Август (Баш оона) 2010.
  12. Ruby on Rails: Download. RubyonRails.org.
  13. "Ruby on Rails" Trademark Status. USPTO. Текшерилген күнү 1 Август (Баш оона) 2007.
  14. "Rails" Trademark Status. USPTO. Текшерилген күнү 1 Август (Баш оона) 2007.
  15. Rails Logo Trademark Status. USPTO. Текшерилген күнү 1 Август (Баш оона) 2007.
  16. 16.0 16.1 Forde, Pete Beginning Rails: From Novice to Professional (23 Июль (Теке) 2007). Текшерилген күнү 1 Август (Баш оона) 2007.
  17. Cooper, Peter David Heinemeier Hansson says No to Use of Rails Logo (24 Июль (Теке) 2007). Текшерилген күнү 1 Август (Баш оона) 2007.
  18. 5 Question Interview with Twitter Developer Alex Payne. radicalbehavior.com (29 Март (Жалган куран) 2007). — «By various metrics Twitter is the biggest Rails site on the net right now. Running on Rails has forced us to deal with scaling issues - issues that any growing site eventually contends with – far sooner than I think we would on another framework.»  Текшерилген күнү 18 Июль (Теке) 2009.
  19. Steve Jenson, Alex Payne, and Robey Pointer interview. Twitter on Scala. artima.com (3 Апрель 2009). — «We had a Ruby-based queuing system that we used for communicating between the Rails front ends and the daemons, and we ended up replacing that with one written in Scala. The Ruby one actually worked pretty decently in a normal steady state, but the startup time and the crash behavior were undesirable.»  Текшерилген күнү 18 Июль (Теке) 2009.
  20. Twitter jilts Ruby for Scala. theregister.co.uk (1 Апрель 2009). — «By the end of this year, Payne said, Twitter hopes to have its entire middleware infrastructure and its APIs ported to the new language. Ruby will remain, but only on the front end. "We're still happy with Rails for building user facing features... performance-wise, it's fine for people clicking around web pages. It's the heavy lifting, asynchronous processing type of stuff that we've moved away from."»  Текшерилген күнү 18 Июль (Теке) 2009.
  21. ryan king. Twitter on Ruby. evan weaver (25 Сентябрь (Аяк оона) 2009). — «We use Scala for a few things at Twitter, but the majority of the site is Ruby.»  Текшерилген күнү 29 Сентябрь (Аяк оона) 2009.

Bibliography[булагын оңдоо]

External links[булагын оңдоо]

Калып:Wikibooks

Калып:Ruby programming language Калып:Application frameworks