适用于非开发人员的宏/脚本语言,具有简单的基于 GUI 的编辑器

发布于 2024-07-08 17:24:58 字数 728 浏览 9 评论 0原文

我们希望让人们能够向他们的账户添加一些逻辑(例如,给定一些参数,如何计算特定结果)。 因此,本质上,这相当于编写支持条件和表达式的简单业务规则。 然而,挑战在于为他们提供一个简单的在线编辑器,他们可以通过完全可视化的方式(最好是拖放 Expr 树节点——有点像 Y! 管道)来创建逻辑。

有人知道可以让人们做到这一点的脚本/宏/特定于域的语言吗? 挑战在于可视化编辑器,因为我们不想投资开发 UI 来进行编辑。 基本要求是:
1. 嵌入到另一种语言中,或安全运行(无 reboot -n>> ~/.bashrc
2.没有编码背景的用户可以轻松访问(不需要任何高级功能)
3. 最好有一个简单的基于 GUI 的编辑器来创建非开发人员可以访问的逻辑程序(有点像电子表格)
4. 生成编译时警告(无效代码)的能力会很好(类型安全?)
5. 能够在执行前嵌入解释器可用的一些数据(例如,namebirthdayamount

任何人都尝试过做某事像这样,有什么想法吗? 我研究了 Lua、Io、Python、Ruby 和许多其他语言,但本质上的挑战是我认为非程序员无法理解那么多代码。 如果可以轻松开发编辑器,可以通过“元编程”添加一些东西来表示 Ruby 也很好!

We wish to provide people to be able to add some logic to their accounts(say, given a few arguments, how to compute a particular result). So, essentially, this would be tantamount to writing simple business rules with support for conditionals and expressions. However, the challenge is to provide them a simple online editor where they can create the logic (preferably) by completely visual means (drag/drop Expr-tree nodes maybe -- kinda like Y! pipes).

Does anybody know of a scripting/macro/domain-specific language that lets people do this? The challenge is the visual editor, since we don't wish to invest in developing the UI to do the editing. The basic requirements would be:
1. Embedded into another language, or run securely (no reboot -n or <JUNK-DANGEROUS-COMMAND> >> ~/.bashrc)
2. Easily accessible to users without coding background (no need of any advanced features)
3. Preferably have a simple GUI based editor to create the logic programs accessible to non-developers (kinda like spreadsheets)
4. Some ability to generate compile-time warnings (invalid code) would be good (Type safety?)
5. Ability to embed some data before execution which is available to the interpreter (Eg., name, birthday, amount)

Anybody tried doing something like this and got any ideas? I looked at Lua, Io, Python, Ruby and a host of others, but the challenge essentially is that I don't think non-programmers will be able to understand the code all that much. Something that could be added via "meta-programming" to say a Ruby would be good as well, if an editor could be easily developed!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

染柒℉ 2024-07-15 17:24:58

事实上,微软正在开发 Oslo,这正是您的拿手好戏。
Chris Sells 最近写了很多相关文章。

它被设计为一种编写 DSL 以及使用名为 Quadrant 的图形工具直观地编写这些模型的方法。 听起来与您正在寻找的非常相似。

就开源而言,我认为 Ruby 可以接近,如您查看 _whytheluckystiff 的 Try Ruby 或 Hackety 即可看到。

As a matter fact, Microsoft is developing Oslo, which is right up your alley.
Chris Sells has been writing a lot about it recently.

It is designed to be a way to author DSLs and also to visually author these models with a graphical tool called Quadrant. Sounds very very similar to what you are looking for.

Open source wise, Ruby I think can be close, as you can see if you look at _whytheluckystiff's Try Ruby or Hackety.

美人如玉 2024-07-15 17:24:58

我认为您不会发现任何不太通用的东西,尤其是关于 GUI 编辑器。 据我所知,没有通用工具能够自动与您的程序交互,并能够从中查询数据并将脚本解释为软件中的命令 - 如果有的话,我希望有一个副本。 不是轻率,但您必须做一些(可能是很多)工作才能使其正常工作。 它可能会导致您编写自定义 DSL。

I don't think you'll find anything that isn't too generic, especially regarding the GUI editor. There's no generic tools as far as I know that will be able to automatically interface with your program and be able to query data from it and interpret the script into commands in your software -- if there is I'd like to have a copy. Not being flippant, but you will have to do some (probably alot) of work to get this working. It will probably result in you writing a custom DSL.

静赏你的温柔 2024-07-15 17:24:58

我会看一下 PowerShell。 您可以以非常可读的方式显示用户想要编写脚本的所有活动。
PowerShell 团队博客 和技术主管 Bruce Payette 在 Manning 的《Windows PowerShell in Action》一书中讨论了这一点。

I would take a look at PowerShell. You could surface all the activities a user would like to script in a very readable way.
There is some talk of using PowerShell to create a DSL on the PowerShell team blog and Bruce Payette, the technical lead, talks about this in his book Windows PowerShell in Action from Manning.

晨与橙与城 2024-07-15 17:24:58

另一方面是编写一些简单的东西,如超文本应用程序(HTA)——当然假设是 Windows——沿着我的 Clive 工具。 博客上的文章没有提到 HTA 版本,但本质上我可以在一个文本区域中输入 VBScript 风格的代码并当场解释它,输出进入表单上的另一个文本区域。

通过 HTA 为您提供 HTML 的所有表单控制以及 DOM,您可以相当快地想出一些有趣的东西。

At the other end of the scale is to write something simple as a HyperText Application (HTA) -- assuming Windows of course -- along the lines of my Clive tool. The article on the blog doesn't mention the HTA version, but essentially I could enter VBScript-ish code into one textarea and interpret it on the spot, output going into another text area on the form.

With HTAs giving you all the form control of HTML, plus the DOM, you could come up with something interesting fairly quickly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文