Embedded scripting language for C#?

Posted on 2007-07-22
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
    LVL 85

    Expert Comment

    by:Mike Tomlinson
    "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

    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

    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

    That is exactly what workflow does :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Title # Comments Views Activity
    Paint/Redraw window while dragging 16 44
    Poor Man's .NET Framework Certification 2 27
    Detect file exist or not 3 37
    GridDataView 6 10
    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
    The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now