Team With A Momentum

Team With A Momentum

The Ruby on Rails Team has been making every effort to refine their framework for a while. Just a few months ago, we heard about the upcoming Rails 5, and shortly after that, in December, they announced the first beta release of Rails 5, containing Action CableAPImode, and Rails command (working on BaseCamp3, launched in November, 2015). What a speed!

One of the new things in Rails 5 is Action Cable, a framework for handling WebSocketsAction Cableintegrates “an Event Machine-powered connection loop-a thread, backed channels layer for server-side processing, and a JavaScript layer for client-side interaction.” (Dhh, December 15, 2015, para. 2). That solution facilitates designing chats, notifications, and presence features. What is worth mentioning about Action Cable is getting access to one’s Active Record and PORO domain model in one’s WebSockets work. The team also added a new ActionController:: Renderer system to render templates outside of controllers, in case one needs to use server-side templates for WebSocketsresponses.

With regard to API mode, the team created a new application using rails new backend –api to slim the construct and configuration that assumes working with JSON, not HTML. Further, they explain that APImode relies on #tojson calls on model classes, by default, but “you can either use JbuilderActive Model Serializers, or look at the  new JSONAPI: : Resources_ for a more advanced solution” (para. 7).

Another important undertaking is “making bin/rails the one master command to rule them all” (para. 9). It is planned that bin/rails command will serve as a gateway through which developers can access their rake commands.

The new solutions hidden under the Action CableAPI mode, and Rails command concepts are intended to save developers’ time and make their work easier. Cool perspectives!