Quantcast
Viewing all articles
Browse latest Browse all 10

Rails 3.1 rumors and news about features

Some of you must have heard about keynote that was delivered  on the morning of June 8, 2010 by Ruby on Rails creator, David Heinemeier Hansson. DHH started presentation saying that he did not like to get into “future code” so he would focus on Rails 3 but you know friends, by the end of his presentation, he began to talk regarding what he was hoping to see in Rails 3.1. Isn’t that a pretty interesting matter ??

One thing Hansson mentioned was that Rails 3.1 should improve the way Rails handles JavaScript, Style Sheets, icons and images.

lets talk about key features of Rails 3.1.0

1. Asset Pipelining
The two important folders of Ruby on Rails code structure are

  • app/ *   ———–  contains technical code
  • public/ * ———  contains code that is used for designing and javascripts
Guess what !! Rails 3.1 will have feature called “Asset Pipelining” in which you can write the code for stylesheets and javascripts in the app/ * folder like this :
The prime advantage of using pipelining is that after compilation of these files, your Ruby on Rails application will run on single css and javascript file which is neatly compressed without any kind of extra efforts.

 

2. Generating Sprites
Another feature introduced with Rails 3.1 is about Sprite Generation which is basically a method for combining many graphics into a single image. That single image will be then displayed using CSS.

<% sprite_css(“icons”) %> this code
  • Combines all images of a folder
  • Generates CSS
The advantage of using such technique is to reduce dozens of HTTP requests into one cache-friendly image file.

 

3. Automatic Flushing
The Rails 3.1 feature named “Auto Flushing” helps to boost the performance of Ruby on Rails application. Normally whenever we are downloading any page, there is a two step process:first, all the code gets compiled to generate html view and second, all necessary files like css, javascripts, images are being loaded one by one.
Rails 3.1 provides streaming of http response which can be done in more parts. For more information regarding this feature, you can check http://hemju.com/2010/09/08/how-rails-3-1-will-speed-up-your-application-with-automatic-flushing/

Ooh ! How can we forget what people tweets about Rails 3.1 ? I guess this is a cool tweet.

Amazing !!! Isn’t it ??

Sources :
http://fredwu.me/post/1207334598/a-speedier-rails-app-using-rails-3-1-arel-2-0

http://s3.amazonaws.com/dhhmix/rails3-railsconf2010.pdf

The post Rails 3.1 rumors and news about features appeared first on He. M. Ju..


Viewing all articles
Browse latest Browse all 10

Trending Articles