What are the pros and cons of RemObjects PascalScript versus the DWS script?
Asked Answered
R

8

17

I'm planning to include a pascal script in my application. It does not require any web access, simply access to classes in my Application. It should be fast (compiled). I see that there are a number of scripts available, some are interpreters but amongst the compilers RemObjects pascal script and Delphi Web Script (DWS) seem to be powerful and actively pursued.

Can anyone suggest advantages of one over another please? Thanks

Reorganization answered 3/2, 2011 at 17:59 Comment(0)
M
14

It comes down to this, imho:

  • Delphi Web Script is being actively and aggressively developed.

  • PascalScript is pretty much dormant in terms of development and enhancements.

However, DWS is a community project essentially being developed by one (very talented and competent) guy. PascalScript is supported by RemObjects.

But: The number of people/size of organisation involved in developing/supporting a product is not as important as the efficacy and enthusiasm of the development and support they are actually providing.

In both cases source is provided, so even if "official support" dried up, you would not be completely lost.

From what I understand, the DWS engine is a more easily understood implementation than PascalScript which may make "self support" easier, tho in such cases what you are used to is important (I have previously worked on an entirely different script engine which I understand is more similar to DWS than PascalScript).

Lastly, I currently work on a project that uses PascalScript and at this stage intend switching to DWS as soon as possible.

Morril answered 3/2, 2011 at 20:18 Comment(2)
+1 I'd lean towards DWS because of its keen and rapid development.Tenorrhaphy
You've pushed at an open door, thanks. I'd already tried DWS and been very impressed. Brian.Reorganization
U
5

The three top reasons I originally went for DWS were that:

  1. in DWS you can/could declare whole new classes in the script, with inheritance, meta-classes, etc. and weren't restricted to those classes you exposed/imported.
  2. more restrictive exposure model (scripts can only access what you expose), this allows sand-boxing and safe termination of scripts at any time.
  3. simpler, more readable source code structure, with a straightforward, bytecode-less execution model that is comparatively easier to extend, debug & maintain.

Note that I practically didn't use the "Web" side of DWS at all.

Unclassical answered 21/3, 2011 at 13:14 Comment(1)
+1 I currently use DWS on multiple web services (: thank you for your work Eric!!Psychic
O
5

I have been using Pascal Script by Rem Objects for several years now and in my opinion, it is the best. As far as documentation, look at the Pascal programming manuals. There are no strange syntax or function calls in a script. Responding to the above Answer 0, there is no need for publicly available documentation, if you know Delphi. I have not ran into a single case where it would be necessary. There are 2 articles written on how to implement scripting in an application. How to import classes, methods and functions as well as several examples. For anything else, normal Delphi documentation is sufficient. However, with DWS, it is necessary to have explicit documentation because the syntax is entirely different. Having to use TProgramInfo and IInfo, makes scripting strange and tedious.

I use Rem Objects Pascal Script to control telephone call IVR functionality, similar to Asterisk AGI port implementation. Where each incoming call to Asterisk, spawns a socket to my Server socket. I typically run up to 2000 scripts simultaneously. Each script is loaded, compiled and executed and can easily handle up to 45 incoming calls per second. Each script controls answering, playing files, collecting DTMf, recording, etc. for all calls. Sorry for the long winded response, but I can't say enough about how good Pascal Script works. Thanks Rem Objects and Carlo Kok. What a great product. They may not actively be making updates, maybe because it isn't necessary. It works great!!! PS. Another great feature is that scripts that are compiled to byte-code can't be easily reversed engineered. Therefore, your code is safe. Also, if necessary, you can have the scripts pre-compiled and execute them at runtime, without compiling then. However, it wasn't necessary for me because I can handle plenty. Maybe someday, hopefully, I will need to pre-compile. That would mean that we are handling many more than 45 per second.

Operate answered 28/5, 2014 at 0:29 Comment(0)
M
4

Maybe consider a third option. I know the OP was specifically asking about PascalScript and DWS, but I would recommend looking at TMS Scripter Studio or TMS Scripter Studio Pro as possible solutions. You get both Pascal and BASIC interpreters, which I've been able to use when the end-user isn't interested in learning Pascal but have a VB background.

Maffei answered 3/2, 2011 at 22:44 Comment(5)
Yes, thanks I have the TMS product and have evalulated it. As I said in my post I cannot tolerate the sloth of an interpreter but thanks.Reorganization
@Brian: Have you tested interpreters against compiled scripts? These scripts are all compiled to bytecode and executed by VMs; it's not like they're anywhere near as fast as actual compiled compiled code anyway.Holey
+1 for mason. Measure, and mearsure well (with relevant code from your project not with idle for loops)Osis
@Mason: Yes Mason, I have and you're right, they are quick. Just not quick enough for a real-time hardware application :-)Reorganization
@Brian: Well, if quick is what you're after, then DWS is the clear winner.Holey
H
4

You say it should be fast, and when fast matters you can't beat PaxCompiler. It's not free, but well worth considering. The feature set is unique, and it's actively developed for years now.

Heeled answered 4/2, 2011 at 11:40 Comment(0)
H
3

The biggest issue with Pascal Script is that there is zero documentation for the language itself. And I mean zero. There are various generic Pascal sites, that sorta-kinda-apply but not quite, of course, and there are other incomplete ad-hoc tutorials made by various people. But when it comes to real, comprehensive documentation, it's pretty much a joke. In order to write some "advanced" scripts for InnoSetup I had to look at the sources and figure out what the compiler really does.

I think that anyone who considers using Pascal Script should reconsider pronto. Without publicly available documentations, it's close to being useless. InnoSetup shouldn't be using it, IMHO, it's such a pain when you want to do simple things that nobody bothered writing a tutorial for (yet).

Hophead answered 14/3, 2013 at 5:18 Comment(0)
J
1

Did a lot of work with PS and enlarged and improved also the engine to a scripting engine at her own, means the App is “out of the box” (self containment) and needs no installation nor registration: https://sourceforge.net/p/maxbox/news/2021/11/maxbox-47610-released-/

All my clients run on industry machines (logistic, medicine and energy plants) on 32 bit as a requirement, therefore, I decided to compile the maXbox on my old Delphi 2007 we do have. The selected script engine can perform all tasks we need and can also work stable in threads. We have already incorporated this solution into our original app - maXbox4. https://maxbox4.wordpress.com/

Johathan answered 4/1, 2022 at 15:4 Comment(0)
V
0

I have using tms scripter for 3 years and it work fine good documentation, good support, keep developing by producer, fast parser, ui combined are the Reasons that I choose that for our bpms software

Vomer answered 18/5, 2015 at 17:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.