Learn how to a build a cloud-first strategyRegister Now


Embedded scripting language for C#?

Posted on 2007-07-22
Medium Priority
Last Modified: 2013-12-17
I'm designing a business application in C#  that will allow the end-user to extend and automate some of the processes (like sending emails and checking stock levels), and I want to offer a scripting language interface for doing that as well as a wizard-type interface with drop down boxes, etc.

What I'm wondering is, whether I'd need to design a scripting language myself from scratch, and map some of the scripting functions to internal C# classes, etc, or whether there's something I can plug in and just update some kinda configuration file to define custom functions?

I want to make it really simple for the end user, to do things like...

If (Customer.HasPurchased(ProductA))
End If

Any suggestions?
Question by:ljbenson
  • 2
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 19542971
"or whether there's something I can plug in and just update some kinda configuration file to define custom functions?"

I think that's just wishful thinking...

You can use native C# by utilizing the Reflection.Emit namespace.

Or you could allow the use of VBScript via the Microsoft Script Control.
LVL 37

Accepted Solution

gregoryyoung earned 2000 total points
ID: 19544150
I think what you are lookingfor isnt necesarily a scripting language but a workflow tool with GUI interface etc to make things easier for end users to deal with but while at the same time allowing power to do alot of customization. Is this correct?

Take a look at windows workflow foundation. I think you will find it meets your needs well.



Author Comment

ID: 19546017
Greg, I'll take a look at WF, thanks.

I haven't used it yet, so I'm not sure how close that comes to what I'm trying to do. Essentially, my software will be part desktop, part server-side.

I'd like for my users to create a "flow chart", of sorts, that defines processes within the software. Since it's an e-commerce/business automation tool, that will be things like "If customer is from X, then do X, else do X" type thing.

I'd also like to use some embedded personalization variables in stuff like e-mails...  so they can write "Hi %Customer.Name%", etc.

LVL 37

Expert Comment

ID: 19549364
That is exactly what workflow does :)

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question