脚本语言嵌入到C#/。NET应用程序?应用程序、脚本语言、NET

2023-09-02 20:45:46 作者:我不再x你,逃离我

[查看only类似的问题我可以找得到的回答前不久,并包含对大多IronPython的。我要考虑其他选项,以及] 的

[The only similar question I can find was answered long ago and contains a reference to mostly IronPython. I want to consider other options as well]

我们已经用C#编写一个复杂的数据分析应用。应用程序应该为用户提供自定义的数据分析任务的复杂手段。目前,我们使用的配置文件和Excel表格的混合物,以指定这一点,但它变得笨重,所以我们正在寻找一个脚本语言嵌入。

We have a complex data analysis application written in C#. The application should provide users with a sophisticated means of customizing their data analysis tasks. Currently, we use a mixture of configuration files and Excel tables to specify this, but it gets unwieldy, so we're looking for a scripting language to embed.

什么是最好的脚本语言对C#/。NET嵌入?是否有可能以某种方式嵌入VBA同样到Excel / Word中?或者,也许是的JavaScript / Lua的使用?

What's the best simple scripting language for C#/.NET embedding? Is it possible to somehow embed VBA similarly to Excel/Word? Or is perhaps JavaScript/Lua are used?

不用说,它应该容易一些API和物体从主应用程序暴露到嵌入的脚本。

Needless to say, it should be easy to expose some API and objects from the main application into the embedded scripts.

推荐答案

我知道其他的问题,引用 IronPython的,但我还是觉得它应该是在这里,因为我认为这是最好的选择之一。

I know the other question references IronPython, but I still feel like it should be here because I think it's one of the best options.

另一个伟大的选择是 IronRuby的。主要的区别我看到的是,如果你的开发者/用户必须使用Python或Ruby的任何经验,可转让。

Another great option would be IronRuby. The main difference I see would be if your developers/users had any experience with either Python or Ruby that could be transferable.

说真的,到底是你最好的选择将是是最容易被用户适应了一种语言。除非他们接受它,并能提高工作效率比他们的老方法是不值得的。

Really, in the end your best option is going to be a language that is most easily adapted to by the users. Unless they accept it and are able to be more productive than they were with the old method it isn't worth the effort.