Blog Banner
Ruby On Rails 5 Is Finally Out – Let’s Find Out Its New Features?
By: Admin Posted on: December 14, 2016 Category: Web Development

Finally, it’s here! Yes, it is! After 6 months of polish, 3 beta releases and weeks of discussions, Rails 5.0 version has been finally released. It’s one of the biggest releases since June 2013 (last Ruby On Rails release) and comes up with some exciting features and interesting changes. With hundreds of dedicated contributors, Ruby On Rails 5.0 is finally out without any doubt the best and most complete version of Rails released so far. With this latest release, Rails community has gone so strong and after so long. Ruby On Rails is packed with new features that are not only interesting but also keep this platform up to date. Moreover, the new version is all set to progress and embrace the future of technology.

 

What is Ruby On Rails?

 

Ruby On Rails, also known as Rails, is a high-level programming language and a server-side web app framework, originated in Japan. It is an open source platform, which is easy to learn, extend and involve less coding with fewer bugs. It is rich in libraries and a highly interpreted language like Python, Perl, Tcl/TK. Many renewed companies run their websites on Ruby, such as AirBnB, GitHub, and Hulu. It is a powerful framework which makes it handle multiple tasks at any given time.

 

What Is So Exciting About Rails 5?

 

Experts believe that Rails 5.0 is much better than Rails 4.2. There have been so many interesting changes and updates in the existing version. It will definitely prove as the most suitable platforms for the developers as it is future ready and highly competitive as compared to other development frameworks. The new version has several cool features, but two-star features of Rails 5.0 are ActionCable and API Mode. Both these features will allow you to create really solid and easy to use backend with Rails. There are many more frontend and backend features that will let developers enjoy working on Rails 5.0.

 

ActionCable: Pushing live updates is now possible through ActionCable. It is a brand-new framework that handles WebSockets in Rails, which is a computer communication protocol offering full-duplex communication channel over a single TCP connection. In the past, there was no such framework that relies on real-time features. WebSockets framework was used to add multiple real-time features to your app like chatting or notifications.

 

ActionCable is the integrated solution that can manage connections and serve as a JavaScript layer for client-side interaction and a channel layer for server-side processing. With ActionCable, it has become simple to make live features in designing like chat, notifications, and presence pretty easier. The most interesting thing about ActionCable is that you can easily access your entire Active Record and PORO domain model in your WebSockets work.

 

API Mode: Earlier, Rails was a framework for web apps that runs completely on web browsers. It was easy for you to build powerful and strong backend logic to interrelate it with data and to incorporate it with the frontend of your web app. Today, in many cases, the frontend and backend of an app are separated, and this is applicable to tablet and smartphone apps. But with Rails 5.0, you can generate your Rails app in API Mode. You can now build a full-stack application that uses a server-side depiction of HTML templates and also uses it as a companion for JavaScript or native apps that require backend to address JSON.

 

If you make a new Rails application using rails new backend – API, you will notice a downsized skeleton and configuration that presumes you will be working with JSON, not HTML. By default, API mode depends on #to_json calls on model classes, but you can either use Jbuilder, Active Model Serializers, or consider the new JSONAPI::Resources project for a more advanced solution.

 

Ref: http://weblog.rubyonrails.org/2016/6/30/Rails-5-0-final/

 

What Are Other Highlights of Rails 5.0?

 

  • There is a completely new logo for Rails, and you will see a welcome screen when you first create your tablet and smartphone app.

  • Puma is now the default web server used by Rails instead of Webrick.

  • Turbolinks 5 assures to load your pages much faster than before.

  • You can use new built-in helper methods to check whether a date is a weekday or on a weekend. Like “on_weekday” or “on_weekend”.

  • The test runner now reports failures inline. You don’t have to sew up the suite to see what went wrong.

 

Checkout the CHANGELOGs as there is so much new and good stuff available in all the frameworks:

 

  • Action Mailer CHANGELOG

  • Action Pack CHANGELOG

  • Action View CHANGELOG

  • Active Model CHANGELOG

  • Active Record CHANGELOG

  • Active Support CHANGELOG

  • Active Job CHANGELOG

  • Railties CHANGELOG

 

The release of Rails 5 is great news for both experienced and neophytes. ActionCable and API mode are some wonderful new features which present us with many more opportunities for building different types of apps with Rails. No more compromises with new Rails 5.0, as you don’t even have to consider different frameworks especially when you wish to have an API-only app or include real-time features. You can now build modern and high functional apps with Ruby on Rails in a short development time and simplicity of code.