This allows to have Pascal code like this one for instance, be compiled into this html page (or see the outcome in jsfiddle), and be executable client-side by any modern browser (the demo uses HTML5’s Canvas). In the DWS source repository, you’ll find it in “MandelbrotJS” (requires Delphi Chromium Embedded to run).
In the classic Delphi spirit, it’s all about allowing both a high-level usage, while still being open to low-level usage whenever you wish or need to.
This is still work in progress, only a (growing) subset of the DWS runtime library functions are supported at the moment, but most of the language is in working condition, including var parameters, classes, meta-classes, virtual methods & constructors, exceptions, bounds checking, contracts, etc. Currently, more than 85% of the DWS language & rtl unit tests pass (most of those not passing are related to Variants, destructors & ExceptObject).
The JS CodeGen can be invoked directly or via DWS filters, so you can have a single-source DWS code with portions running either server-side or browser-side.
I thought about implementing this JS back-end to DWS since years… And you made it in no time! Congratulations!
This is IMHO one of the greatest news in the Delphi world since years.
First step to an OpenSource AJAX solution, in pure Delphi.
I’ll surely use this DWS backend in my OpenSource ORM to create the AJAX part from Delphi code.
Exciting developments going on here. I’m keeping a close eye on it.
The execution times of the mandelbrot demo vary a lot every time I run it, but still it’s consistently fast.
Comments are closed.