Backbone.js的前端REST风格的Rails的后台? [英] Backbone.js frontend with RESTful Rails backend?

查看:155
本文介绍了Backbone.js的前端REST风格的Rails的后台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网络世界的发展在最近几年开始用PHP,然后Rails的。从那以后,我一直在做Rails中所有的Web项目。

I started in the web development world with PHP, and then Rails in the recent few years. Since then I've been doing all my web projects in Rails.

最近似乎有朝着使滑轨作为纯的RESTful后端服务,并使用前端框架诸如Backbone.js的所有前端相互作用的运动。我不知道什么是你们的时间?这会不会是最终的未来呢?

Recently there seems to be a movement towards making Rails as a pure RESTful backend service and using frontend framework such as Backbone.js for all frontend interaction. I'm wondering what's you guys' take on it? Will this be the eventual future?

同时,除了Backbone.js的,什么是前端框架一些其他的替代品用于这一目的?

As well, besides Backbone.js, what are some other alternatives for frontend framework for this purpose?

另外假设我将要同时支持桌面版和我的应用程序的移动版本,这会是一个合适的路由拿?所以,我有不同的前端服务的单一后端服务?这样我就不需要管理on Rails的侧各方面的意见?

Also assuming that I will want to support both a desktop version and a mobile version of my app, would this be a proper route to take? So I'll have a single backend service with different frontend services? This way I don't need to manage all the views on Rails' side?

谢谢!

推荐答案

有关客户端框架,本文其中20与赞成的和反对的列表:
<一href=\"http://net.tutsplus.com/articles/web-roundups/20-javascript-frameworks-worth-checking-out/\">http://net.tutsplus.com/articles/web-roundups/20-javascript-frameworks-worth-checking-out/

For Client-side frameworks, this article has a list of 20 of them with pro's and con's: http://net.tutsplus.com/articles/web-roundups/20-javascript-frameworks-worth-checking-out/

下面的列表:


  1. Backbone.js的

  2. Knockout.js

  3. 体位月神

  4. 卡布奇诺

  5. SproutCore的

  6. BatmanJS

  7. corMVC

  8. TrimJunction

  9. PureMVC的

  10. 贾马尔

  11. 巧克力

  12. sammyjs

  13. ExtJS的

  14. agilityJS

  15. 眼球

  16. activejs

  17. spinejs

  18. 的Qooxdoo

  1. Backbone.js
  2. Knockout.js
  3. Asana luna
  4. Cappucino
  5. Sproutcore
  6. BatmanJS
  7. corMVC
  8. TrimJunction
  9. pureMVC
  10. jamal
  11. choco
  12. sammyjs
  13. extJS
  14. agilityJS
  15. eyeballs
  16. activejs
  17. spinejs
  18. qooxdoo

这是大致的所有有关创建客户端,基于AJAX的,JavaScript的MVC框架。

These are roughly all about creating client-side, ajax-based, javascript MVC frameworks.

如果你正在寻找某个地方开始,那么我建议考虑客户端模板(... ...阿泰阿泰......阿泰)(就在V),以支持面向服务的架构(许多客户被服务端点创建支持)。

If you're looking to start somewhere, then I recommend thinking about Client-Side Templates (...ates...ates...ates) (just the "V") to support a service-oriented architecture (many clients are supported by service-endpoints you create).

这是涉及到模块化您的客户端code,使MVC给客户,并让业务逻辑住在该平台的新技术。很多软件作为一种服务的应用程序正在利用他们,并与先进的增加javascript库和框架,以及与HTML5,CSS3等浏览器功能也将是在客户端$越来越复杂p $ psentation。

It's a new technique that involves modularizing your client-side code, bringing MVC to the client, and let business-logic live in the platform. A lot of Software-as-a-Service applications are leveraging them, and with the increasing sophisticated of javascript libraries and frameworks, as well as browser capabilities with HTML5, CSS3, etc. there's going to be an increasing sophistication in client-side presentation.

所以,学会它。

有什么好处?

要套用链接了:撬动浏览器的缓存,去耦前端客户端presentation,异步加载,逐步呈现(对于一些框架),性能,AJAX交互,等等。

To paraphrase Linked In: for leveraging browser-caching, de-coupling your front-end client-side presentation, asynchronous load, progressive rendering (for some frameworks), performance, ajax-interaction, and more.

几大框架包括:


  1. 胡子

  2. dust.js

  3. 车把

  4. 谷歌Closure模板



  5. 风筝

  1. mustache
  2. dust.js
  3. handlebars
  4. Google Closure Templates
  5. Nun
  6. Mu
  7. kite

我强烈建议在看<一个href=\"http://engineering.linkedin.com/frontend/leaving-jsps-dust-moving-linkedin-dustjs-client-side-templates\">Linked在公司从JSP搬走向客户端模板以及他们为什么选择在dust.js <一个href=\"http://engineering.linkedin.com/frontend/client-side-templating-throwdown-mustache-handlebars-dustjs-and-more\">Linked在的前端客户端模板throwdown 了比较。他们进入更多的细节,以及研究,为什么他们改变了他们的协议栈支持这一(它包括利用3服务器端技术),以及他们所有,他们可以找到的框架比较。

I highly recommend looking at Linked In's move away from JSP towards Client-Side Templates and why they choose dust.js in Linked In's front-end client-side templates throwdown for a comparison. They go into much greater detail, and research, as to why they changed their stack to support this (it involved using 3 server-side technologies), as well as their comparisons of all the frameworks they could find.

这篇关于Backbone.js的前端REST风格的Rails的后台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆