How do I get started designing and implementing a script interface for my .NET application?

后端 未结 8 766
礼貌的吻别
礼貌的吻别 2021-01-30 13:47

How do I get started designing and implementing a script interface for my .NET application?

There is VSTA (the .NET equivalent of VBA for COM), but as far as I understan

8条回答
  •  有刺的猬
    2021-01-30 14:19

    [EDIT: As covered at length in the comments in this, assuming you have a significant need to enable internal scripting where you are hosting snippets or functions someone gives you to customise your app, as opposed to a purely external scenario where one is providing a facaade to allow people to dig stuff out of your app on a more rigid predefined basis]

    IronRuby and IronPython are very neat and appropriate for this (but as the other answer says, PowerShell may be appropriate if you have a more infrastructure-type thing).

    EDIT: Other ideas for enabling internal scripting are

    • using Windows Workflow Foundation (exposing activities to it and/or hosting instances of workflows)
    • using Spring.NET's Expression Language (which is terse, easy to doc and learn but surprisingly powerful)

    EDIT 2 June 2011: IronJS may also be a suitable candidate, there's a Hanselminutes that talks it thru.

提交回复
热议问题