Rails' Degenerate Front-End Support

by ricny046on 8/7/2014, 3:42 PMwith 2 comments

by btownon 8/8/2014, 4:07 AM

The closest thing I've ever seen to the "holy grail" for Rails front-end support is https://github.com/ssorallen/turbo-react/ . Theoretically, any user interaction would render an entire page declaratively in the Rails style we've come to know and love, and the frontend would grab the full HTML response over AJAX, parse it, diff it with a Shadow DOM that it maintains, and update individual components. So, for the small sacrifice of maybe a few extra SQL queries you'd have cached anyways, you'd never have to worry about things like creating and maintaining a JSON API just for the sake of having better frontend interactivity. Right now, this implementation is just a regex-hacked-together proof of concept, but I could see things like being able to demarcate components that modify their own children (like maps and rich editors), and allowing components to reconcile themselves in customizable ways (like animations of disappearing div's). Now, if only startup life gave me time to build this out correctly...

by kaonashion 8/7/2014, 6:17 PM

Start by nuking Sprockets from orbit.