Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing a scripting language in C#

We got a project where we're supposed to let 3rd party developers create their own GUI / CodeBehind drivers. Our GUI is running on WPF.

Now, we got a number of possibilities for doing so, but one of the things we're considering is to create some sort of sub-Xaml XSD to let the create their GUI using markup (dunno if it'll be XAML or our own XML-"language", and then let them do their code-behind through a scripting language.

I thought about it, and this model seems to have many similarities to the way World of Warcraft let's people create their own GUI. The way WoW does it, is by implementing the LUA scripting language and then expose some of their own API calls. We want similar behaviour.

However, we're on a sort-of strict deadline, and this implementation ain't the highest of our priorities. Therefore I'm looking for a .Net compliant script parser / "compiler", to use in our project. Which scripting language we're using is not a major concern, we just want to be able to implement it rather fast, without too much fuzz.

Does anyone know of this sort of library? Or do you guys have a smarter solution for these requirements?

Obviously, we're dreaming of creating our own WYSIWYG editor and our own domain specific language, but this seems like overkill for us. We just want a scripting language which can do nothing but to do calls though our API while letting the 3rd party developer use conditionals, loops, maybe OO, etc..

Thanks in advance :)

like image 475
cwap Avatar asked Nov 28 '22 15:11

cwap


1 Answers

You can use IronPython as your scripting language. Here's an article that gives a basic idea how you can do it.

like image 160
Vadim Avatar answered Dec 06 '22 10:12

Vadim