Blog Options

Archive

<< October 2018 >>

Authors




Blog


Most Recent Post  |  Next Post  |  Previous Post  |  Index List

On our way to Verona: TMS WEB Core v1.1 coming

Bookmarks: 

Tuesday, October 30, 2018


After a stunning start in Brescia on July 25, 2018 with the TMS WEB Core v1.0 release, we're well underway to our next destination along our Mille Miglia track: Verona. As explained, to visualize the roadmap of TMS WEB Core, we use the historic 1955 Mille Miglia race and each subsequent versions of TMS WEB Core will be named after cities along the Mille Miglia. That means that our next major TMS WEB Core v1.1 release will be named Verona. We expect to arrive in Verona in November.

So, what will be included in TMS WEB Core v1.1 Verona:

  • Initial Progressive Web Application (PWA) support
    A new project type with all necessary settings & preconfigured needed files will be available to let you start building progressive web applications out of the box.

  • Google Charts
    Google Charts will be available via an easy to use Pascal component offering most of the Google Chart types and features.

  • Google and Facebook signin
    Using Google or Facebook to offer signin for your web applications will be as easy as dropping a component on the form.

  • Autocompletion control
    As there is no native editable combobox in a browser, we've created an editable combobox with autocompletion.

  • Google ReCaptcha v3.0 support
    The next generation Google Captcha functionality wrapped in a Pascal component.

  • Accelerator keys support
    For heavy keyboard users, you'll be able to use accelerator keys for buttons, labels just like you do now in VCL applications.

  • Beta support for Lazarus
    A first version that can be used in the Lazarus IDE will be included.

  • PayPal payment support
    Also here, a RAD component based way to make integrating payment processing from your web application really easy.

  • Desktop browser bridge
    Send and receive commands/data between a TMS WEB Core web client and a desktop application hosting the browser that runs the TMS WEB Core client application.

  • Enhancements for TWebClientDataSet and DB-aware controls
    Several enhancements make it even easier to connect DB-aware controls to a dataset.

  • Many smaller improvements & fixes
    Many small enhancements and new functions to make the life easier for web client application development are included, too many to name here.


At the same time, a lot of work is also going into TMS XData, to make it work even more seamless as data backend for TMS WEB Core web client applications. We're making it even more RAD, let you write less code and give you more functionality. We're also hard at work to deliver this major TMS XData update in Q4 2018.

We will have a beta version of TMS WEB Core v1.1 Verona shortly for all TMS ALL-ACCESS users. Note also that TMS WEB Core v1.0 can still be purchased till Nov 1 at our discount launch price of 295EUR. From Nov 1, we'll switch to regular pricing 395EUR for a single developer license. Of course, existing TMS ALL-ACCESS and TMS WEB Core users will all receive the upcoming new TMS WEB Core v1.1 Verona release as a free update in the one-year subscription purchased.

Get started

Meanwhile, you can go ahead and explore the new & exciting territories of web client development that become available for Delphi developers with TMS WEB Core! You can download the trial version that is generally available, go ahead with the standalone version you purchased or with TMS WEB Core and additional tools that are all included in TMS ALL-ACCESS. Our team looks forward to all your comments, feedback, feature-requests to help steering the development of TMS WEB Core to the next stages!



Bruno Fierens


Bookmarks: 

This blog post has received 2 comments. Add a comment.



TMS WEB Core: a bridge to the future!

Bookmarks: 

Wednesday, October 24, 2018

Intro
While working in the TMS Labs this week, we had a fruitful discussion on how we could interact with a desktop or mobile environment, where the browser that hosts a TMS WEB Core application, runs on. We already had some experience creating a JavaScript bridge between a TWebBrowser and Google Maps (http://www.tmssoftware.com/site/webgmaps.asp) and figured out this could be useful for TMS WEB Core as well. We wanted to give the user the capability of hosting its TMS WEB Core application in a native desktop or mobile application that offers access to all of the operating system functionality and make it accessible via the browser.

Finding an entry point
We created a TTMSFNCWebCoreClientBrowser class that acts as the communication and viewing component for a TMS WEB Core application. To setup the communication, we needed an entry point. In JavaScript, a global variable can be defined and that was just the entry point we were looking for. In TMS WEB Core, during the creation of TApplication, we also injected a global variable "TMSWEBCoreClientBrowser", that is initialized with a string "unknown". This variable is filled in, when the TTMSFNCWebCoreClientBrowser establishes a conection to the TMS WEB Core application.
  if ExecuteJavascript('document.readyState', true) = 'complete' then
  begin
    if ExecuteJavascript('window.TMSWEBCoreClientIdentifier', true) = 'unknown' then
      FInitialized := True;
  end;
Handshake
After the initialization is complete, the TTMSFNCWebCoreClientBrowser instance performs a handshake. This is being done by executing JavaScript. The HandshakeScript is dynamically being added during the initialization of the TMS WEB Core Application and initializes the TMSWEBCoreClientIdentifier global variable.
initialization
begin
  HandShakeScript := TJSHTMLScriptElement(document.createElement('script'));
  HandShakeScript.id := 'HandShakeScript';
  HandShakeScript.type_ := 'text/javascript';
  HandShakeScript.innerHTML :=
  'var TMSWEBCoreClientIdentifier = "unknown";'+#13#10+
  'function HandShake(cid){'+#13#10+
  '  TMSWEBCoreClientIdentifier = cid;'+#13#10+
  '}';
  document.body.appendChild(HandShakeScript);

  Application := TApplication.Create(nil);
end;
The handshake script is being called from the TTMSFNCWebCoreClientBrowser instance after the initialization is complete.
procedure TTMSFNCCustomWebCoreClientBrowser.PerformHandshake;
var
  c: string;
begin
  {$IFDEF MSWINDOWS}
  c := 'windows';
  {$ENDIF}
  {$IFDEF MACOS}
  {$IFDEF IOS}
  c := 'ios';
  {$ENDIF}
  {$IFNDEF IOS}
  c := 'macos';
  {$ENDIF}
  {$ENDIF}
  {$IFDEF ANDROID}
  c := 'android';
  {$ENDIF}
  ExecuteJavascript('HandShake("'+c+'");');
end;
Sending and receiving messages
When the handshake is complete, the client can send and receive messages. The communication format is a JSON string that is automatically URL encoded and parsed to a JSON object. A sample sending from the client to the TMS WEB Core application:
procedure TForm1.ClientSendButtonClick(Sender: TObject);
var
  c: TJSONObject;
begin
  c := TJSONObject.Create;
  c.AddPair('Message From Client', 'Hello World !');
  w.Send(c);
  c.Free;
end;
And of course, sending back from a TMS WEB Core Application to the client:
procedure TForm1.WebButton1Click(Sender: TObject);
var
  o: TJSONObject;
  js: TJSON;
  s: string;
begin
  js := TJSON.Create;
  s := '{"Message From TMS WEB Core Application":"'Hello World !"}';
  o := js.parse(s);
  w.Send(o);
  o.Free;
end;
The future
This technology opens up a lot of possibilities for the future. You can send and receive messages with plain text, as well as small binary data encoded inside a JSON string between the client and the TMS WEB Core Application. The client application can then interact with the operating system, such as opening files, and other operating system specific functionality. The code runs on FMX (Windows, macOS, iOS, Android) and VCL (Windows) and is coming to TMS WEB Core in the near future!


Pieter Scheldeman


Bookmarks: 

This blog post has received 6 comments. Add a comment.



New symbolic math features in TMS Analytics & Physics library

Bookmarks: 

Wednesday, October 17, 2018

TMS Analytics & Physics developing library provides many useful and unique features for working with symbolic math expressions. New version 2.6 introduces new capabilities and improvements for symbolic manipulations with math formula.

First great innovation is that the partial derivative operator can be used in math formulae as an implicit operation. This means there is no need to evaluate symbolic expression for some derivative and then use the expression in some math formula. The derivative can be used in formula implicitly. For example, it is possible to use the following expression in formulae ‘?sin(x^2)/?x’. The derivative by ‘x’ evaluated by the system implicitly and used when required for other operations.
Some examples of syntactically correct expressions with the derivative operator:


∂²(x^2*sin(a*x))/∂x²
∂²(y^2+1-e^-x)/∂x∂y
∂sinh(x*y)/∂x-∂ln(y/x)/∂y

Implicit derivative operator supports mixed and high-order derivatives (up to 9-th order). Using the operator allows write math expressions in short and readable form without substituting explicit expression for the derivative, which could be more complicated in common case.
Here is an example code for calculating value of an expression, containing implicit derivative operator:

var
  f: string;
  v: TValue;
begin
  f:= 'e^(b*x)*(∂y^2/∂y)-∂sin(a*x)/∂x';
  v:= translator.Calculate(f);
  // code for using ‘v’ value...
end;

The code for the expression calculation is simple and does not require explicit derivative expression – all operations done by the evaluation machine in the background. All other methods, such as simplification and derivative, are applicable for expression with the operator. Let us consider the following example:

var
  f1, f2, df1, df2: string;
begin
  f1:= 'a*x^2+∂²(sin(a*x)*e^(b*y))/∂x∂y';
  df1:= translator.Derivative(f1, 'x');

  f2:= 'a*x^2+∂²(sin(a*x)*e^(b*y))/∂a∂b';
  df2:= translator.Derivative(f2, 'x');

  // code for using symbolic derivatives ‘df1’ and ‘df2’...
end;

Result symbolic expressions for ‘df1’ and ‘df2’ are the following:

df1 = a*2*x+∂³(sin(a*x)*e^(b*y))/∂x;²∂y
df2 = a*2*x+∂²(cos(a*x)*a*e^(b*y))/∂a∂b

This shows that symbolic operations applied to the implicit derivative operator with some features and the expressions still contain the operator (see documentation for full information about the features). The new method ‘Explicit’ of the Translator class can be used to get explicit symbolic expression for any formula, containing implicit operations. Here is the example code:

var
  f, ef: string;
begin
  f:= 'e^(b*x)*(∂y^2/∂y)-∂sin(a*x)/∂x';
  ef:= translator.Explicit(f);
  // code for using explicit symbolic expression ‘ef’...
end;
The explicit symbolic expressions for the example is the following: ef = e^(b*x)*(2*y)-cos(a*x)*a Another great feature of the version is functional operators. They are like ‘user defined’ functions and allow introducing new functionality without writing new classes or adding new packages. New function can be introduced with the ‘AddFunction’ method. Here is the code of a simple example:
var
  f: string;
  v: TValue;
begin
  translator.AddFunction('S', 'Pi*r^2', TArray.Create('r'));

  f:= 'S(a)-S(a/2)';
  v:= translator.Calculate(f);
  // code for using ‘v’ value...
end;
First, we added new function (functional operator) with name ‘S’, one argument ‘r’ and the expression for circle area formula ‘Pi*r^2’. As the function introduced it can be called in symbolic expressions as other functions with different arguments. In the example code the function used to calculate area of the ring with outer radius ‘a’ and inner radius ‘a/2’. Functional operators not restricted with simple formula and can include many arguments and any acceptable expressions as function formula or arguments. For example:

var
  f: string;
  v: TValue;
begin
  translator.AddFunction('Series', '1+(∂F/∂x)*x+(∂²F/∂x²)/2!*x^2+(∂³F/∂x³)/3!*x^3+(∂4F/∂x4)/4!*x^4', TArray.Create('F', 'x'));

  f:= 'Series(e^y y)';
  v:= translator.Calculate(f);
  // code for using ‘v’ value...
end;

The introduced function ‘Series’ is the Tailor’s series with degrees up to fourth for F(x). The function accepts two arguments: function ‘F’ and variable ‘x’. The function then used to calculate ‘approximate’ value of ‘e^y’ represented with the series.
Using functional operators together with implicit derivative operator allows defining differential operators, such as gradient, Laplacian and other. Let us consider the following code:

var
  f, ef: string;
begin
  translator.AddFunction('Laplace', '∂²F/∂x²+∂²F/∂y²', TArray.Create('F', 'x', 'y'));

  f:= 'Laplace(A*sin(x)*y^2+B*cos(x)*e^-y x y)';
  ef:= translator.Explicit(f);
  ef:= translator.Simplify(ef);
  // code for using explicit symbolic expression ‘ef’...
end;

The introduced function ‘Laplace’ is the 2D Laplacian differential operator for function ‘F’ and variables ‘x’ and ‘y’. The function used for evaluating symbolic expression of Laplacian for the math expression ‘A*sin(x)*y^2+B*cos(x)*e^-y’. After simplification the result expression is ‘-A*sin(x)*y^2+A*sin(x)*2’. It should be noted here that the result does not contain the ‘B’ variable. It is because Laplacian for the part ‘B*cos(x)*e^-y’ gives zero.
Thus, all new symbolic capabilities allow using TMS Analytics & Physics library to build applications like Computer Algebra Systems (CAS). The version 2.6 is already released now. Source code of the example application can be downloaded from here.

Bruno Fierens


Bookmarks: 

This blog post has not received any comments yet. Add a comment.



Visiting the TMS lab: Winners

Bookmarks: 

Monday, October 15, 2018



Two weeks of TMS lab visits: Winners

Last 2 weeks we have received many interesting comments on the blogs. Thank you everyone!
It is time to announce the winners today.

Winner: Murat Ak
We congratulate Murat for his excellent post, containing source code to add your own 3rd party components to TMS WEB Core. Great post by Murat showing how easy it is to add any existing web component to TMS WEB Core. We will soon inform how we will stimulate such initiatives even more.

Second place: Manuel
Thanks Manuel for valuable insights on how we could provide even better integration with frameworks like Cordova or Electron in the future.

Third place: Vieira Edson
We want to thank Vieira Edson also for various post comments exploring how TMS WEB Core is a dream for Delphi developers coming true.



We will contact the winners by email.

Masiha Zemarai


Bookmarks: 

This blog post has received 5 comments. Add a comment.



Visiting the TMS lab: Week 2 summary

Bookmarks: 

Friday, October 12, 2018



Two weeks of TMS lab visits

Last 2 weeks were very busy, with many novelties and interesting ideas!

This week again we visited the TMS lab to see what the team is working on and what other plans we have for the future TMS WEB Core releases.

Our team would like to thank you for the many positive feedback. Your support gives us the energy to bring even better results. And so we have come up with the following topics this week.

The following topics were covered in week 2

  • Lab visit 5: Using external classes in pas2js



    Learn how TMS WEB Core benefits from:
    1. High-performance pascal to JavaScript mapping
    2. Ultra-light Pascal wrapper classes
    3. Automatic javascript obkect defination imports


  • Lab visit 6: TMS WEB Core Progressive Web Apps


    Progressive Web Apps
    1. responsive design
    2. continues to work in offline state
    3. install on device without need of censored app. store
    4. looks and behaves as native application


  • Lab visit 7: TMS WEB Core testing and exploring



    Test our TMS WEB Core UI controls with Component explorer
    1. Runtime test environment for the TMS WEB Core component
    2. Test directly from the web without installing anything


  • Lab visit 8: TMS WEB Core meets Electron


    Create a desktop cross platform application with the same code base using Electron API from TMS WEB Core.

  • Lab visit 9: Automatic XData Web App Generator


    1. Scaffolding coming to TMS WEB Core / TMS XData
    2. Automatic CRUD DB web app generation
    3. Includes authentication, filtering, pagination,...


Lab visit, feedback & win!

Until October 15 you still have the chance to win a prize. Read our blogs and leave a comment!

To reward your interaction & feedback, we'll pick 3 blog comments on October 15 that we liked the most and first prize is a free TMS WEB Core license, the 2nd and 3rd prize is a 50% discount coupon on TMS WEB Core. Let yourself hear to increase your chances!



Masiha Zemarai


Bookmarks: 

This blog post has received 2 comments. Add a comment.



Visiting the TMS lab day 9: Automatic XData Web App Generator

Bookmarks: 

TMS WEB Core and even web development itself is something new for some Delphi users. Even though TMS WEB Core is RAD, feels completely home by using Delphi IDE, a framework that is very similar to RTL and VCL, we felt the need to create a more "real-world" demo that would handle several aspects that potential Web Core users would have in their applications:

  • Authentication
  • Responsive design
  • Dynamic content from database
  • REST backend
  • Data modification
  • Data filtering, ordering, pagination
  • And more...

With that in mind, we have created the XData Music demo. Full source code is available upon install of TMS WEB Core or TMS XData.

And you can try the demo online here: https://app.devgems.com/xdata/music/app.

The demo has a simple database in the backend, which consists of music artists, genres and albums (with their respective tracks). Here is the listing of albums, for example:



And it illustrates how to require authentication in the application, as well responsive design, as the following screenshots show:



So far so good. The demo is serving the purpose of being an example of how to build an app using TMS WEB Core. But we have then noticed something interesting: users were not only using the demo as a learning resource, but in addition to that, they were starting their own application from the demo source code. Which made us wonder: what if we create a scaffolding tool that generates a source code similar to the demo, automatically, based on the existing XData server of the user?

That's one of the things we are working on now. You can get a glimpse of the current wizard form (under work) in the next screenshots:





So, in a nutshell, you choose the URL of an existing XData server, the wizard will retrieve the metamodel of the server and dynamically generate the source code of your application, with an UI interface for the CRUD operations of your database data, filtering, pagination, ordering, associated entities (lookup), all automatically.

A great time-saving start! And this should be only the start, as we intend to add more and more features to the generated source code so that it eventually becomes a full-featured application generator. Stay tuned for the TMS XData Web App Generator!

Lab visit feedback & win!

Our team loves to hear what you think about what is brewing in the lab, how you plan to use the upcoming features, what priority our team should give to it and if you have possibly interesting and/or creative ideas to make this even more powerful for Delphi developers. To reward your interaction & feedback, we'll pick 3 blog comments on October 15 that we liked the most and first prize is a free TMS WEB Core license, the 2nd and 3rd prize is a 50% discount coupon on TMS WEB Core. Let yourself hear to increase your chances!

Get started

Meanwhile, you can go ahead and explore the new & exciting territories of web client development that become available for Delphi developers with TMS WEB Core! You can download the trial version that is generally available, go ahead with the standalone version you purchased or with TMS WEB Core and additional tools that are all included in TMS ALL-ACCESS. Or you can come to see TMS WEB Core and discover and discuss it face to face with Bruno Fierens of tmssoftware.com showing it in London on October 23, 2018. Note also that in October, you can still take advantage of purchasing TMS WEB Core at launch price from 295EUR for a single developer license. From Nov 1, regular pricing will be active on TMS WEB Core (395EUR for a single developer license).

Bruno Fierens


Bookmarks: 

This blog post has received 3 comments. Add a comment.




Most Recent Post  |  Next Post  |  Previous Post  |  Index List