在网络应用程序中使用 Boo
我正在尝试在现有的 Web 应用程序中支持嵌入式脚本,并希望我们的用户能够使用 HTML 编辑器编写 Boo 脚本,问题是 BOO 使用类似 python 的缩进(而不是更传统的语言(如 C# 和爪哇)。
这附近还有吗?有没有比 Boo 更好且没有缩进问题的替代方案?
I am trying to support embedded scripting in an existing web app and would like our users to be able to write Boo scripts using an HTML editor, problem is BOO uses python-like indentation (instead of curly brackets in the more traditional languages like C# and JAVA).
Is there anyway around this ? Is there a better alternative than Boo that does not have those indentation issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Boo 的一大优点是该语言本身非常可定制。它包括一个编译器步骤 WSABooParsingStep,使语言与空白无关。
Brail(单轨铁路和 ASP.NET MVC 的视图引擎)使用 Boo 的这种变体,您可以将其用作您自己的实现的模型。 Brail 源代码位于此处, 此处进行测试。
One of the cool things about Boo is that the language itself is very customizable. It includes a compiler step WSABooParsingStep that makes the language whitespace-agnostic.
Brail (a view engine for Monorail and ASP.NET MVC) uses this variant of Boo, you could use it as a model for your own implementation. Brail source code is here, tests here.
空白有什么问题?
在文本区域中使用 Tab 键?
关于如何执行此操作,Google 上有很多结果。
否则,您能澄清一下您的问题吗?
What's the problem with the whitespace?
Using the tab key in a textarea?
There are many results on Google on how to do that.
Otherwise, could you please clarify your problem?
上周与最终用户进行了几乎相同的讨论。人们的技术知识最少,大多是面向业务的。
所有人都同意基于缩进的语法看起来更干净,感觉更简单。因此,我计划在下一个项目中使用基于缩进的脚本。
Got almost the same discussion with end users last week. People had minimum technical knowledge, mostly business oriented.
All agreed that indentation based syntax looks cleaner and feels simpler. So I plan to use indentation based scripting in my next project.