- Rails-API is exciting. It means better defaults, including less bloat, for developers taking these options
- Turbolinks is even less exciting than it wasn't a few years ago.
- Several other changes boil down to "better performance". Let's hope that pans out.
Furthermore, the optimizations that TL v5 provides means that you can use your webviews for mobile and get an incredibly responsive experience. That is what they are doing with Basecamp and they're able to provide a first class mobile experience on iOS, Android, a desktop app, all with a team of 12 developers (https://m.signalvnoise.com/the-majestic-monolith-29166d02222...). That's fucking impressive. On top of that, they've release the generic iOS and Android wrappers so that you can roll your own mobile applications with Rails and Turbolinks.
https://github.com/turbolinks/turbolinks-ios
https://github.com/turbolinks/turbolinks-android
There's no other framework out there that remotely comes close to providing that value to the end developer.
The market demands that your app be present on multiple platforms, which is usually a fucking nightmare if you're a small dev team. These Turbolink additions now give you a fighting chance.
Among other things, since its inception it has messed with the CSS heirarchy, resulting in the fact that by default it loads all the CSS and JavaScript for all pages, in an order you probably don't want. (Note: there is a reason the "C" in CSS stands for "Cascading". It wasn't designed to all be loaded at once.)
If you DO want "one page apps", then fine. If you don't, and you have a significant site with more than a couple of dissimilar pages, it will probably be more performant if you disable Turbolinks and load only the JavaScript and CSS necessary for a given page, i.e., the conventional approach.
"sucks for other use cases"? Which use cases have you use TurboLinks where it wasn't a good fit?
Basecamp isn't a trivial one page app; it has over 200+ screens.
For page changes, CSS is generally scoped by controller action classes. Quick look up by the browser, penalty negligible.
All of the JS is loaded, but again, you can invoke the needed js for the page by looking at the body/action selector. Again, a few if checks on the "page:change" callback.
Weighed against the traditional: a full request to the server which includes a download of relevant CSS for the page, a download of relevant javascript for the page, parsing of that css, parsing of js, and then execution of that js.
2) "Basecamp isn't a trivial one page app; it has over 200+ screens." I didn't say it was. Read again. However, Basecamp IS written in such a way as to heavily rely on Turbolinks.
3) "For page changes, CSS is generally scoped by controller action classes. Quick look up by the browser, penalty negligible." Not in our tests with Rails 4.2.
4) "All of the JS is loaded." Yep. The rest of your sentence is not relevant to my point.
You seem to think my objection was that there is some kind of difficulty accessing specific CSS/JavaScript under Turbolinks. Nothing of the sort. Rather the opposite, really: it was that there is too much loaded, specifically in ways that disrupt standard CSS hierarchy.
Obviously that can be compensated for by scoping. That wasn't my point. The point was that IT WORKS DIFFERENTLY THAN THE STANDARD CSS HIERARCHY. Understand?
"Weighed against the traditional: a full request to the server which includes a download of relevant CSS for the page, a download of relevant javascript for the page, parsing of that css, parsing of js, and then execution of that js."
There are times when that is desirable over having that CSS and JS always loaded. I get that you don't seem to be able to think of any, but we've encountered many.
I'm not going to get into an argument with you here about which is "better". Which you seem to want. I simply said there are use cases that are appropriate to each.
I tried partial rendering in TL3 and liked what it did. I then moved to TL5 and couldn't figure out how to migrate my code that made use of the partial rendering feature. It'd be nice if they provided a better upgrade guide on how to accomplish similar tasks between TL3 and 5 to make the transition easier.
Turbolinks messes A LOT with conventional design. Unless you really want the "one page" approach, or have a small, simple app or site -- or even if you just want to design a site using normal CSS conventions -- then Turbolinks gets disabled right away.
Fortunately, we can still do that. I can legitimately question the decisions made regarding default settings, but at least those settings can be changed.
Highlights for me will be:
- Actioncable (real-time communication over websockets)
- Rails-API is merged into core.
- Min ruby version is 2.2 (performance improvements via Garbage Collector)
- Little bit of code cleanup (less code to run)
- Turbolinks 3 (single-page applications)
- Evented file system monitor (faster development environment)
I think they have done a great job with the release. Especially removing Celluloid, Redis, and EventMachine as a dependency for ActionCable part.
I only have one small concern about the Turbolinks part. It hasn't been my choice until now for the projects because of the compatibility issues with other libraries. It always felt like the Quicktime player on Mac OS. Sure you can use it but you better off with something else.
But I really want it to be something i can use out of box this time. Partial rendering is not there yet but lets wait and see how it turns ut.