BT

InfoQ Homepage News Rails 4 Released: Faster Pages With Turbolinks

Rails 4 Released: Faster Pages With Turbolinks

Leia em português

This item in japanese

Lire ce contenu en français

This item in chinese

Bookmarks

The Ruby on Rails team has just released Rails 4.0. One and a half years in the making, Rails 4 comes with some interesting new features like Turbolinks, improved caching and is thread-safe by default. Many of the changes are already used by 37 Signals' Basecamp Next.

Turbolinks transforms your Rails application into a single page JavaScript application, that is, it does not load new pages but instead replaces the current page with new content from the server: 

This is similar to pjax, but instead of worrying about what element on the page to replace, and tailoring the server-side response to fit, we replace the entire body. This means that you get the bulk of the speed benefits from pjax (no recompiling of the JavaScript or CSS) without having to tailor the server-side response.

Rails 4 also comes with support for key-based cache expiration, which automates cache invalidation and thus makes it easier to implement intricate caching structures.

The release also dropped support for Ruby 1.8 and recommends to upgrade to Ruby 2. Ruby 1.9 is still supported, but Rails 5 will require at least Ruby 2. As usual, there's a detailled upgrade guide for Rails 3.2 applications to Rails 4.

Popular Rails books have also received an update: Agile Web Development with Rails 4 by Sam Ruby and The Rails 4 Way by former InfoQ editor Obie Fernandez.

For a more detailed list of changes, see the changelog. Have you already upgraded your application to Rails 4? We'd love to hear about your experience!

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • rails

    by Tom Tom /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    somehow rails almost always addresses the most popular issues I have in developing web apps... fantastic work!!

  • Re: rails

    by Jamal Soueidan /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Of course RubyonRails is a great framework for most web apps! and the community around it is even better :D

  • Re: rails

    by Mirko Stocker /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    So, have you upgraded your applications already?

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.