What is the Current State of the Art in AJAX + Rails?
I was quite surprised to read about RJS in Rails 3. Is this the way most rails sites work with AJAX?
And if I'm working with Backbone (and this is a good example), won't it have conflicts with开发者_StackOverflow中文版 ujs?
Rjs is easy to use but is not the proper way to deal with Ajax. Rails developers know that; all the more, RJS should be extracted to a gem. Yep, sever side js is not that scalable.
Backbone has been developed with Rails backend, and it's philosophy is a bit inspired from the framework. So you won't have any problems: it has been extensively tested.
Speaking about Backbone and Rails, I suggest you use the backbone-rails
gem (my fork handles better the delete
method but hasn't been merged yet).
Don't know about "most", but for some things, it's way easier than the alternatives (storing stuff in DOM, etc.) Would it conflict with Backbone? Dunno, but if you're using Backbone, what would you be using RJS for (except for non-Backboney parts, if any)? If you're using Backbone wouldn't you just use the Rails JSON bits?
精彩评论