Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scripting in Delphi application [closed]

i develop a BPM software and I would like to add end user scripting logic.

I try to express myself with an example.

in a Process there are 2 variables (Price, ApplyDiscount, DicountAmount, Total).

somehow the user wants to define this logic:

//Delphi code for explanation:
if ApplyDiscount then
  Total := Price * DiscountAmount
else
  Total := Price;

since my app is a SQL Server Client server app i thought also about the idea to run a query with parameters so the user uses SQL syntax to script the logic and it will work. I need to define the details but somehow the idea is to use the :Parameter syntax to allow the script pass and recieve values from my application.

This is for sure ok, but i was wondering if there is another way to do it without writing my scripting engine.

Thanks.

like image 658
LaBracca Avatar asked Dec 12 '25 05:12

LaBracca


1 Answers

Some scripting engines for Delphi:

  • DelphiWebScript which is my preferred: it has the best syntax, is probably the faster, and is Open Source;
  • PascalScript;
  • TMS Scripter Studio.

If you want "non pascalish" scripting, you can take a look at Lua which is pretty simple to work with.

Edit:

Some additional candidates:

  • SEPI;
  • ScriptEngineII;
  • BESEN which is a JavaScript engine written in Delphi, including JIT!
  • SpiderMonkey for Delphi also executing JavaScript.
like image 162
Arnaud Bouchez Avatar answered Dec 13 '25 23:12

Arnaud Bouchez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!