Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does it make sense to integrate scripting languages to C# apps?

Tags:

c#

.net

scripting

I have been thinking about integrating Ruby into my app, but some of my friends at work told me that C# is already very high level. But to me it seems like it has more baggage for doing very quick things.

What do you guys think?

Also if I do integrate, then does it make sense to limit it so that you can do just about anything using the existing functionality of the app, but not extend it?

Reason for this is, scritping languages aren't known for performance, and if you say give people to write Filters like Blur, Contrast, etc, then those would be way slower than they should be and degrade the experience of the client of the scripter, right?

like image 955
Joan Venge Avatar asked Apr 13 '09 18:04

Joan Venge


2 Answers

I've integrated (lua) scripting into applications, and I've also used c# itself as a "scripting language", by compiling dynamic assemblies on-the-fly from code provided by the user. I've also implemented "plug-in" systems using user-provided assemblies that conform to specific interfaces or base classes.

There are lots of things to consider, from security, to performance, to end-user confusion to consider. I don't think that you could make a blanket statement like "scripting languages don't belong in applications", or even "scripting languages belong in applications". Any given specific case needs careful consideration of all the options and the consequences of those options before running off and doing something that you might regret later.

like image 118
Mark Avatar answered Sep 21 '22 23:09

Mark


there may be a performance hit for a given feature when implemented through a script interface rather than natively through your app, but if you would like to allow your users to script your app and it allows them to implement a feature that is useful to them that is not supported natively in your app, then it seems like a good idea to me. If you end up with a particular user script that is very popular you could always release it as a native feature of your app in a later release if you can improve on its performance. Hope this helps!

like image 30
Adam Alexander Avatar answered Sep 17 '22 23:09

Adam Alexander