I watched the live stream of DHH’s Railsconf 2015 keynote yesterday and he was talking about Rails 5. Here is a quick look at the new things I found out thats coming in Rails 5.
1. Turbolinks 3
Consider you have a simple blogging application where you can add posts and comments. So there are basically 2 important sections of a blog page. One the blog post self and second are the comments. Section one is not going to change frequently. But section two which is comments will keep changing. So in turbolinks 3, you can tell the server to just update the comment section and keep the rest of the page as it is, as there is no need to refresh the whole page. This is an attempt to reduce the page load time even further and improve the experience for the user.
You can specify that this part of the page will not change by mentioning something like this “turbolink-permanent” in HTML.
This sounds interesting. This is an attempt to implement WebSockets the Rails way. Making it super easy to subscribe to a channel, sending and receiving messages over the channel.
The code looks like a controller code, so I think before_filters should also work with classes inheriting from ActionCable::Channel::Base.
1. Code snippets are screenshots from DHH’s keynote live streaming.
2. This is just glimpse of what I took away from his keynote. I did not see the whole thing from the start, so I am not sure what else he talked about.