2

I'm looking for a Web UI toolkit for a Rails-based application. I have an experience with YUI but not in a Rails context. I have many questions I wish you could help me to answer.

  1. Do you use a web UI toolkit like YUI, ExtJS or JxLib within your Rails application ?
  2. Which UI toolkit is the most Rails-friendly ? Since most are not based on Prototype, is the co-existence of Prototype and another Javascript library (MooTools, JQuery, ...) easy and safe ?
  3. Do you mix usual 'traditional' Rails view development (rhtml, rjs) with a UI toolkit-based development ? In the same application ? In the same view ?
  4. Do you use a Rails plugin or do you code plain Javascript ?

Thanks all for your answers.

Laurent

4

2 回答 2

1

如果您不想使用 Prototype,则无需使用- 例如,JQuery 在 Rails 社区中非常流行。不过,如果我同时运行 JQuery 和 Prototype,我会担心潜在的难以解决的冲突。

于 2008-12-17T11:55:14.643 回答
1
  1. 我们现在正在使用 Ext 和 Rails 构建一个相当大的应用程序。你可以在这里看到一些关于它的讨论。

  2. AFAIK 很容易将 JQuery 与其他 js 库一起使用(其他 js 库也可能是这种情况)。但是,我强烈建议您一次只使用一个库,以保持清晰。

  3. 我们实际上正在构建两个应用程序——服务器端 Rails 应用程序来处理数据并通过 JSON API 公开它们,以及使用此 API 的客户端 Ext 应用程序。为了生成客户端应用程序,我们通过 ERB 解析 Javascript 源代码,以便我们可以使用一些帮助程序来构建它。

  4. 我们使用带有一些自定义助手的纯 Javascript。

希望能帮助到你。

于 2008-12-17T10:54:15.437 回答