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).
我们希望为人们提供能够为他们的帐户添加一些逻辑(比如,给出一些参数,如何计算特定结果)。所以,基本上,这就等于编写简单的业务规则,并支持条件和表达式。然而,挑战是为他们提供一个简单的在线编辑器,他们可以通过完全可视化的方式创建逻辑(最好)(拖放Expr树节点可能 - 有点像Y!管道)。
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
)
有没有人知道脚本/宏/特定于域的语言让人们这样做?挑战在于可视化编辑器,因为我们不希望投资开发用于编辑的UI。基本要求是:1。嵌入另一种语言,或安全运行(无重启-n或
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!
有人试过做这样的事情并得到任何想法吗?我看过Lua,Io,Python,Ruby和其他许多人,但挑战本质上是我不认为非程序员能够理解这些代码。如果可以轻松开发编辑器,那么可以通过“元编程”添加一些东西来表示Ruby也会很好!
4 个解决方案
#1
2
As a matter fact, Microsoft is developing Oslo, which is right up your alley. Chris Sells has been writing a lot about it recently.
事实上,微软正在开发奥斯陆,它正好在你的小巷里。 Chris Sells最近写了很多关于它的文章。
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.
它旨在成为一种创作DSL的方式,并使用名为Quadrant的图形工具在视觉上创作这些模型。听起来与你正在寻找的非常相似。
Open source wise, Ruby I think can be close, as you can see if you look at _whytheluckystiff's Try Ruby or Hackety.
开源智能,我认为Ruby可以很接近,你可以看看_whytheluckystiff的试用Ruby或Hackety。
#2
0
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.
我不认为你会发现任何不太通用的东西,特别是关于GUI编辑器。据我所知,没有通用工具可以自动与您的程序连接,并能够从中查询数据并将脚本解释为软件中的命令 - 如果有我希望有副本。不是轻浮,但你必须做一些(可能很多)工作才能使这个工作。它可能会导致您编写自定义DSL。
#3
0
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.
我会看一下PowerShell。您可以以一种非常易读的方式显示用户想要编写脚本的所有活动。有一些关于使用PowerShell在PowerShell团队博客上创建DSL的讨论,技术主管Bruce Payette在他的着作“Manning的Windows PowerShell in Action”中谈到了这一点。
#4
0
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.
在规模的另一端是写一些简单的超文本应用程序(HTA) - 假设Windows当然 - 沿着我的Clive工具。博客上的文章没有提到HTA版本,但基本上我可以将VBScript-ish代码输入到一个textarea并在现场解释它,输出到表单上的另一个文本区域。
With HTAs giving you all the form control of HTML, plus the DOM, you could come up with something interesting fairly quickly.
通过HTA为您提供HTML的所有表单控件以及DOM,您可以相当快地找到有趣的东西。
#1
2
As a matter fact, Microsoft is developing Oslo, which is right up your alley. Chris Sells has been writing a lot about it recently.
事实上,微软正在开发奥斯陆,它正好在你的小巷里。 Chris Sells最近写了很多关于它的文章。
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.
它旨在成为一种创作DSL的方式,并使用名为Quadrant的图形工具在视觉上创作这些模型。听起来与你正在寻找的非常相似。
Open source wise, Ruby I think can be close, as you can see if you look at _whytheluckystiff's Try Ruby or Hackety.
开源智能,我认为Ruby可以很接近,你可以看看_whytheluckystiff的试用Ruby或Hackety。
#2
0
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.
我不认为你会发现任何不太通用的东西,特别是关于GUI编辑器。据我所知,没有通用工具可以自动与您的程序连接,并能够从中查询数据并将脚本解释为软件中的命令 - 如果有我希望有副本。不是轻浮,但你必须做一些(可能很多)工作才能使这个工作。它可能会导致您编写自定义DSL。
#3
0
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.
我会看一下PowerShell。您可以以一种非常易读的方式显示用户想要编写脚本的所有活动。有一些关于使用PowerShell在PowerShell团队博客上创建DSL的讨论,技术主管Bruce Payette在他的着作“Manning的Windows PowerShell in Action”中谈到了这一点。
#4
0
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.
在规模的另一端是写一些简单的超文本应用程序(HTA) - 假设Windows当然 - 沿着我的Clive工具。博客上的文章没有提到HTA版本,但基本上我可以将VBScript-ish代码输入到一个textarea并在现场解释它,输出到表单上的另一个文本区域。
With HTAs giving you all the form control of HTML, plus the DOM, you could come up with something interesting fairly quickly.
通过HTA为您提供HTML的所有表单控件以及DOM,您可以相当快地找到有趣的东西。