是否有与 Java 的 Wicket 相当的 Ruby 版本?
这个想法是用纯 XHTML 模板替换 ERB,并且视图将是操作模板内容的纯代码。
这已经完成了吗?
The idea would be to replace ERB with templates that are pure XHTML and that the view would be pure code manipulating the template content.
Have this been done already ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
曾经有 Lilu by Yuri Rashkovskii,但不再维护。不过,它仍然可用,所以如果您有兴趣,可以自己维护它。 (实际上,代码非常少,并且模板部分本身不需要更改。唯一可能需要更改的部分是集成到 Rails 视图引擎中,这应该是相当简单,现在 Rails 3 实际上拥有一个合适的视图引擎。)
一个利用 HTML5 的
data-
属性的新系统是 RuHL,作者:安德鲁·斯通。简单介绍一下(从网站上盗来的):There used to be Lilu by Yuri Rashkovskii, but it is no longer maintained. It is still available, though, so if you're interested you can maintain it yourself. (It's very little code, actually, and the templating part proper doesn't need to change anyway. The only part that probably does need to change is the integration into the Rails view engine, and that should be fairly trivial, now that Rails 3 actually does have a proper view engine.)
A newer system that leverages HTML5's
data-
attributes, is RuHL by Andrew Stone. Here's a quick taste (stolen from the website):Trellis 是在 Ruby 中创建组件框架的尝试。它更多地借鉴了 Tapestry,但应该与 Wicket 有相似之处。 http://www.trellisframework.org/
Trellis is an attempt to create a component framework in Ruby. It's borrows more from Tapestry, but should have similarities to Wicket. http://www.trellisframework.org/
我不确定这是否正是您的意思,但小胡子听起来很相似:
http://github.com/ defunkt/mustache http://www.rubyinside.com/mustache-for-logicfree-views-in-your-ruby-web-apps-2599.html
I'm not sure if this is exactly what you mean, but mustache sounds similar:
http://github.com/defunkt/mustache http://www.rubyinside.com/mustache-for-logicfree-views-in-your-ruby-web-apps-2599.html