TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How can Rails react to the rise of the JavaScript applications?

10 点作者 andrzejkrzywda超过 11 年前

4 条评论

sbooks超过 11 年前
I have been using Opal with the Vienna front-end framework and have really enjoyed it. Opal allows me to write ruby on the front-end and the back-end.<p>Many times I have tried to get excited about javascript, but just can&#x27;t do it. In the end, I love ruby and can&#x27;t force myself to love javascript.<p>Opal has been surprisingly stable and it allows me to run ruby anywhere you can run javascript. Vienna is still very alpha, but still gets the job done. The author says they are working on things such as two way data binding (the part I love about Angular)<p>In the end I hope that Opal becomes the standard for Rails, but even if it doesn&#x27;t, I plan on using it for all my next projects.
saevarom超过 11 年前
I think that the RJS way is a perfectly good way to sprinkle some ajax magic into most applications that are, more or less, CRUD applications. I&#x27;ve done this in numerous simple CRUD apps and it allows for very rapid development. If you need something more complex you can build the API in Rails and then use whatever javascript front-end framework you like.
shaunrussell超过 11 年前
This is more of a question of &quot;the right tool for the job&quot;. If you are building a javascript client, your back end should be an API.<p>So the real question here is: is Rails good for building APIs? Yes. Are there other alternatives that may be better? Yes.
niveus超过 11 年前
Rails 4 brought along Turbolinks which is a step in the framework direction. I really think those frameworks are overly complex anyway. I&#x27;ve never seen a site that used one and didn&#x27;t suck to use (slow&#x2F;buggy UI).