What Is the Best Scripting Language to Embed in a C# Desktop Application

What is the best scripting language to embed in a C# desktop application?

I've used CSScript with amazing results. It really cut down on having to do bindings and other low level stuff in my scriptable apps.

Is there any low-effort way to embed a scripting language in a .NET application with Intellisense support?

Actipro provides this for C# http://www.actiprosoftware.com/products/dotnet/windowsforms/syntaxeditor/addons/dotnet/default.aspx with a free version.

Which programming language is simplest to use (for the user) as an integrated scripting language?

Why do you need a whole programming language to calculate the mark?

Simply use your programming language of choice to create a nice interface where the teachers have some flexibility.

You could for example have a simple input and allow the teachers to enter in some variable you've already defined, maybe $points and $max_score as well as a few basic math operators (*/-+) and then you can read the input and interpret it.

Alternatively you could use drop downs and other control to have a finer level of control, the options here are really only limited by your imagination.

Scripting language for embedding into C#/.NET applications?

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.

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.

Which language/platform to develop desktop application based on following criteria

To be honest, I'd choose Java (with a small component of C) for the following reasons, based on your requirements.

  • Lifetime of language/API/platform/framework- i.e., how future-proof will the investment in this application be?... the product has a long life-cycle (10). That really depends on what you mean by long. I seriously can't imagine Java disappearing, simply due to its huge installed base. C or C++ isn't disappearing either but I always think of the VB6-to-VB.net migration issues when contemplating the future of C#.

  • Will need to communicate with devices using USB and/or ethernet (9). Whilst Java isn't directly ideal for this, it has JNI to do the grunt work. You'll still need a C component to do this (and it will change for each platform but it's better to have the bulk of your code write-once - with C, you'll probably have most of your code changing for each platform, and with C#, well, is it really supported on platforms other than Windows?). Another alternative is JNA which looks like a "Python ctypes" for Java (access to shared libraries and DLLs without the JNI interfacing layer).

  • Availability of resources, tutorials, support (9). All the languages have a huge resource cross-section on the web.

  • Richness and breadth of libraries available (9). You have Boost for C++ and cross-platform GUIs but they're something that has to be added - there's nothing built in to the development environment like with Eclipse/Java.

  • Unit testing (9). Same response as availability of tools below - there are plenty of (free) Eclipse plug-ins that automate unit testing.

  • Availability of engineers with relevant skills (8). All the languages you mention have a plethora (I love using that word) of people able to do the job.

  • Availability of quality IDE/tools (8). This is Eclipse. No two ways about it, in my mind. The number of plug-ins for it is truly immense. NetBeans may look nicer but I'd rather have functionality than looks (and so would my wife, so that's lucky :-).

  • Cost of IDE/tools (7). Eclipse is free.

  • The application will need to be able to interpret a scripting language (6). Last I heard, Java now includes JavaScript as a built-in as well as the ability for developers to add their own scripting engines.

  • Cross-platform (3). C#, no (despite the existence of Mono, I still see risks that it will fall afoul of MS one day, and that not many is the FOSS world will work on it due to its MS associations).

Using C# as a scripting language for a C# application

Specifically for auto-complete, you will need to make use of two systems: a parser, and reflection.

A parser is a pretty straightforward concept, in theory, but I'm sure that it won't be easy to write for a language with as much syntactic sugar and as many context-sensitive keywords as C#.

Since .NET is inherently reflective, and provides a reflection framework, that part shouldn't be incredibly painful, either. Reflection allows you to manipulate the object-oriented elements comprising compiled assemblies--and the assemblies themselves--as objects. A method would be a Method object, for example. You can take a peek at this system by examining the members of the Type class, which provide one basic starting point for reflection. Another useful starting point is Assembly. MSDN, as usual, has a wealth of "official" information in a structured format.

What is a good desktop programming language to learn for a web developer?

edit:

A web programmer wants to create Windows applications and you recommend C?

What's wrong with you people?!

/edit

Obviously C#.

C# will be easier to get into and will let you build Windows applications using WinForms or WPF and all the new Microsoft toys in .NET. If you know your way around PHP, you should already be familiar with the syntax, object oriented concepts, exception handling, etc.

I suggest you don't complicate your life with C and definitely not with C++ if all you want is to create Windows GUIs. They do provide a good educational experience and they are useful for more advanced things (cross platform development using other toolkits for instance) but at the price of a steeper learning curve and reduced productivity.

Also, if you are a web developer, C# is the only language among the 3 options that you can (realistically, heh) use for the web. ASP.NET is not a bad framework and might be worth investigating too.



Related Topics



Leave a reply



Submit