RemObjects PascalScript 与 DWS 脚本相比有何优缺点?

发布于 2024-10-15 18:31:01 字数 340 浏览 3 评论 0原文

我计划在我的应用程序中包含一个 pascal 脚本。它不需要任何网络访问,只需访问我的应用程序中的类即可。它应该很快(已编译)。我看到有很多可用的脚本,有些是解释器,但在编译器中 RemObjects pascal scriptDelphi Web Script (DWS) 似乎功能强大且受到积极追求。

有人可以建议其中一种相对于另一种的优点吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

各自安好 2024-10-22 18:31:01

归根结底,恕我直言:

  • Delphi Web Script 正在积极且积极地开发。

  • PascalScript 在开发和增强方面几乎处于休眠状态。

然而,DWS 是一个社区项目,本质上是由一个(非常有才华和能力的)人开发的。 RemObjects 支持 PascalScript。

但是:参与开发/支持产品的人员数量/组织规模并不像他们实际提供的开发和支持的效率和热情那么重要。

在这两种情况下都提供了来源,因此即使“官方支持”枯竭,您也不会完全迷失。

据我了解,DWS 引擎是比 PascalScript 更容易理解的实现,这可能使“自我支持”更容易,但在这种情况下,您所习惯的很重要(我之前曾开发过一个完全不同的脚本引擎,我理解它与 DWS 比 PascalScript 更相似)。

最后,我目前正在做一个使用 PascalScript 的项目,现阶段打算尽快切换到 DWS。

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.

梦回旧景 2024-10-22 18:31:01

我最初选择 DWS 的三个主要原因是:

  1. 在 DWS 中,您可以/可以在脚本中声明全新的类,包括继承、元类等,并且不限于您公开/导入的那些类。
  2. 更具限制性的暴露模型(脚本只能访问您暴露的内容),这允许随时进行沙箱和安全终止脚本。
  3. 更简单、更易读的源代码结构,具有简单、无字节码的执行模型,相对更容易扩展、调试和维持。

请注意,我实际上根本没有使用 DWS 的“Web”端。

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.

手心的温暖 2024-10-22 18:31:01

我已经使用 Rem Objects 的 Pascal Script 好几年了,在我看来,它是最好的。至于文档,请查看 Pascal 编程手册。脚本中没有奇怪的语法或函数调用。回应上述答案 0,如果您了解 Delphi,则无需公开可用的文档。我还没有遇到过任何有必要这样做的情况。有 2 篇文章介绍了如何在应用程序中实现脚本编写。如何导入类、方法和函数以及几个示例。对于其他任何事情,普通的 Delphi 文档就足够了。然而,对于DWS,有必要有明确的文档,因为语法完全不同。必须使用 TProgramInfo 和 IInfo,使得脚本编写变得奇怪而乏味。

我使用 Rem Objects Pascal Script 来控制电话呼叫 IVR 功能,类似于 Asterisk AGI 端口实现。每个对 Asterisk 的传入调用都会生成一个到我的服务器套接字的套接字。我通常同时运行多达 2000 个脚本。每个脚本都会被加载、编译和执行,并且每秒可以轻松处理多达 45 个传入呼叫。每个脚本控制所有通话的接听、播放文件、采集DTMf、录音等。
很抱歉冗长的回复,但我无法充分说明 Pascal Script 的工作原理。
感谢 Rem Objects 和 Carlo Kok。多么棒的产品啊。他们可能不会主动进行更新,也许是因为没有必要。效果很好!!!
附言。另一个很棒的功能是编译为字节码的脚本不能轻易地进行逆向工程。因此,您的代码是安全的。此外,如有必要,您可以预先编译脚本并在运行时执行它们,而无需随后进行编译。然而,这对我来说没有必要,因为我可以处理很多事情。也许有一天,希望我需要预编译。这意味着我们每秒处理的数据量远远超过 45 个。

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.

琉璃繁缕 2024-10-22 18:31:01

也许考虑第三种选择。我知道 OP 专门询问了 PascalScript 和 DWS,但我建议查看 TMS Scripter Studio 或 TMS Scripter Studio Pro 作为可能的解决方案。您可以获得 Pascal 和 BASIC 解释器,当最终用户对学习 Pascal 不感兴趣但有 VB 背景时,我可以使用它们。

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.

眼趣 2024-10-22 18:31:01

你说它应该很快,而当快速很重要时,你无法击败 PaxCompiler。它不是免费的,但非常值得考虑。该功能集是独一无二的,并且多年来一直在积极开发。

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.

Pascal Script 的最大问题是该语言本身的文档为零。我的意思是。当然,有各种通用的 Pascal 站点,它们有点适用,但不完全适用,并且还有其他由不同的人制作的不完整的临时教程。但当涉及到真实、全面的文档时,这几乎就是一个笑话。为了为 InnoSetup 编写一些“高级”脚本,我必须查看源代码并弄清楚编译器的真正作用。

我认为任何考虑使用 Pascal Script 的人都应该立即重新考虑。如果没有公开的文档,它几乎毫无用处。 InnoSetup 不应该使用它,恕我直言,当你想做一些简单的事情而没有人费心编写教程时,这真是太痛苦了。

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).

生活了然无味 2024-10-22 18:31:01

在 PS 上做了很多工作,并将引擎扩大和改进为她自己的脚本引擎,这意味着该应用程序是“开箱即用”(自我包含),无需安装或注册:
https://sourceforge.net/p/maxbox/ news/2021/11/maxbox-47610-released-/

我所有的客户都运行在 32 位的工业机器(物流、医药和能源工厂)上,因此,我决定在我的旧机器上编译 maXbox Delphi 2007 我们确实有。
所选的脚本引擎可以执行我们需要的所有任务,也可以在线程中稳定工作。我们已经将此解决方案合并到我们的原始应用程序 - maXbox4 中。
https://maxbox4.wordpress.com/

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/

太阳公公是暖光 2024-10-22 18:31:01

我已经使用 tms scripter 3 年了,效果很好
良好的文档、良好的支持、生产者不断开发、快速解析器、ui 组合是我选择我们的 bpms 软件的原因

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文