Re:Ask HN: In 2016, will Rails & Django be competitive again...
by macarthy12 on Wednesday October 02, 2013 @10:38AM
(#6482635)
>we borrowed a technique from Meteor and made our views reactive
Do you have any links or resource to share on that style?
Re:Ask HN: In 2016, will Rails & Django be competitive again...
by k1w1 on Wednesday October 02, 2013 @11:20AM
(#6482919)
I intend to extract the code from our project so we can share it, but haven't gotten around to it yet. It is a combination of Faye (for real-time updates), Rails for view rendering, and some clever Javascript that efficiently merges DOM changes. The last part is the key - it makes it efficient to update large parts of the screen without flickering, or needing to reattach JS event handlers.
The beauty is that it supports even the most complex reactive update use-cases. E.g. reactively updating sort order of a list for one user when another user renames an item in the list. The key benefit though is that you allows you to just write Rails code - there is no need to write Javascript for each new reactive view.
Re:Ask HN: In 2016, will Rails & Django be competitive again...
by macarthy12 on Wednesday October 02, 2013 @11:56PM
(#6487073)
Sounds interesting. Love to see it when you release it, better yet do a talk somewhere that gets on confreaks, then I'll see it!
It seems like a conf worthy talk.
For example, at aha.io we use Rails, and wanted to get the front-end performance of a Javascript-heavy app, but by taking advantage of what we know (which is writing ActiveRecord models, Rails controllers and ERB views). So we borrowed a technique from Meteor and made our views reactive - using Rails for the view rendering. That way we get the best of both worlds: the code only needs to be written once in Ruby, but the performance and reactivity is like an app that has a Javascript front-end.
This is just one example, but there lots of similar examples (think about the increasing use of functional programming styles). The incredibly rich ecosystem around Rails means that stuff just gets done faster - the ecosystem has done most of the work for you. Apart from Django, every other framework is still playing catchup.