java 中是否存在handlebars.js 实现?
目前,我在客户端和服务器端,分别使用javascript和java实现。
然而,Mustache 有一些限制,相对较新的 Handlebars.js ( http://www.handlebarsjs.com/ ) 尝试克服。
然而据我所知,handlebars 目前只有一个 javascript 实现。 有人知道 Handlebars 的(实验性)java 实现吗?
Currently I'm using Mustache templates ( http://mustache.github.com/ ) both on the client and server-side, using javascript and java implementation respectively.
However, there are some limitations in Mustache which the relatively new Handlebars.js ( http://www.handlebarsjs.com/ ) tries to overcome.
However as far as I see it handlebars only has a javascript implementation as of yet.
Anyone knows of an (experimental) java-implementation of Handlebars?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我刚刚看到这个弹出:
https://github.com/jknack/handlebars.java
原来在这里:
https://github.com/edgarespina/handlebars.java (更新您的 Maven 依赖项作为项目组 ID 也已更改)。
我还没有测试过。
I just saw this one pop up :
https://github.com/jknack/handlebars.java
which was originally here:
https://github.com/edgarespina/handlebars.java (update your maven dependencies as the projects group id has changed also).
I have not tested it yet.
我还没有看到把手的 Java 实现。 Handlebars 最初由 Yehuda Katz,主要是 Ruby 和 JavaScript 开发人员,因此是它的 JavaScript 和 Ruby 实现。 Handlebars 是 Mustache 语法的扩展,因此不是 Mustache 标准的一部分。
I've not seen a Java implementation of handlebars as yet. Handlebars was originally developed by Yehuda Katz, predominantly a Ruby and JavaScript developer hence the JavaScript and Ruby implementations of it. Handlebars is an extension of the mustache syntax and thus not part of the mustache standard.
理论上,车把可以与犀牛兼容。我们的团队在 java 堆栈中使用 rhino 在服务器上编译 less css 文件。此人似乎已向车把添加了 rhino 支持:
https://github.com/wycats/ handlebars.js/pull/49
尽管它还没有被拉入仓库。
In theory handlebars could be compatible with rhino. Our team uses rhino in our java stack to compile less css files on the server. This person looks to have added rhino support to handlebars:
https://github.com/wycats/handlebars.js/pull/49
although it has not been pull into the repo yet.
Handlebars 在最简单的模板示例中与 Rhino 配合良好:)
https://github.com/MathieuLorber /Handlebars.js-Rhino-test
我暂时没有更进一步......
Handlebars works well with Rhino on the simplest template example :)
https://github.com/MathieuLorber/Handlebars.js-Rhino-test
I haven't gone further for the moment...