1

The web application my organization has written to perform customer care functions doesn't have this ability. I know there are Firefox plugins to automate the browser, but what I'd like to do is provide a framework and facility to manage and execute scripts through our web application.

The user would write scripts that checked on commissions for their sales, perhaps alerted them to orders that were pending after a certain length of time, or automated common comments that policy requires them to attach to each order. I used to do this sort of thing in Reflection, accessing a CCA application on a mainframe when I was a CSR.

Where should I start? How do I keep it secure? Can I provide script-authoring functionality right in the browser? What parts of the object model do I expose, or do I craft a script-accessible layer just for this? What language(s) should/can I support?

EDIT: "Don't do that!" is not a helpful answer.

4
  • I don't quite understand your requirements. Correct me if I'm wrong. You want to create a web application which allows users to create/edit scripts which can be executed to perform some business tasks? Are your users programmers or just anybody? Commented Sep 17, 2009 at 15:14
  • My users are just anybody. Think Office automation. I had a lead-in paragraph with more requirements, let me add it back in... Commented Sep 17, 2009 at 15:23
  • Correction: not just anybody, also programmers that want a shortcut to adding a new feature that doesn't require a presentation component, to just script it and give the user the script. Commented Sep 17, 2009 at 15:26
  • I see, so can I say that one of your main concerns is that the 'power' given to the users at script level might cause security breaches or illegal system operations etc? Commented Sep 17, 2009 at 15:30

2 Answers 2

4

Take a look at Jint:

Jint is a script engine based on the Javascript language. Using Jint, developers can provide fully scriptable applications, execute .NET code without compiling, or create external configuration logic, using the most used script language.

Sign up to request clarification or add additional context in comments.

Comments

2

Firstly, let me tell you, from experience with similar requests, this will not be used the way you want; inevitably you will end up writing these functions for them, or correcting mistakes that they make.

These people are not programmers - you are a programmer. You are the scripting interface. They can request programs by asking you, and you will implement them (correctly).

Do not provide a scripting language interface. Do not go and write a custom DSL using boo or a similar 'cool' language.

Take a reasonable approach; take a sensible approach, and write these things for them.

2 Comments

My thoughts are quite aligned with silky. This sounds challenging as a colleage project, but realistically speaking, it can come back and bite you before you knew it.
I don't see a significant difference between this functionality and user-generated reporting. Many shrinkwrapped applications support scripting. Lots of web applications expose an API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.