Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Update on EWB 3.x - July 2019
Fri, Jul 12 2019 4:11 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

I finally have some good news to report, along with some more concrete timeframes for the beta.  This is just a quick post to outline where things are at, but I will be putting this into an official blog post over the weekend.

Some more information:

- I'm putting the finishing touches on the JS emitter compression for the new compiler today and over the weekend, so the compiler will be completely finished by Monday.  It ended up taking 2 months longer than expected, but, in my opinion, 5 months for a complete re-write of the compiler/interpreter wasn't too bad.  It was just a necessary payment on all of the technical debt that I racked up since the original compiler was written.  The new compiler is working really, really well and I'm pretty happy with the results.  Compile times are reasonably fast - a ~60k-line application (includes the component library, but not blank lines) compiles from a cold start to a JS target in ~2.2 seconds, and subsequent compilations take ~1.5 seconds (Windows caching taking effect).  A compilation of the same application without the JS emitting takes ~1.1 secs from a cold start.  The real benefits will be seen in the IDE itself with the benefits of moving the parsing/tokenizing into the compiler itself, as opposed to having separate parsing/tokenizing in both the code editor *and* the compiler.  This saves the compiler from having to do work that it previously would have done, and the incremental compilation of individual units will be very, very fast because the parsing/tokenizing is smart enough to not require a re-parse of the entire unit when only a small portion of the unit was changed.

- I spent a *lot* of extra time on the server-side application interpreter and its support for integrating native Delphi code into the interpreter.  There's a small Delphi unit (ewbextmodule) that you can use to expose Delphi classes to the interpreter, and you simply include this in your code that you compile into an external module (DLL, similar to EDB's external modules, in concept, but implemented differently), and then you can use the external module in the EWB server-side applications by simply referring to the external module by name.  You can also expose a single class instance as a module-wide global namespace for simple "procedures" and "functions".  Here's an example of what that external module would look like (this one simply exposes a global namespace for the module with some procedures/functions):

Your external module DLL project code:

library testexternal;

uses
 System.SysUtils,
 System.Classes,
 testexternalmain in 'testexternalmain.pas';

{$R *.res}

begin
end.

Your main unit code:

unit testexternalmain;

interface

uses SysUtils, ewbextmodule; <<< This is the simple unit that we provide

type

  TMyNamespaceType = (ntNone,ntInternal,ntLibrary);

  TMyExternalModuleNamespace = class(TEWBExternalModuleNamespace)
     private
        FID: Integer;
        FValue: String;
        FNamespaceType: TMyNamespaceType;
     public
        procedure TestProcedure(ID: Integer;
                                const Value: String;
                                NamespaceType: TMyNamespaceType);
        function TestFunction(ID: Integer): TMyNamespaceType;
     published
        property ID: Integer read FID write FID;
        property Value: String read FValue write FValue;
        property NamespaceType: TMyNamespaceType read FNamespaceType
                                                 write FNamespaceType;
     end;

implementation

var
  MyExternalModuleNamespace: TMyExternalModuleNamespace;

procedure TMyExternalModuleNamespace.TestProcedure(ID: Integer;
                                                  const Value: String;
                                                  NamespaceType: TMyNamespaceType);
begin
  FID:=ID;
  FValue:=Value;
  FNamespaceType:=NamespaceType;
end;

function TMyExternalModuleNamespace.TestFunction(ID: Integer): TMyNamespaceType;
begin
  if (ID=FID) then
     Result:=FNamespaceType
  else
     Result:=ntNone;
end;

initialization
  MyExternalModuleNamespace:=TMyExternalModuleNamespace.Create;
  RegisterExternalModule(MyExternalModuleNamespace);
  RegisterExternalTypeAlias('TMyNamespaceType','TNamespaceType');
finalization
  UnregisterExternalModule;
  FreeAndNil(MyExternalModuleNamespace);
end.

The compiler uses the normal compiler search paths to bind the compiled code to the registered classes in the external module (runtime is different so don't worry about DLL injections via LoadLibrary path weirdness with deployed server-side applications).

You can generate the source code for the external module interface by calling a simple function in the ewbextmodule unit (this will be an IDE option in the beta).  Here's an example of what the generated EWB 3 external module interface code looks like for the above Delphi module code:

{************************************************************
*  Auto-Generated External Interface Unit
*  Generated On: 6/10/2019 12:39:10 AM
************************************************************}
unit testexternal;

interface

type

  { Enumerated Types }
  external TNamespaceType = (ntNone, ntInternal, ntLibrary) module testexternal;

  { Routines }
  external procedure TestProcedure(ID: Integer; const Value: String; NamespaceType: TNamespaceType) module testexternal;
  external function TestFunction(ID: Integer): TNamespaceType module testexternal;

var
  external ID: Integer module testexternal;
  external Value: String module testexternal;
  external NamespaceType: TNamespaceType module testexternal;

implementation
end.

And, finally here's an EWB 3 test program that tests the external module:

program ExternalTests;

uses TestExternal;

begin
  TestProcedure(100,'Procedure Test',ntLibrary);
  if (TestFunction(100)=ntLibrary) then
     WriteLn('Function called successfully')
  else
     WriteLn('Function NOT called successfully');
  ID:=200;
  if (ID=200) then
     WriteLn('ID property set properly')
  else
     WriteLn('ID property NOT set properly');
  WriteLn('The Value variable is: '+Value);
  if (NamespaceType=ntLibrary) then
     WriteLn('NamespaceType property read properly')
  else
     WriteLn('NamespaceType property NOT read properly');
end.

- The next step is to complete the re-integration of the new compiler/interpreter into the IDE for the initial beta release and finish up creating all of the external interfaces for the server-side application runtime.  I'm probably going to be fleshing out the entire runtime further *while* the beta takes place, but it's really just a matter of adding existing native code (our code, not the Delphi runtime) that we wish to expose as part of the runtime.  Initially, I'm planning on having support ready for server request handling, memory/file streams, reading/writing JSON/HTML, an HTTP client (includes TLS support and multi-part MIME handling), general socket support (also includes TLS support), and database access (via pre-defined databases/datasets).  However, anything that is missing can be filled in very easily with the external modules.  Eventually, the idea is to phase out the old EWB 2.x web server modules in favor of just using server-side applications with any extra native code exposed as external modules.  Obviously, this will become easier as the runtime gets built out with support for graphics manipulation, PDFs, etc.

- I was planning on releasing a command-line compiler next week that emitted both JS and server-side applications, but I'm not sure how useful this will be for testing because of the changes to the database API and other changes that are specific to talking to the EWB 3 Web Server.  I'm open to suggestions on this - if you think it's something that you would like to play with, please reply with your thoughts.  I could also just put together a small example application that allows you to play with the server-side application compilation/execution a bit.

- Finally, just a quick update on what the upgrade terms/pricing will be.  Due to the sheer amount of delays, we're going to be pretty lenient about upgrade requirements, and the only requirement will be that you have an active subscription in order to get access to EWB 3 when it's released (or beta, if you're interested).  This means that as long as you are within the window to renew your subscription without extra charges (please see our Sales page on the web site for more information on how the subscriptions work), you will be able to do so and get access to EWB 3.

So, given all of the above, I'm hoping to get this all wrapped up in a beta release by the end of the month.  It may be sooner, but it all depends upon how smoothly the re-integration goes with the compiler/interpreter and the IDE.

Also, Linux support will be coming both to EWB and EDB after EWB 3 is released.  The main hold-up here will simply be getting OpenSSL support integrated into both products (EWB 3 is Windows-only and uses built-in Windows TLS support instead of OpenSSL).

Thanks for your patience during this excruciatingly-long development cycle,

Tim Young
Elevate Software
www.elevatesoft.com
Sun, Jul 14 2019 11:42 PMPermanent Link

Steve Gill

Avatar

Thanks for the update Tim.  This is very exciting news!

And thank you for all of your hard work and perseverance.

Can't wait until it's released. Smile

= Steve
Mon, Jul 15 2019 1:18 AMPermanent Link

Robert Horbury-Smith

What Steve said Smile

BTW Tim, for the new release - what's the best way to suggest Enhancements ?

I've a few very minor items that would make using EWB easier for me, but it's probably not a good idea to post them to the support group - they'd get fragmented and become hard to keep track of. On the other hand - others may want to comment.

Any ideas about what's easiest for you ?

Robert.
Mon, Jul 15 2019 3:52 AMPermanent Link

Matthew Jones

Sounds like it will be a big step up in power. Looking forward to it...

--

Matthew Jones
Thu, Jul 18 2019 2:43 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Robert,

<< BTW Tim, for the new release - what's the best way to suggest Enhancements ? >>

I think it will probably be best to wait until the beta starts to stabilize before making enhancement requests. That way you'll be able to see what's in EWB 3 and I might have already solved the issue or implemented the enhancement.

In general, there is a *lot* of outstanding component library enhancements that need to be implemented ASAP because they've been waiting on the core EWB 3 improvements.  Those will start to see the light of day as things progress: a TTreeControl implementation, fixes to the menus to improve their usability, drag and drop, context menus, embedded content panels, charting, and more.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Jul 18 2019 6:49 PMPermanent Link

Robert Horbury-Smith

Understood.

And a Big thank you Tim.

Robert

<<Tim Young [Elevate Software] wrote:

I think it will probably be best to wait until the beta starts to stabilize before making enhancement requests. That way you'll be able to see what's in EWB 3 and I might have already solved the issue or implemented the enhancement.
...
>>
Mon, Jul 29 2019 9:26 AMPermanent Link

erickengelke

Avatar

This sounds amazing, as always, wonderful work.

Erick
EWB Programming Books and Component Library
http://www.erickengelke.com
Image