📜 ⬆️ ⬇️

Week on Rails (edition of September 10, 2008)

Welcome to the fifth edition of Weeks on Rails, a weekly report on the near-rail community. Antonio Cangiano (the author of the idea) was quite busy , so this week I decided to replace him.

You've probably already heard about the release of Rails 2.0.4 and Rails 2.1.1 . Both releases - basically fix errors, for details go to the lists of changes.


If your application on Rails uses a lot of heavy SQL queries, you probably want to take a look at the Fernando Blat plugin called Query memcached . This plugin replaces the standard Rail functionality for caching the results of database queries, saving them in memcached for use in subsequent queries.
')
Have you ever tried to implement an "advanced search" in the application on Rails? And most likely, your controllers from this very fat. One of the solutions to this problem is Searchgasm from Binary Logic - a plug-in, object-oriented wrapper around a database query, thanks to which the code of your controllers will remain simple and short.

Ryan Daigle told us about new features introduced in the latest revisions of the Rail code: Connection Pooling (number of connections to the database), Shallow Routes (“flattening” routes to nested resources), and also Mailer Layouts (“wrappers” for email messages). ). Soon we will see a candidate for the release of Rail 2.2, so stay tuned.

For your friends, Java programmers using Apache Derby who want to try out JRuby, Michael Galpin wrote an introduction to Rails using JRuby and Derby .

Last week, Mark Imbriaco from 37 Signals wrote an excellent article and screencast about how they use HAProxy on the server . If you are not aware of the benefits of using HAProxy before apache round robin load balancer, be sure to check out the screencast.

You may have started using jQuery instead of Prototype in Rail applications. You could use a plugin for this (for example, jQuery on Rails ), but if you started from scratch, you probably have many problems with sending authentication marks (authenticity tokens) in your AJAX requests. Lawrence Pit described the jQuery code that you need to avoid further problems.

Neverblock is a library that allows you to use Ruby Fibers (Ruby Fibers) to write non-blocking concurrent code. As part of this project, a non-blocking PostgreSQL adapter , a non-blocking MySQL adapter was recently released, and more recently a library for using their Fiber on Ruby 1.8 in conjunction with Rails with stunning performance test results! The project is very young, but it is another step towards safe multi-line Rails.

Finally, I want to talk about several events. Ruby DCamp will be held October 11-12 in Arlington, Rails Summit Latin America will be held on October 15 and 16 in Sao Paulo, in Brazil, and South Carolina Ruby Conference will be held on October 18 in Colombia.

Thank you for reading! If you prefer to listen to this news (with minor clarifications), pay attention to the Rails Envy podcast number 46 , which was released today. It is not a mistake that the podcast covers the same information as this article, because I participated in its creation.

It is a translation. Original article: This Week in Rails (September 10, 2008) , by Gregg Pollack

Source: https://habr.com/ru/post/39535/


All Articles