Quantcast
Channel: TMS Software
Viewing all 1006 articles
Browse latest View live

Work@Home with Slack in the latest TMS FNC Cloud Pack update!

$
0
0

Stay Safe!

First of all, the TMS team wishes you a good health during these difficult times. Not only privately but also for the business you are running / working for. We at TMS are currently working from home and are doing our best to provide you with the highest care at software level and support that we can provide in the current circumstances. Even working at home doesn't stop us from releasing new and exciting stuff!

Work @Home



With the latest release (v1.2.0.0) of the TMS FNC Cloud Pack we are introducing Slack. One of the most productive collaboration service out there and we have created a component for you that allows you to connect, share, update, upload and download content on the various channels under your work project. Below is a list of features the TTMSFNCCloudSlack component is supporting.

  • Retrieve all the users in your Slack team
  • Retrieve the information and profile for a specific Slack user
  • Download the profile picture of a user
  • Retrieve all conversations in your Slack team or get a specific type as public channels, direct messages, ...
  • You can also get all the conversations that a specific user has access to
  • Retrieve the posted messages from a specific conversation
  • Retrieve the replies to a message.
  • Download the files that were posted in a message
  • Post your message in a conversation or a reply to a specific message
  • Upload a file to a specific conversation

TMS FNC Cloud Pack

The TMS FNC Cloud Pack was released in April, 2019 (https://tmssoftware.com/site/blog.asp?post=538), and has gotten a lot of improvements on the existing services. We have now added a new service (TTMSFNCCloudSlack) and are continuing our search for more services. If you have an idea for new services, suggestion for enhancing existing services or missing a service that is not yet implemented, please do not hesitate to ask us.

Please remember, TMS FNC Cloud Pack is part of the FNC family and FNC is a cross-platform / cross-framework component library. Write your code once and target multiple operating systems!




Discover the endless possibilities of software development with TMS WEB Core

$
0
0

TMS WEB Core: Web Application Development with Delphi



For more than two decades, the development environment Delphi is known for the rapid programming of Windows applications. Especially the easy creation of desktop database applications and the uncomplicated deployment of the applications to customer systems made Delphi popular compared to other programming languages. For several years now, software can be created for the target platforms Linux, MacOS as well as the mobile operating systems iOS and Android.
With TMS WEB Core, modern web applications can be programmed with Delphi since the beginning of 2018. These applications can be executed completely in the web browser because they are translated into JavaScript.

  • Detailed description of the basics, the functionality, and the transpiler (based on pas2js)
  • Step-by-step creation of the first web application
  • Progressive Web Applications (PWA) for offline use
  • Electron applications: Cross-platform Desktop applications based on web applications
  • Integration of JavaScript classes and controls
  • Creating web services for databases with TMS XData
  • Integration of databases with TDataset controls
  • XData-specific functionality for use in web applications
  • Responsive web design (form designer, HTML, CSS, Bootstrap)
  • The final chapter provides a comprehensive and practical example of server and web application with Google Maps and Google Charts
The content is suitable for both beginners and advanced developers interested in creating web applications with TMS WEB Core.

Knowledge of Delphi (Object Pascal) and the Visual Component Library (VCL) is required. To reproduce the numerous examples, you need a current version of Delphi and TMS WEB Core. The free Delphi Community Edition is sufficient as well as the trial version of TMS WEB Core.

The book is now available on Amazon:
TMS WEB Core: Web Application Development with Delphi




Author



Since 1996, Dr. Holger Flick has been using Delphi as his primary development platform and has been an active member of the community. He studied computer science at Dortmund University and later wrote his dissertation at the Ruhr University in Bochum in the field of telemedicine. For his passion for and knowledge of Delphi he was awarded the “Delphi MVP” moniker in 2016.

In 2019, Holger moved to the United States of America (USA) and established his new company FlixEngineering LLC. The company focuses on consulting, training and software development using object-oriented programming languages like Delphi, C#, Swift, and Objective-C. Holger is part of the TMS Software family providing his expertise as Evangelist and QA Engineer.

Never get lost again with TMS FNC Maps!

$
0
0

Intro

After all our experience with TMS FMX/VCL WebGMaps & WebOSMaps, and the latest and greatest technologies we've been working on in FNC & WEB, we thought by ourselves what would be the next logical step? We wanted to feel the power of dynamically switching between various mapping services on mobile. We wanted to have access to step-by-step directions in a browser. We wanted to have an out of the box, worry free experience to provide mapping, directions and geocoding in one big library/component set that works on 4 frameworks and a lot more operating systems.

We wanted to create a component where you are not tied to a fixed mapping service provider but make it as easy as changing a property to switch to another provider. When a provider raises prices, reduces functionality or when another provider starts providing better routing, change one property setting in your application and you are up & running with another mapping service provider.



Cross-framework, cross-platform, cross-service

Introducing for the first time ever: TMS FNC Maps! You all know how the saying goes:

"A picture says more than a thousand words"


And as a cherry on the cake, we've created a video that shows a quick overview of what TMS FNC Maps has to offer and which features are supported.



Supported services & features

Below is a list of features and services that TMS FNC Maps supports. As said in the video, with these features we aim for 1.0, but 1.0 is just the beginning, and many more features and map services will be added in the future. Please let us know if you have a service or feature of a specific service that you want to see available in TMS FNC Maps.

List of services for mapping, directions and geocoding
  • Google
  • Here
  • Microsoft Azure
  • Microsoft Bing
  • TomTom
  • MapBox
  • OpenLayers

List of features
  • Directions/Routing (TTMSFNCDirections)
  • Options for configuring alternative routes, step by step directions, …
  • Geocoding (normal, reverse) (TTMSFNCGeocoding)
  • Getting current location (TTMSFNCLocation)
  • Maps (TTMSFNCMaps)
    • Polylines
    • Polygons
    • Markers
    • Circles
    • Rectangles
    • Zooming, centering
    • Loading GPX, GeoJSON
    • Various Events
  • Google Maps (TTMSFNCGoogleMaps)
    • Inherits from TTMSFNCMaps
    • Load KML
    • Editing of polylines, polygons, circles and rectangles
    • Dragging of markers
    • Traffic
    • Themes (Night, …)

FNC

Please remember, TMS FNC Maps will be part of the FNC family and FNC is a cross-platform / cross-framework component library. Write your code once and target multiple operating systems!



Breaking changes!

To get the best out of TMS FNC Maps and make all of this work together we've introduced breaking changes and moved the TMSFNCCloudBase unit from TMS FNC Cloud Pack to TMS FNC Core. This means that each FNC product will have access to this unit and this allows you to consume your own REST service, download/upload files without the need for TMS FNC Cloud Pack.

Stay tuned!

More is coming in the next days, weeks and we are currently hard at work to make a 1.0 available as a BETA to all TMS ALL-ACCESS users, so stay tuned!, and again, feedback is highly appreciated so don't hold back!

FlexCel 7.5

$
0
0



We are announcing a new major FlexCel version today. FlexCel 7 was mostly about rendering charts, and FlexCel 7.5 keeps on the same topic, being mostly about creating and modifying charts with code.


The new Chart API


The fastest way to getting started with the chart API is to look at the Chart API example for .NET or Delphi

That example will create the same chart that you can see at the top of this post. But how do you create a similar chart yourself in your own app? How did I do to write the example itself? Charts in Excel have a thousand configuration knobs, and this means lots and lots of methods, properties and classes that you have to set. So here are the steps I used myself, starting from the beginning:

  1. The first thing to do was to find out something to chart. Ok, you probably have this step solved, but I had not. So I finally settled with charting the lines of code in FlexCel over the years. You can see the time in the x-axis, and the lines of code in the y-axis. The colors represent the years. So, for example, the blue region at the start is the code I wrote in 2004. If you follow the blue area over the x-axis, you can see that some of that code is still alive in 2020, but the areas shrink over time as that code is replaced by newer code. At the chart's right-end, you can see how many from the current 350,000 lines of code were written in 2004, how many in 2005, and so on.

  2. Now that I knew what I wanted to chart, I needed to find out how to get that information from the FlexCel code repository. I used Hercules for that, and it did a great job. I saved the data to YAML and, using some quick app developed on the spot, imported the data to an Excel file.

  3. And now, of course, I used APIMate. Once I had the data in Excel, I created a chart in Excel too, saved the file, and opened it with APIMate:







  4. And finally, I needed to polish it a bit. The chart has one series per month over 16 years; that is a lot of series. And APIMate generates one call to AddSeries for each one. So I moved all those AddSeries into a loop and added some code so all months in a given year are the same color. I did some more minor changes to the code generated by APIMate, and I got the code I wanted. Remember, APIMate is a teaching tool: You are supposed to modify the code it generates.

  5. That was it. The code to create the chart wasn't that simple, but most of that code was written by APIMate.

A note about versions

At the beginning of this post, I mentioned that FlexCel 7.5 is a major release. So why is it 7.5 and not 8.0? Just because historically, FlexCel major versions have always been in .5 intervals.

Initially, as the FlexCel support lasted from version n.m to (n+1).(m-1), I decided to make major versions just increase 0.5, so the support would last twice as much. Today, licenses are valid for a year, so there is no more reason to keep doing that. However, after almost 20 years, this has become a tradition. So now you know.

As usual, if you want a full list of what's new you can read the link for .NET or for Delphi

But while I wait for the final bits of the build process, I think it might be a good time to do a recap, as I remember it, and probably wrong of what were the big points in each major release. We are in quarantine, after all.

  • FlexCel 3.0: Initial release for the new codebase. Too much new stuff to mention, but it included a rewritten reporting engine, and a calculation engine.
  • FlexCel 3.5: Added exporting to pdf. Way before Excel (or anyone else I know) did it.
  • FlexCel 4.0: Chart rendering for xls files (xlsx didn't exist yet). Now you could export the charts to PDF.
  • FlexCel 4.5: HTML exporting.
  • FlexCel 5.0: Basic support for xlsx. A full rewrite of everything to support the new file format.
  • FlexCel 5.5: Advanced support for xlsx. Images, objects, and a long list of etc.
  • FlexCel 6.0: Multiplatform. All platform-specific code was isolated, allowing us to port FlexCel to iOS, Android, etc., in both .NET and Delphi.
  • FlexCel 6.5: PDF engine was rewritten. Support for PDF/A.
  • FlexCel 6.10: Full support for the new Excel-2007 conditional formats. Yes, this should have been FlexCel 7, but I had reserved the 7 for charts.
  • FlexCel 6.15: Support for Excel-2007-style tables.
  • FlexCel 6.20: Much improved support for right-to-left languages and complex scripts like Khmer.
  • FlexCel 7.0: Chart rendering.
  • FlexCel 7.5: Chart API.

Note that the list only scratches the surface, and it doesn't even mention stuff like APIMate (introduced in FlexCel 4.8), exporting to SVG (FlexCel 6.3), exporting to HTML 5 (also FlexCel 6.3), Virtual Mode (FlexCel 5.5) and 17 years of improvements. It is just a simplified story for fun.






When times are hard, tmssoftware makes developing easy

$
0
0

First of all we still hope everyone is well and safe in these uncertain times.
We at tmssoftware are doing the best we can to give you our best support and new features while we are all working from home. As Billy Ocean sang so wisely: "When the going gets tough, the tough get going". And we keep going, we have a new product TMS FNC Maps.
Today I will show you an example of what you can create with some teamwork between TMS FNC Cloud Pack and TMS FNC Maps. TMS FNC Maps is already available for you as a BETA, if you are an active ALL-ACCESS user.
In case you don't have an ALL-ACCESS subscription, we've created a similar web demo on which you can have an initial look.

Our new product: TMS FNC Maps

Experience the power of dynamically switching between various mapping services with this out of the box, worry free experience that provides mapping, directions and geocoding in one big library that works on 4 frameworks and a lot more operating systems.
In case you've missed our announcement, you can find that blogpost here/.

TMS FNC Cloud Pack

TMS FNC Cloud Pack contains components that offer integration with several cloud services. With one source code base to use on multiple frameworks (FMX, VCL, WEB and LCL), this is the best cross-framework option to use your most used REST based services. In case your specific service isn't implemented in the available components, you can easily create your own REST service client components built on top of the TMS FNC Cloud Pack Core.

Easy to develop with

To stay informed is one of the most important things right now, so we wanted to give you a useful project. We will wrap an API, that was built by developer Kyle Redelinghuys, which works with the COVID-19 information sourced from Johns Hopkins CSSE. We combine this with TMS FNC Maps to retrieve the geo location from the countries and draw a circle with a radius in relation to the unfortunate deaths in that country. (Note: This image is from the seventh of April.)



API Wrapper

To start, we will create our own class so we can personalize the object to our preferences. We start from the TTMSFNCSimpleCloudOAuth class and we add a TObjectList Countries that will contain the data for each country.
TTMSFNCCovidAPI = class(TTMSFNCSimpleCloudOAuth)
  private
    FCountries: TTMSFNCCloudCovidCountries;
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    property Countries: TTMSFNCCloudCovidCountries read FCountries;
  end;
We will use the GET Summary call to retrieve the data from all the countries. In the API documentation we can see that we need to send the request to: 'https://api.covid19api.com/summary'. So we will create our API object and make the call.
  covid := TTMSFNCCovidAPI.Create(Self);
  covid.Request.Host := 'https://api.covid19api.com';
  covid.Request.Path := '/summary';
  covid.ExecuteRequest( (*the anonymous method will be explained later*));
To make the code a little more workable, we will put the data from the API in a class and have a separate parsing function. The data that we receive is formatted in the following way:

{
  "Countries": [
    {
      "Country": "Afghanistan",
      "CountrySlug": "afghanistan",
      "NewConfirmed": 2,
      "TotalConfirmed": 24,
      "NewDeaths": 0,
      "TotalDeaths": 0,
      "NewRecovered": 0,
      "TotalRecovered": 1
    },
    {
      "Country": "Albania",
      "CountrySlug": "albania",
      "NewConfirmed": 6,
      "TotalConfirmed": 70,
      "NewDeaths": 0,
      "TotalDeaths": 2,
      "NewRecovered": 0,
      "TotalRecovered": 0
    }
  ]
}
So this is what our class will look like:
TTMSFNCCloudCovidCountry = class
  private
    FCovidAPI: TTMSFNCCovidAPI;
    FTotalConfirmed: integer;
    FNewConfirmed: integer;
    FSlug: string;
    FTotalDeaths: integer;
    FNewDeaths: integer;
    FCountry: string;
    FTotalRecovered: integer;
    FNewRecovered: integer;
    FCoordinate: TTMSFNCMapsCoordinateRec;
  public
    constructor CreateCountry(ACovidAPI: TTMSFNCCovidAPI);
    destructor Destroy; override;
    property Country: string read FCountry;
    property Slug: string read FSlug;
    property NewConfirmed: integer read FNewConfirmed;
    property TotalConfirmed: integer read FTotalConfirmed;
    property NewDeaths: integer read FNewDeaths;
    property TotalDeaths: integer read FTotalDeaths;
    property NewRecovered: integer read FNewRecovered;
    property TotalRecovered: integer read FTotalRecovered;
    property Coordinate: TTMSFNCMapsCoordinateRec read FCoordinate;
  end;

  {$IFDEF WEBLIB}
  TTMSFNCCloudCovidCountries = class(TObjectList)
  private
    function GetItem(Index: Integer): TTMSFNCCloudCovidCountry;
    procedure SetItem(Index: Integer; const Value: TTMSFNCCloudCovidCountry);
  public
    property Items[Index: Integer]: TTMSFNCCloudCovidCountry read GetItem write SetItem; default;
  end;
  {$ELSE}
  TTMSFNCCloudCovidCountries = class(TObjectList<TTMSFNCCloudCovidCountry>);
  {$ENDIF}
As you might notice in the code, we will put these different TTMSFNCCloudCovidCountry items in an TObjectList TTMSFNCCloudCovidCountries . As generics aren't available yet in TMS WEB Core (but being worked on as we speak), we have a small workaround to use them for our cause.
Another thing that might stand out is TTMSFNCMapsCoordinateRec, we will get to that in the TMS FNC Maps part of the demo, but first we will finish our TTMSFNCCovidAPI.

In previous versions we had to parse all of the data ourselves as shown in the following code. But with the new features of TMS FNC Core, this isn't necessary anymore.
procedure TTMSFNCCloudCovidCountry.ParseCountryJSON(AJSON: TJSONValue);
var
  jvv: TJSONValue;
begin
  jvv := TTMSFNCUtils.GetJSONValue(AJSON, 'Country');
  if Assigned(jvv) then
    FCountry := Trim(TTMSFNCUtils.GetJSONProp(AJSON, 'Country'));

  jvv := TTMSFNCUtils.GetJSONValue(AJSON, 'Slug');
  if Assigned(jvv) then
    FSlug := Trim(TTMSFNCUtils.GetJSONProp(AJSON, 'Slug'));

  jvv := TTMSFNCUtils.GetJSONValue(AJSON, 'NewConfirmed');
  if Assigned(jvv) then
    FNewConfirmed := TTMSFNCUtils.GetJSONIntegerValue(AJSON, 'NewConfirmed');

  jvv := TTMSFNCUtils.GetJSONValue(AJSON, 'TotalConfirmed');
  if Assigned(jvv) then
    FTotalConfirmed := TTMSFNCUtils.GetJSONIntegerValue(AJSON, 'TotalConfirmed');

  jvv := TTMSFNCUtils.GetJSONValue(AJSON, 'NewDeaths');
  if Assigned(jvv) then
    FNewDeaths := TTMSFNCUtils.GetJSONIntegerValue(AJSON, 'NewDeaths');

  jvv := TTMSFNCUtils.GetJSONValue(AJSON, 'TotalDeaths');
  if Assigned(jvv) then
    FTotalDeaths := TTMSFNCUtils.GetJSONIntegerValue(AJSON, 'TotalDeaths');

  jvv := TTMSFNCUtils.GetJSONValue(AJSON, 'NewRecovered');
  if Assigned(jvv) then
    FNewRecovered := TTMSFNCUtils.GetJSONIntegerValue(AJSON, 'NewRecovered');

  jvv := TTMSFNCUtils.GetJSONValue(AJSON, 'TotalRecovered');
  if Assigned(jvv) then
    FTotalRecovered := TTMSFNCUtils.GetJSONIntegerValue(AJSON, 'TotalRecovered');
end;
All of the previous code can be replaced with the ToJSON function. Ths is another example of how tmssoftware keeps on making things easier for you.

Now all we need is the rest of our ExecuteRequest and all of the data is handled. The complete function looks like this:
covid.ExecuteRequest(
  procedure(const AResult: TTMSFNCCloudBaseRequestResult)
  var
    I: Integer;
  begin
    o := TTMSFNCUtils.ParseJSON(AResult.ResultString);
    if Assigned(o) then
    begin
      try
        jv := TTMSFNCUtils.GetJSONValue(o, 'Countries');
        if Assigned(jv) then
        begin
          ja := TTMSFNCUtils.GetJSONValue(o, 'Countries') as TJSONArray;

          for I := 0 to TTMSFNCUtils.GetJSONArraySize(ja) - 1 do
          begin
            fo := TTMSFNCUtils.GetJSONArrayItem(ja, i);
            if Assigned(TTMSFNCUtils.GetJSONValue(fo, 'Country')) and (TTMSFNCUtils.GetJSONProp(fo, 'Country') <> '') then
            begin
              country := TTMSFNCCloudCovidCountry.CreateCountry(covid);
              
              country.JSON := fo.ToJSON;

              covid.FCountries.Add(country);

              if country.TotalDeaths > 0 then
              begin
                g.GetGeocoding(country.Country,
                procedure(const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult)
                var
                  c: TTMSFNCCloudCovidCountry;
                begin
                  c := TTMSFNCCloudCovidCountry(ARequest.DataPointer);
                  c.FCoordinate := ARequest.Items[0].Coordinate.ToRec;
                end, '', country);
              end;
            end;
          end;
        end;
      finally
        o.Free
      end;
    end;
  end
  );

This might look like a lot, but I will explain the code bit by bit. First of all we define our Anonymous method that will handle the request result, which we parse to JSON.
Then we check if the response has the value 'Countries', otherwise something went wrong with our request. As this is an array of all of the different countries, we will go over them one by one. The check to see if the JSON property for Country is different from an empty string is because we noticed that there was an empty object in the response. But if the Country has a name, then we create a new Country object.
We parse the information in the object and add it to the object list.

A first hand on TMSFNCMaps

For the last part we will move over to TMS FNC Maps. ‘g’ is an instance of the type TTMSFNCGeocoding. We create this in the FormCreate and add an event to OnRequestsComplete. TTMSFNCGeocoding is a component to perform geocoding of an address or reverse geocoding of a coordinate by using an existing REST API service.
g := TTMSFNCGeocoding.Create(Self);
g.OnRequestsComplete := DoRequestsComplete;
g.APIKey := TMSFNCMaps1.APIKey;
We created the TMSFNCMaps control in design-time, where you can also set the API key. Or this can be done in the code with the property TMSFNCMaps1.APIKey.



To get back to the Geocoding in our API response. The call for geocoding is as followed:
TTMSFNCCustomGeocoding.GetGeocoding(AAddress: string; ACallback: TTMSFNCGeocodingGetGeocodingCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil);
AAddress: is the country name which we placed in the string Country.country. ACallback: is the anonymous method that we use to store the coordinates in c.FCoordinate. AID: is an empty string as we don’t use it. ADataPointer: is the country that we just added and that we convert to c.

That is how we retrieve the coordinates for the countries by their name.

Lets add some things to the map as we would like to have a visible indication to show the impact of the virus, therefor we draw circles on the locations and color them.
This is extremely simple in TTMSFNCMaps with the AddCircle method where you just need to give the circle center and the radius.
We do this in the DoRequestsComplete event that is triggered when our geo location is done.
procedure TForm1.DoRequestsComplete(Sender: TObject);
var
  I: Integer;
  cl: TTMSFNCGraphicsColor;
begin
  TMSFNCMaps1.BeginUpdate;
  for I := 0 to covid.Countries.Count - 1 do
  begin
    with TMSFNCMaps1.AddCircle(covid.Countries[I].Coordinate, Max(50000, 25 * covid.Countries[I].TotalDeaths)) do
    begin
      DataPointer := covid.Countries[I];
      cl := gcSeagreen;
      if covid.Countries[I].TotalDeaths > 500 then
        cl := gcOrange;
      if covid.Countries[I].TotalDeaths > 1000 then
        cl := gcRed;

      FillColor := cl;
      Strokecolor := cl;
      FillOpacity := 0.5;
    end;
  end;

  TMSFNCMaps1.EndUpdate;
end;

The last thing we will add in this example are some events of TTMSFNCMaps. To be more precise we will show a pop-up when we hover the circles that will show the total numbers we retrieved from the API. We do this in the event OnPolyElementMouseEnter.
With the country that was set as datapointer in DoRequestsComplete, we can easily get the different data in the event.
We just call the ShowPopUp method with the location and the text we want to show and as you can see in the example we can use HTML for this as well.
procedure TForm1.TMSFNCMaps1PolyElementMouseEnter(Sender: TObject;
  AEventData: TTMSFNCMapsEventData);
var
  c: TTMSFNCCloudCovidCountry;
begin
  if Assigned(AEventData) then
  begin
    c := AEventData.PolyElement.DataPointer;
    TMSFNCMaps1.ShowPopup((AEventData.PolyElement as TTMSFNCMapsCircle).Center.ToRec,
'
' + c.Country + '

Contaminations: ' + c.TotalConfirmed.ToString + '
Deaths: ' + c.TotalDeaths.ToString + '
Recovered: ' + c.TotalRecovered.ToString + '
', 0, 0); end; end; procedure TForm1.TMSFNCMaps1PolyElementMouseLeave(Sender: TObject; AEventData: TTMSFNCMapsEventData); begin TMSFNCMaps1.CloseAllPopups; end;
And that’s all folks, in less than 250 lines of code, we’ve created a very appealing application that retrieves data from an API and shows different things on a map.
We didn’t use the most valuable feature of TMSFNCMaps, but in case Google Maps is down, we can easily change for another service like Bing, Azure, Here, TomTom, MapBox or OpenLayers to keep the application up-and-running.

This example shows how easy it is to use two very powerful TMS FNC products. And we will go on and try to amaze you with new products and features that are very user-friendly.

Stay safe and remember: “When the going gets rough, the tough get rough”.

Cached Updates in TMS Aurelius, Batch (Bulk) Update in TMS RemoteDB

$
0
0

Two new features in TMS Business: TMS Aurelius Cached Updates and TMS RemoteDB Batch/Bulk Updates


Photo by Arshad Pooloo on Unsplash

We have new releases in TMS Business world! TMS Aurelius 4.12 and TMS RemoteDB 2.5 have just been released, each with a very nice feature:


TMS Aurelius Cached Updates
When persisting objects by calling object manager methods like Save, Flush or Remove, the manager will immediately perform SQL statements to reflect such changes in the database. For example, calling this:
    Manager.Remove(Customer);
Will immediately execute the following SQL statement in the database:
    DELETE FROM CUSTOMERS WHERE ID = :id
With cached updates feature, you have the option to defer the execution of all SQL statements to a later time, when you call ApplyUpdates method. This is enabled by setting CachedUpdates to true. Take the following code as an example:
Manager.CachedUpdates := True;
Manager.Save(Customer);
Invoice.Status := isPaid;
Manager.Flush(Invoice);
WrongCity := Manager.Find(5);
Manager.Remove(City);
Manager.ApplyUpdates;
The above code should perform the following SQL statements:

  1. INSERT (to save the customer - see "exceptions" below);
  2. UPDATE (to modify the status field of the invoice);
  3. DELETE (to delete the city)
The difference is that all the statements will be executed at once, one after another, when ApplyUpdates is called.

You can check this new feature yourself in the new Cached Updates demo which is included in TMS Aurelius install. Here is a screenshot:



TMS RemoteDB Batch/Bulk Updates (Array DML)
In RemoteDB, if you want to insert, update or delete several records at the same time, using the same SQL statement, you can now use the batch update feature - also known as Array DML.

In this mode, a single SQL statement is sent to the server, and multiple values are passed for each parameter. For example, consider the following SQL statement:
XDataset1.SQL.Text := 'INSERT INTO Cities (Id, Name) VALUES (:Id, :Name)';
If you want to insert three records using the same statement, this is how you should do it:
    XDataset1.ParamByName('Id').DataType := ftInteger;
    XDataset1.ParamByName('Name').DataType := ftString;
    XDataset1.ArraySize := 3;
    XDataset1.ParamByName('Id').Values[0] := 1;
    XDataset1.ParamByName('Name').Values[0] := 'London';
    XDataset1.ParamByName('Id').Values[1] := 2;
    XDataset1.ParamByName('Name').Values[2] := 'New York';
    XDataset1.ParamByName('Id').Values[3] := 3;
    XDataset1.ParamByName('Name').Values[3] := 'Rio de Janeiro';
    XDataset1.Execute;    
The advantage of this approach is that a single HTTP request containing the SQL statement and all parameters will be send to the server. This increases performance, especially on environments with high latency.

In addition to that, if the database-access component you are using server-side supports Array DML (like FireDAC or UniDAC), then it will also increase performance server-side significantly, by also using Array DML to actually save data in the database. Otherwise, a batch update will be simulated, by preparing the SQL statement and executing it for each row of parameters.

You can try TMS Aurelius, TMS RemoteDB, and all the other TMS Business products right now! Download the trial version, watch tutorial videos and many more from the TMS Business main page.

TMS WEB Core controls in the upcoming form controls visual update for Chrome

$
0
0

With Microsoft adopting the Chrome engine for its Edge Chromium browser, the force of the collaboration between the Google and Microsoft team is showing now also in an upcoming update for the default visual appearance of HTML form controls.
Where these controls always looked a bit stale before (hence the popularity of CSS libs such as bootstrap), Google and Microsoft are working on a visual overhaul that will be released in Chrome 83.
But, the good news is that from Chrome 81 you can already see a glimpse of the upcoming visual style overhaul and what's more, this visual overhaul is automatically picked up by the standard TMS WEB Core form controls without needing to do any effort.

To experiment for yourself, make sure to update to Chrome 81 and go to the settings page chrome://flags/#form-controls-refresh and enable the Web Platform Controls UI update:



After doing this, your TMS WEB Core applications look and feel goes from:



to:



Read more about these upcoming changes from the Google team here

Excited to go ahead and discover these and more fascinating features of web application development word as Delphi developer?

Discover TMS WEB Core now that lets you create web client applications with unprecedented capabilities!

You can download the trial version, 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!

Books about TMS tools

$
0
0

Get in-depth product knowledge and learn how to get more productive at writing better software!
Now that we are at home, we should make the most of our free time! Here is a list of educational books about TMS components.

  1. Introducing Delphi ORM: Object Relational Mapping Using TMS Aurelius
    John Kouraklis has written yet another great book about Delphi: Introducing Delphi ORM: Object Relational Mapping Using TMS Aurelius.
    It's good news that more and more learning material about TMS Aurelius is being made available to the community.



    With this book you will learn:
    • Gain the fundamentals of ORM frameworks and Aurelius for Delphi
    • Achieve basic tasks, such as connecting to the database and adding, deleting, and updating records, using Aurelius
    • Employ advanced database queries
    • Use the TAureliusDataSet component
    • Integrate with mobile platforms such as Android and iOS
    • Work with the data modeler application


  2. TMS WEB Core: Web Application Development with Delphi



    The content is suitable for both beginners and advanced developers interested in creating web applications with TMS WEB Core.

    • Detailed description of the basics, the functionality, and the transpiler (based on pas2js)
    • Step-by-step creation of the first web application
    • Progressive Web Applications (PWA) for offline use
    • Electron applications: Cross-platform Desktop applications based on web applications
    • Integration of JavaScript classes and controls
    • Creating web services for databases with TMS XData
    • Integration of databases with TDataset controls
    • XData-specific functionality for use in web applications
    • Responsive web design (form designer, HTML, CSS, Bootstrap)
    • The final chapter provides a comprehensive and practical example of server and web application with Google Maps and Google Charts

    Knowledge of Delphi (Object Pascal) and the Visual Component Library (VCL) is required. To reproduce the numerous examples, you need a current version of Delphi and TMS WEB Core. The free Delphi Community Edition is sufficient as well as the trial version of TMS WEB Core.

  3. TMS WEB Core: Webanwendungen mit Delphi entwickeln (German Edition)



    Vorausgesetzt werden Kenntnisse in Delphi (Object Pascal) und der Visuellen Komponenten Bibliothek (VCL). Zum Reproduzieren der zahlreichen Beispiele benötigen Sie eine aktuelle Version von Delphi und TMS WEB Core. Die kostenfreie Delphi Community-Edition ist ausreichend sowie die Testversion von TMS WEB Core.

    Die Inhalte:
    • Ausführliche Beschreibung der Grundlagen, der Funktionsweise und des Transpilers (basierend auf pas2js)
    • Schrittweise Erstellung der ersten Webanwendung
    • Progressive Web Applications (PWA) zur Offline-Nutzung
    • Electron Anwendungen: Plattformübergreifende Desktopanwendungen basierend auf Webanwendungen
    • Einbinden von JavaScript und JavaScript-Komponenten
    • Erstellen von Webservices für Datenbanken mit TMS XData
    • Einbinden von Datenbanken mit TDataset-Komponenten
    • XData-spezifische Funktionalität bei der Nutzung in Webanwendungen
    • Responsives Webdesign (Formulardesigner, HTML, CSS, Bootstrap)
    • Abschließendes Kapitel mit umfassendem und praxisnahem Beispiel mit Server- und Webanwendung mit Google Maps und Google Charts

What's next:

If this crisis allows us, our next planned book will also be TMS WEB Core related! In addition, we also listen to you! Indicate in the comments section below, what the subject of our next book should be!

Hopefully we meet in a Delphi meeting/ conference very soon! Till then stay connected with use via email, forum, blogs and of course our social media!



Stay safe and healthy!


TMS FNC Maps v1.0 is here!

$
0
0

v1.0 is here!

3 weeks ago, we publicly announced TMS FNC Maps (https://tmssoftware.com/site/blog.asp?post=638), followed by a BETA release to all of our TMS ALL Access customers. Today, we are proud to announce the first release of TMS FNC Maps!



Cross-framework, cross-platform, cross-service

We wanted to create a component where you are not tied to a fixed mapping service provider but make it as easy as changing a property to switch to another provider. When a provider raises prices, reduces functionality or when another provider starts providing better routing, change one property setting in your application and you are up & running with another mapping service provider. On top of that, TMS FNC Maps targets the FNC framework, which offers a cross-framework, cross-platform solution for your projects. You all know how the saying goes:

"A picture says more than a thousand words"


Below is a video video that shows a quick overview of what TMS FNC Maps has to offer and which features are supported.



Supported services & features in v1.0

Below is a list of features and services that TMS FNC Maps supports. v1.0 is just the beginning, and many more features and map services will be added in the future. Please let us know if you have a service or feature of a specific service that you want to see available in TMS FNC Maps.

List of services for mapping, directions and geocoding
  • Google
  • Here
  • Microsoft Azure
  • Microsoft Bing
  • TomTom
  • MapBox
  • OpenLayers

List of features
  • Directions/Routing (TTMSFNCDirections)
  • Options for configuring alternative routes, step by step directions, …
  • Geocoding (normal, reverse) (TTMSFNCGeocoding)
  • Getting current location (TTMSFNCLocation)
  • Maps (TTMSFNCMaps)
    • Polylines
    • Polygons
    • Markers
    • Circles
    • Rectangles
    • Zooming, centering
    • Loading GPX, GeoJSON
    • Various Events
  • Google Maps (TTMSFNCGoogleMaps)
    • Inherits from TTMSFNCMaps
    • Load KML
    • Editing of polylines, polygons, circles and rectangles
    • Dragging of markers
    • Traffic
    • Themes (Night, …)

FNC

Please remember, TMS FNC Maps is a part of the FNC family and FNC is a cross-platform / cross-framework component library. Write your code once and target multiple operating systems!



Breaking changes!

To get the best out of TMS FNC Maps and make all of this work together we've introduced breaking changes and moved the TMSFNCCloudBase unit from TMS FNC Cloud Pack to TMS FNC Core. This means that each FNC product will have access to this unit and this allows you to consume your own REST service, download/upload files without the need for TMS FNC Cloud Pack.

Edge Chromium for Windows

TMS FNC Maps is using the Edge Chromium browser on Windows (FMX, VCL and LCL). To install this browser, please follow the steps at https://www.tmssoftware.com/site/edgechromium.asp

Importing web components into TMS WEB Core

$
0
0


Home office does not stop us from researching and experimenting with new technologies. While in the past weeks we shared news about our TMS FNC Maps, we were also busy with doing research for future versions of TMS WEB Core. We would like to give you a sneak peek of one of our ongoing projects: web components.

What are web components?

Web components allow you to create custom and reusable HTML tags via a set of JavaSript API, they can be scripted and styled without colliding with other parts of the document. They are based on existing web standards and support is continuously added. They were first introduced in 2011 but no proper support followed until recently. You can read more about how to create web components in the MDN web docs. This naturally raises the question: Can we use them in TMS WEB Core?

The short answer is yes because WEB Core already provides ways to interact with native JavaScript calls. You can call document.createElement('your-custom-tag') and set the properties of the TJSElement. But we are Delphi developers after all, and most of us prefer to use Pascal over JavaScript. So wouldn't it be nice to import them into TMS WEB Core?

Our importing tool

Imagine the following scenario: You found a nice web component pack that you'd like to use in TMS WEB Core. You can create wrapper classes yourself, but it might take a lot of time depending on the complexity of the components. We also don't like doing a lot of manual work like that, so we had the idea to create an importing tool instead. Unfortunately there are many ways to create web components but not enough or reliable ways to extract information regarding to properties, events and methods. It was clear that some sort of helper file will be needed and we set up a goal: Create wrapper classes automatically based on JSON descriptions. We also take every opportunity we can to challenge our own framework - we created this tool using TMS WEB Core!

As a first set of components to cover, we wanted to import Smart UI from the creators of jQuery jQWidgets controls that we already support in TMS WEB Core. It has both simple and complex elements, so it already gave us a huge set of functionality to cover.



The TMS WEB Core web components import tool was written with TMS WEB Core itself, so in a way, TMS WEB Core can magically create its components 😉

How does it work?

First we convert the JSON description to a TJSONObject then we loop through the properties and store them accordingly. In case of methods and events we need to store the parameters list too. Once that's done, we have everything we need to create the Pascal wrapper classes. This means 2-3 files for each component:
  • A core file to contain the source that's responsible for setting the correct properties, calling the correct methods, binding the correct events...
  • A stub file for designtime purposes
  • And sometimes it's unavoidable to introduce a file where we map onto the functions provided by the given component's JavaScript object
In each of these cases we start from a template string and extend/modify that based on the type of the file. These modifications include adding the properties, property setters, binding/mapping the methods and events, adding collections and extra classes where needed. We also need to take into account which types of properties can be published and which properties remain public. The result is a Pascal wrapper class where minimal manual work might still be needed, but it's a huge step compared to manually writing everything!

Let’s see an example!

For this demonstration we picked two smaller components: SmartButton and SmartToast. Both components were automatically generated; we are just going to use them! After conversion the class definition looks pretty similar in the stub and core file. The only differences are the property getters/setters and protected methods:
TWebSmartButton = class(TWebCustomControl)
private
  FAnimation: string;
  FClickMode: string;
  FContent: JSValue;
  FDisabled: Boolean;
  FInnerHTML: string;
  FLocale: string;
  FMessages: TJSObject;
  FReadonly: Boolean;
  FRightToLeft: Boolean;
  FTheme: string;
  FType: string;
  FValue: string;
  FUnfocusable: Boolean;
  FOnClick: TNotifyEvent;
public
  constructor Create(AOwner: TComponent); override;
  destructor Destroy; override;
  property Content: JSValue read FContent write FContent;
  property Messages: TJSObject read FMessages write FMessages;
published
  property Animation: string read FAnimation write FAnimation;
  property ClickMode: string read FClickMode write FClickMode;
  property Disabled: Boolean read FDisabled write FDisabled default false;
  property InnerHTML: string read FInnerHTML write FInnerHTML;
  property Locale: string read FLocale write FLocale;
  property Readonly: Boolean read FReadonly write FReadonly default false;
  property RightToLeft: Boolean read FRightToLeft write FRightToLeft default false;
  property Theme: string read FTheme write FTheme;
  property &Type: string read FType write FType;
  property Value: string read FValue write FValue;
  property Unfocusable: Boolean read FUnfocusable write FUnfocusable default false;
  property OnClick: TNotifyEvent read FOnClick write FOnClick;
end; 
You can compare these properties and events to the component documentation.

We are going to show a notification when the button is clicked. The properties can be set from the form designer but except for the SmartButton.InnerHTML property we are doing it programmatically now. So far our form looks like this:



The white rectangle above is the TWebSmartButton and the one below is the TWebSmartToast. The TWebSmartToast is not visible at runtime but the width and the height of the control are used if the Modal property is enabled.
Let’s implement the OnClick event, set the properties of the TWebSmartToast and show the notification:
procedure TForm1.WebSmartButton1Click(Sender: TObject);
begin
  WebSmartToast1.Position := 'top-left';
  WebSmartToast1.&Type := 'success';
  WebSmartToast1.ShowCloseButton := True;
  WebSmartToast1.Value := 'This is a success! :-)';
  WebSmartToast1.Open;
end;
With such small effort we get the following, visually appealing result:



We hope that this got your interest already, because here you can find an online demo of some of the Smart UI components. The wrappers for the components you find in the demo were 100% automatically generated! This again shows the power of what TMS WEB Core can do!

What's coming in TMS WEB Core v1.4 Ravenna

$
0
0

The world of web development is evolving fast, it comes as no surprise that TMS WEB Core evolves fast. When we embarked on this exciting adventure in 2017, we knew the road would be long. There is simply an abundance of things to do in the world of web development and we made it our mission to put Delphi developers in a front seat to apply the well known RAD approach to create web applications with an unparalleled productivity.

When we first released TMS WEB Core v1.0 on July 26, 2018, we named version 1.0 Brescia after the city where the famous car race Mille Miglia starts. And with each subsequent version, we name it after a city across the legendary Mille Miglia track of 1955. We visited meanwhile Verona with v1.1, Padua with v1.2 and Ferrara for v1.3. So, now we are heading to version v1.4 that will be named Ravenna.



The theme for TMS WEB Core v1.4 Ravenna is:

  • widening the UI control offerings with controls for frequently used UI patterns
  • enhancing the HTML-first approach
  • increasing easy interfacing to additional popular back-end services

Widening the UI control offerings

We have added two brand new UI controls in TMS WEB Core v1.4 Ravenna:

TWebImageSlider

In many scenarios, people want to show various pictures of things for specific items. Think about a product on Amazon that might have different pictures taken from different angles, think about an online real-estate broker presenting different houses with picture sets of the house on sale or a car dealer showing cars for sale accompanied by pictures of the car in various positions.

If you have such a use-case in your application, TWebImageSlider is the shortcut to achieve this. Basically this is a container control where you add the links to the images to be displayed and the control does everything else. It shows the picture thumbnails, a left / right slider button and you can click on thumbnails to see the large version of a specific picture.



Now, to integrate this kind of functionality should not take much more than a couple of minutes.

var
  i: Integer;
begin
   for i := 1 to 8 do
    ImageSlider.ImageURLs.add(Format('./images/nature-%d.jpg', [i]));
  ImageSlider.RefreshImages;
  ImageSlider.Appearance.TransitionEffect := tefSlide;
end;
TWebContinuousScroll

Another often used pattern is to show lists of items filling the viewing area of the browser only and after this, only load additional items when the user decides to scroll down. The reasoning behind such UI control is simple. By loading only the items in view, the initial display of the page is very fast and only when the user wants to see additional items, extra items are loaded asynchronously in the list.



TWebContinuousScroll is again a shortcut to this pattern. Drop the control on the form, add the event handler code for the event that is triggered when a new page of items is needed and return the requested items. TWebContinuousScroll does the rest, it handles the rendering, it handles the UI interaction (mouse dragging / touch scrolling) and just triggers the event when new items are needed.

procedure TForm1.WebContinuousScroll1FetchNextPage(Sender: TObject; APageSize,
  APageNumber: Integer; var AURL: string);
begin
  AURL := 'https://tmswebcore.com:8082/?page=' + IntToStr(APageNumber) + '&per_page=' + IntToStr(APageSize);
end;

New TWebListControl demo

The TWebListControl is a very versatile list control that might not be well understood enough and therefore underused by TMS WEB Core developers. TWebListControl uses the bootstrap CSS library do its magic. From a list of items, it can create a breadcrumb, a tab list, an item list, a list with expanding/collapsing subitems. The new demo shows the various modes of the versatile TWebListControl



Electron 8 support

The fast evolving framework Electron for creating cross platform desktop applications reached meanwhile version 8. It is being polished & enhanced all the time to allow to create responsive installable & near-native experience desktop applications for Windows, macOS and Linux with the advantage that the UI is rendered from HTML/CSS, meaning that in terms of graphical appeal, there are no limits. With TMS WEB Core v1.4, we did the necessary changes to the framework and the Electron specific controls to make these work as seamless as possible with Electron 8.

Enhancing the HTML-first approach

We've realized that not for all users looking at TMS WEB Core it was clear that using the Delphi IDE form designer for creating your web pages is by far not the only way to do it. While TMS WEB Core was developed from the ground up to facilitate this for Delphi developers familiar approach to create application forms, it was equally from the ground up built to enable the use of HTML/CSS based pages. This means that you can use existing HTML/CSS page templates which are not only created by web designers but can be obtained free or very cheap from various websites. Sometimes you get for $25 and extraordinary good looking web page template. Of course, we wanted to offer the capability to use such templates and from the Delphi IDE, you will basically just write the UI control logic and leave the page layout to HTML and CSS.

New TWebElementActionList

This new component, not to be confused with Delphi actions, facilitates easy hooking to events for all the HTML elements in page templates. It is a collection of actions that you define that happen when an event happens for a HTML element on the page. For example, the menu of your application could be a graphically very good looking HTML/CSS based animated menu and you can use the TWebElementActionList to define the actions that should happen when a specific item in this HTML/CSS menu is clicked. To do this, simple add the template HTML/CSS to your form, make sure to set a unique ID to each HTML element representing menu items and then add a TElementAction for each item in the menu. Define for the TElementAction.Event for example heClick and then the TElementAction.OnExecute event will be triggered when this menu item is clicked. In this OnExecute you could then for example add the UI control logic to show a DB grid with data, show a different form etc... As a Delphi developer, you have reused the graphical skills of a web designer and you just had to do a minimal effort to connect the logic in your application that is happening when the user interacts with the user-interface.



Increasing easy interfacing to additional popular back-end services

In TMS WEB Core we have already included the TWebClientConnecton, TWebClientDataSet, TWebDataSource to bring the pattern VCL Delphi developers have known ever since the inception of Delphi to bind data to UI controls. This concept also exists in TMS WEB Core. To make the binding to the back-end easy, we have a TWebXDataDataSet that shields all the complexities of communicating with a TMS XData REST server. We have the TWebmyCloudDataClientDataSet to shield this same complexity when our myCloudData cloud data storage service is used (free for all TMS ALL-ACCESS users). We also have the TWebSQLRestClientDataSet that interfaces to the Lazarus foundation open source SQLDBBridge REST server. And we TWebFirestoreClientDataSet for users wanting to use Google's Firestore cloud data storage solutions. With TMS WEB Core 1.4 Ravenna, we are pleased to offer 3 more easy out of the box solutions to connect to back-end services.

New TWebRadServerClientDataset



Delphi Enterprise or Delphi Architect SKU users have out of the box a license to Embarcadero Rad Server. Embarcadero Rad Server offers the technology to create REST services and is able to create a REST API for performing operations on databases in the back-end. While TMS WEB Core includes a component to perform REST requests to work with Embarcadero Rad Server out of the box, the new TWebRadServerClientDataset just makes it way easier to hook-up a UI with DB-aware controls to an Embarcadero Rad Server and perform through this dataset CRUD operations. Basically you set the URL to the data exposed as JSON based REST API from Embarcadero Rad Server and the TWebRadServerClientDataset middleware will perform all required HTTP GET,PUT,POST,DELETE requests, JSON handling behind the scenes and from the TMS WEB Core client you have just the DB-aware UI controls hooked up to it via a TWebDataSource. We have added our todo-list demo that is using Embarcadero Rad Server just like we have this same todo-list demo. Other than the dataset, there is not much different from the demo using Firestore, TMS XData, SQLDBBridge, myCloudData. This shows how back-end agnostic TMS WEB Core web client applications can be.

New TWebDreamFactoryClientDataSet

From all low code back-end technologies, Dream Factory is without a doubt the most flexible one. With Dream Factory you can create REST APIs for access to data on the back-end by doing all the settings and parameterizing via a web interface. No need to do any programming, no need to dive into all technical details of HTTP(s) request, authentication, JSON packets, ... Dream Factory does this all for you. We had Dream Factory as a very interesting back-end for TMS WEB Core already on the radar even before the inception of TMS WEB Core in 2018 as it is a very interesting technology for offering cloud data access for VCL Windows applications or FMX cross-platform applications, possibly further facilitated via a TMS Cloud Pack component.
But now we embark with our first bridge component, the TWebDreamFactoryClientDataSet that you can configure with the URL of your Dream Factory REST API and this bridge component does all the required communication to perform CRUD operations via its dataset to a database with a Dream Factory REST API. This dataset is then easily hooked up via a TWebDataSource to the TMS WEB Core DB-aware UI controls. Also here, we have taken the same todo-list demo and with minimal effort (basically replacing the dataset) our todo-list application talks to a Dream Factory based back-end.
While TWebDreamFactoryClientDataSet is a first step for easy Dream Factory REST API back-end access from TMS WEB Core web client applications, we're eager to offer even more integration with the Dream Factory APIs in future TMS WEB Core versions as well as in future versions of the TMS FNC Cloud Pack that can be used in native Windows applications as well as native cross platform Delphi FireMonkey applications.



New TWebFaunaDBClientDataSet

Where Dream Factory offers automatic codeless REST API creation for access to a multitude of databases or services, FaunaDB is a cloud data storage service that hosts the data for you and offers as REST API to access it. It has similarities with our own myCloudData.net service and a few interesting angles. As such, to offer yet more freedom of choice, we have added the TWebFaunaDBClientDataSet component. You can use the web interface on your account at FaunaDB to design your tables and this can automatically be consumed when setting the proper URL to the TWebFaunaDBClientDataSet component. There is not much more to it, go to FaunaDB.com, setup your tables, set the URL to TWebFaunaDBClientDataSet and hookup DB-aware TMS WEB Core controls to this dataset via a datasource and you are up & running to perform CRUD operations on these tables. Similar as for Embarcadero Rad Server and the Dream Factory REST API, we have a version of the todo-list demo that works with FaunaDB.

Get ready

The beta for TMS WEB Core v1.4 is around the corner. We are doing the testing, finishing the demos and writing the new documentation. TMS ALL-ACCESS users are in the front seat and can expect this beta accessible from their account shortly and after a couple of weeks testing, we will release this new 1.4.



We hope you are as excited as we are about the new TMS WEB Core v1.4. And there is more! It is this v1.4 feature set that will also be included in TMS WEB Core for Visual Studio Code. The project to offer a TMS WEB Core version integrated in the Microsoft free and cross platform Visual Studio Code IDE has significantly advanced in the past couple of months. A select group of beta users is currently test-driving the newest builds. Very shortly, TMS ALL-ACCESS users will also get access to the beta and after a few more weeks of testing/feedback/updates we plan to release this version as well.

FNC Hidden Gems: JSON persistence

$
0
0

Intro

FNC has evolved over time. Each update brings new features, some of them are visible at designtime/runtime. Some of time are happening behind the screens. Some updates are bringing a lot of fixes to make FNC more stable across the multiple frameworks and platforms FNC supports. JSON persistence is one of those hidden gems that is available in TMS FNC Core. Today's blog brings a step by step tutorial on how to implement JSON persistence in your application, and how to import objects from JSON.

Getting Started

JSON formatted data can come from a REST service, a database, a local file, plain text ... . It's an easy to read/learn/use and consume format and in FNC we have added support for mapping objects to JSON and vice versa. The code below is a sample of JSON that we will map on an object in Delphi. We'll focus on having an object that can access the properties shown in this JSON:

{
   "$type":"TPerson",
   "address":{
      "$type":"TPersonAddress",
      "addressLocality":"Colorado Springs",
      "addressRegion":"CO",
      "postalCode":"80840",
      "streetAddress":"100 Main Street"
   },
   "colleague":[
      "http://www.example.com/JohnColleague.html",
      "http://www.example.com/JameColleague.html"
   ],
   "email":"info@example.com",
   "jobTitle":"Research Assistant",
   "name":"Jane Doe",
   "birthDate":"1979-10-12",
   "gender":"female",
   "nationality":"Albanian",
   "telephone":"(123) 456-6789",
   "url":"http://www.example.com",
}

For accessing this data we need to define our classes first:
type
  TPersonAddress = class(TPersistent)
  private
    FPostalCode: string;
    FAddressLocality: string;
    FAddressRegion: string;
    FStreetAddress: string;
  published
    property AddressLocality: string read FAddressLocality write FAddressLocality;
    property AddressRegion: string read FAddressRegion write FAddressRegion;
    property PostalCode: string read FPostalCode write FPostalCode;
    property StreetAddress: string read FStreetAddress write FStreetAddress;
  end;

  TPerson = class(TPersistent)
  private
    FAddress: TPersonAddress;
    FColleague: TStringList;
    FBirthDate: string;
    FName: string;
    FEmail: string;
    FTelephone: string;
    FGender: string;
    FNationality: string;
    FJobTitle: string;
    FURL: string;
  public
    constructor Create;
    destructor Destroy; override;
  published
    property Address: TPersonAddress read FAddress;
    property Colleague: TStringList read FColleague;
    property Email: string read FEmail write FEmail;
    property JobTitle: string read FJobTitle write FJobTitle;
    property Name: string read FName write FName;
    property BirthDate: string read FBirthDate write FBirthDate;
    property Gender: string read FGender write FGender;
    property Nationality: string read FNationality write FNationality;
    property Telephone: string read FTelephone write FTelephone;
    property URL: string read FURL write FURL;
  end;
And the JSON data (please note that linebreaks and whitespaces are currently not supported, but this is being worked on!.
const
  jsonSample =
    '{' +
      '"$type": "TPerson",' +
      '"address":{' +
        '"$type": "TPersonAddress",' +
        '"addressLocality":"Colorado Springs",' +
        '"addressRegion":"CO",' +
        '"postalCode":"80840",' +
        '"streetAddress":"100 Main Street"' +
      '},' +
      '"colleague":[' +
        '"http://www.example.com/JohnColleague.html",' +
        '"http://www.example.com/JameColleague.html"' +
      '],' +
      '"email":"info@example.com",' +
      '"jobTitle":"Research Assistant",' +
      '"name":"Jane Doe",' +
      '"birthDate":"1979-10-12",' +
      '"gender":"female",' +
      '"nationality":"Albanian",' +
      '"telephone":"(123) 456-6789",' +
      '"url":"http://www.example.com"' +
    '}';
There are multiple ways to map the JSON onto the TPerson object.

1. Use the TTMSFNCPersistence class
Add the unit *TMSFNCPersistence to the uses list (* = FMX., LCL, VCL., WEBLib.), and use the following code:
var
  p: TPerson;
  s: TStringStream;
begin
  p := TPerson.Create;
  s := TStringStream.Create(jsonSample);
  try
    TTMSFNCPersistence.LoadSettingsFromStream(p, s);
  finally
    s.Free;
    p.Free;
  end;
end;
2. Use the object class helper in *TMSFNCTypes unit An alternative is to use the class helper that maps JSON to the object.
var
  p: TPerson;
begin
  p := TPerson.Create;
  try
    p.JSON := jsonSample;
  finally
    p.Free;
  end;
end;
Writing to JSON is as easy as reading. Simply use SaveSettingsToFile or SaveSettingsToStream or use the JSON object class helper to get the JSON from the object.
  p: TPerson;
begin
  p := TPerson.Create;
  try
    p.JSON := jsonSample;
    p.Name := 'tmssoftware.com';
    TTMSFNCUtils.Log(p.JSON);
    //or
    TTMSFNCPersistence.SaveSettingsToFile(p, 'TPerson.json');
  finally
    p.Free;
  end;
end;
Note that this code will also work on other frameworks such as VCL, LCL and WEB. Below is the full code sample that demonstrates JSON persistence. Please let us know if you have suggestions on what to add to TMS FNC Core in the future!
unit Unit1;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
  FMX.Controls.Presentation, FMX.StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

uses
  FMX.TMSFNCTypes, FMX.TMSFNCPersistence;

const
  jsonSample =
    '{' +
      '"$type": "TPerson",' +
      '"address":{' +
        '"$type": "TPersonAddress",' +
        '"addressLocality":"Colorado Springs",' +
        '"addressRegion":"CO",' +
        '"postalCode":"80840",' +
        '"streetAddress":"100 Main Street"' +
      '},' +
      '"colleague":[' +
        '"http://www.example.com/JohnColleague.html",' +
        '"http://www.example.com/JameColleague.html"' +
      '],' +
      '"email":"info@example.com",' +
      '"jobTitle":"Research Assistant",' +
      '"name":"Jane Doe",' +
      '"birthDate":"1979-10-12",' +
      '"gender":"female",' +
      '"nationality":"Albanian",' +
      '"telephone":"(123) 456-6789",' +
      '"url":"http://www.example.com"' +
    '}';

type
  TPersonAddress = class(TPersistent)
  private
    FPostalCode: string;
    FAddressLocality: string;
    FAddressRegion: string;
    FStreetAddress: string;
  published
    property AddressLocality: string read FAddressLocality write FAddressLocality;
    property AddressRegion: string read FAddressRegion write FAddressRegion;
    property PostalCode: string read FPostalCode write FPostalCode;
    property StreetAddress: string read FStreetAddress write FStreetAddress;
  end;

  TPerson = class(TPersistent)
  private
    FAddress: TPersonAddress;
    FColleague: TStringList;
    FBirthDate: string;
    FName: string;
    FEmail: string;
    FTelephone: string;
    FGender: string;
    FNationality: string;
    FJobTitle: string;
    FURL: string;
  public
    constructor Create;
    destructor Destroy; override;
  published
    property Address: TPersonAddress read FAddress;
    property Colleague: TStringList read FColleague;
    property Email: string read FEmail write FEmail;
    property JobTitle: string read FJobTitle write FJobTitle;
    property Name: string read FName write FName;
    property BirthDate: string read FBirthDate write FBirthDate;
    property Gender: string read FGender write FGender;
    property Nationality: string read FNationality write FNationality;
    property Telephone: string read FTelephone write FTelephone;
    property URL: string read FURL write FURL;
  end;

{ TPerson }

constructor TPerson.Create;
begin
  FAddress := TPersonAddress.Create;
  FColleague := TStringList.Create;
end;

destructor TPerson.Destroy;
begin
  FreeAndNil(FAddress);
  FreeAndNil(FColleague);
  inherited;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  p: TPerson;
begin
  p := TPerson.Create;
  try
    p.JSON := jsonSample;
  finally
    p.Free;
  end;
end;

end.


Friendly balloon hints for entry via TAdvInputTaskDialog

$
0
0


The TaskDialog API was introduced in the Microsoft Windows Vista operating system as a more user-friendly way to give notifications to users. Where a MessageBox() only has a caption, text, icon and buttons, the task dialog introduced additional expanded text, options to select from, checkbox to select to show the message again in the future or not etc...

When the Windows Vista TaskDialog appeared, TMS was the first to embrace it and make a component that not only used this API on Windows Vista or newer operating systems, but also emulated the API on operating systems older than Windows Vista so it would be useful everywhere opposed to applications using only the Microsoft API and thereby making the application minimum requirement Windows Vista or newer.

But we did not only that, we extended the capabilities offering that the dialog could also capture inputs rather than just show a message and wrapped this in the component TAdvInputTaskDialog. Inputs can be captured using various control types:

  • itEdit: regular TEdit is used
  • itMemo: regular TMemo is used
  • itComboEdit: a TComboBox in csDropDown style is used
  • itComboList: a TComboBox in csDropDownList style is used
  • itDate: a TDateTimePicker in dtkDate kind
  • itCustom: any custom VCL control can be used for input
  • itNone: no input is possible
  • itTime: a TDateTimePicker in dtkTime kind
  • itPassword: a TEdit with password style is used

And recently, we went a step further. We added a friendly way to validate input when the user wants to close the input dialog and show a Windows balloon hint with information when the input is not considered valid. To do this, implement the TAdvInputTaskDialog.OnValidateInputText() event handler. This event handler returns the entered text and has an IsValid parameter that can be used to allow the dialog to close or not. Now, with the properties AdvInputTaskDialog.InvalidEntryTitle, AdvInputTaskDialog.InvalidEntryText, AdvInputTaskDialog.InvalidEntryIcon we can specify what the balloon hint should display when the input is not considered valid.

How this works is shown in two samples below.
The first sample is for a capturing an email address with the validation that the user only enters a qualifying email address. We use the Delphi regular expressions component TRegEx to perform this validation and set the balloon hint info when the entry is not a valid email address:
procedure TForm1.Button1Click(Sender: TObject);
begin
  AdvInputTaskDialog1.Title := 'Enter email address';
  AdvInputTaskDialog1.Content := 'Email:';
  AdvInputTaskDialog1.Icon := tiShield;
  AdvInputTaskDialog1.ExpandedDefault := true;
  AdvInputTaskDialog1.ExpandedText := 'Your email address will be used to login';
  AdvInputTaskDialog1.Execute;
end;
procedure TForm1.AdvInputTaskDialog1ValidateInputText(Sender: TObject;
  var NewValue: string; const Data, ModalResult: Integer; var IsValid: Boolean);
begin
  isValid := TRegEx.IsMatch(NewValue, '^([a-zA-Z0-9_-.]+)@([a-zA-Z0-9_-.]+).([a-zA-Z]{2,5})$');

  if not isValid then
  begin
    AdvInputTaskDialog1.InvalidEntryTitle := 'Input error';
    AdvInputTaskDialog1.InvalidEntryText := 'Value entered is not a valid email address';
    AdvInputTaskDialog1.InvalidEntryIcon := tieError;
  end;
end;


The second sample is for a capturing a password that needs to meet specific security requirements. As this concerns a password entry where the password is not supposed to be visible on the screen, the TAdvInputTaskDialog.InputType is set to itPassword. Also here we use the Delphi regular expressions component TRegEx to perform this validation and set the balloon hint info when the entry is not a valid email address:

procedure TForm1.Button2Click(Sender: TObject);
begin
  AdvInputTaskDialog2.Title := 'Enter a new password';
  AdvInputTaskDialog2.Content := 'Password:';
  AdvInputTaskDialog2.Icon := tiQuestion;
  AdvInputTaskDialog2.InputType := itPassword;
  AdvInputTaskDialog2.ExpandedDefault := true;
  AdvInputTaskDialog2.ExpandedText := 'The password must'#13
    + ' - have a lengh greater than or equal to 8'#13
    + '- contain one or more uppercase characters'#13
    + '- contain one or more lowercase characters'#13
    + '- contain one or more numeric values'#13
    + '- contain one or more special characters';

  AdvInputTaskDialog2.Execute;
end;
procedure TForm1.AdvInputTaskDialog2ValidateInputText(Sender: TObject;
  var NewValue: string; const Data, ModalResult: Integer; var IsValid: Boolean);
begin
  isValid := TRegEx.IsMatch(NewValue, '(?=^.{8,}$)(?=.*d)(?=.*[!@#$%^&*]+)(?![.
])(?=.*[A-Z])(?=.*[a-z]).*$');

  if not isValid then
  begin
    AdvInputTaskDialog2.InvalidEntryTitle := 'Invalid password';
    AdvInputTaskDialog2.InvalidEntryText := 'Please enter a password meeting the security requirements';
    AdvInputTaskDialog2.InvalidEntryIcon := tieError;
  end;
end;


TAdvInputTaskDialog with balloon hints is available in the latest TMS VCL UI Pack (the successor of TMS Component Pack) along with over 400 other powerful VCL user-interface components to make your Delphi Windows applications shine!

You can get the trial version to find out for yourself and note that when you are a student, we have a free academic version!

TMS WEB Core v1.4 beta is here for TMS ALL-ACCESS users

$
0
0


We are happy to report that all active TMS ALL-ACCESS users will find the TMS WEB Core v1.4 beta on their user account now after login on our website.
Move over to our website and download the beta. Make sure to uninstall the current release v1.3.8.0 via the Windows Controls Panel and proceed installing this exciting new version. As beta tester, you can be ahead of the curve and already start exploring all new features and improvements in this new version.

TMS WEB Core v1.4 represents multiple months of hard work from our team, some parts have been over 6 months in development.
Here is a summary of what you can discover in the TMS WEB Core v1.4 beta:

  • New TWebImageSlider UI control to make presenting catalogs with pictures fast and easy
  • New TWebContinuousScroll UI control to bring fast loading and load-as-you-scroll lists
  • New TWebElementActionList to facilitate binding Pascal code to HTML template elements
  • New TWebRadServerClientDataset offering a codeless interface to data from Embarcadero RAD server
  • New TWebDreamFactoryClientDataSet making consuming data via DreamFactory REST APIs a breeze
  • New TWebFaunaDBClientDataSet letting you bind cloud data in web client applications code-less
  • New Electron 8 support allowing you to take advantage of the newest stable Electron framework for building cross platform desktop applications
  • New TWebPayPal migrated to the newest PayPal JavaScript SDK
  • New demos for TWebListControl, TWebElementActionList
  • New Latest stable release pas2js 1.4.24 compiler support added
  • New TBitmap load from URL, file, cache with anonymous method added
  • New TWebHttpRequest anonymous methods for handling asynchronous requests in a different way
Other than these new features added, hundreds of smaller improvements have been done and several issues fixed. A lot of the smaller improvements are a direct result of the simultaneous work done to make the TMS WEB Core framework work as seamless as possible with the live designer in the upcoming TMS WEB Core for Visual Studio Code.

The documentation was expanded and totals over 420 pages now. The number of included demos is now just under 100 (not counting the Lazarus converted demos also included).

Take note that we were also forced to do a couple of small breaking changes that should not take much more than a couple of minutes to adapt for. The breaking changes were mostly due to the simultaneous work on the version for Visual Studio Code. In the documentation folder you will find the release notes document that explains the changes.

We are of course eager to learn how your experience with the beta will go, what works well and what might perhaps need some more attention before the final release. Our team is here and listening to all your feedback!

Do you have already one or more TMS product licenses and are interested to get on board for TMS ALL-ACCESS, our no-nonsense formula for access to our full current and future toolset, priority support and access to betas, contact our sales: sales@tmssoftware.com for a best possible upgrade offer.

Extend TMS WEB Core with 40+ Smart HTML Elements

$
0
0



We are pleased to inform that today, a free open-source package is available to you that offers Pascal wrapper classes for using over 40 Smart HTML Elements UI web components* with TMS WEB Core web client applications. For a list of these components, their features and how they work, head over to the HTML Elements online documentation.

These new Smart HTML Elements UI web components, part of the jQWidgets company, can be used together with any other TMS WEB Core components to create visually stunning web user interfaces. We created a demo that is included in the package:



and you can also play with this demo online.

This new package is the result of our research to automate the importing and creation of Pascal wrapper classes for use at design-time with TMS WEB Core in the Delphi IDE. The background of this research is discussed in much more detail in another blog article. We believe that the result of this research is not only that you have now the chance to use a wide extra range of components, but the source code for the Pascal wrapper classes should also give you an insight how you can create your own wrapper classes for other existing web components. And we also hope that this research will yield in the near future also the further additional open-source packages of extra web components for your use with TMS WEB Core. After all, we strongly believe in the freedom of choice. TMS WEB Core is born out of this belief and freedom of choice is in its DNA. Before we had written the first line of code for the TMS WEB Core framework, we had this vision that we wanted a freedom of choice for:

  • UI widget set: choose the UI web components, look & feel, HTML template based or not
  • IDE: choose the IDE you want on the operating system you want for your development
  • Backend: choose any backend technology you want

It won't stop here. The road is long and adventurous. Our team is always looking out for your inputs, ideas, thoughts for future developments on TMS WEB Core, be it for widget sets, development experience in the IDE or use of backend data & services.

Get started today extending the range of UI controls for TMS WEB Core by downloading this package and follow the instructions in the included manual to obtain the Smart HTML Elements and enjoy:
Download

*) While the Pascal wrapper classes are free and open-source, your usage of Smart HTML Elements in your commercial web applications might require a license. Contact jQWidgets for your licensing questions.


New Hands-on with Delphi book available now

$
0
0

I'm more than delighted to see today the first fruits of brainstorming and ideas that started here more than 6 months ago.

     

This first result is a new book, written by our chief evangelist Dr. Holger Flick. The book title is "Hands-on with Delphi" and on the side of the book you can see in a light blue rectangle the big number 1. This suggests there will be a number 2, and 3 and ...

So, what did we brainstorm about? Over the timespan of 25 years, we have created a wide range of products, all focusing on a specific area. There are the VCL UI controls in TMS VCL UI Pack, there is the Flexcel product for sophisticated manipulation, generation of Excel & PDF files, there is our Aurelius ORM, our XData server, our cross-framework/cross-platform FNC components, our TMS WEB Core framework, ... too much to name it all. Each product has its strengths and its documentation and samples focus on this one specific product.

But there is a bigger picture and that picture is what you are doing on a daily basis. Creating great software applications for users by bringing together the best components from our company as well as other 3rd party companies. There is one thing in common, that is of course: Delphi which is the central part, the IDE, the compiler, the frameworks that bind it all together.

And with this insight, the idea was born that it would bring additional value if more knowledge was transferred about how to bring all pieces of the puzzle together, how the different components, technologies, frameworks and tools can be brought together to create powerful & stunning applications that help people and organisations all over the world in many domains.

In this first book in the series, Holger already brings together a big stack of different products:

With the book come of course also the sample projects that were created using Delphi 10.3 Rio.

Head over to the book content description to see what you will learn with the book:
  • Write a professional web service for a database with over 8 million records.
  • Design VCL, FireMonkey and TMS WEB Core web clients for multiple platforms and devices.
  • Implement a reporting service with XData.
  • Generate signed PDF documents with a customizable template.
  • Add a token-based login to your services.
  • Build user interfaces with vector images to be ready for any display resolution.
  • Encrypt sensitive data using modern algorithms.
  • Use parallel programming to build responsive client applications.
  • Write better code with static code analysis.


The book can be ordered from today from Amazon:


Check the blog from our colleague Dr. Holger Flick where you can obtain also a sample chapter PDF.

And if that's not enough, the content table for the 2nd book is already nearly done. We are eager to learn though what you want to see covered in books 3, 4, 5 ...

TMS VCL UI Pack 10.3 Major Update

$
0
0

We have another major update for you for the TMS VCL UI Pack. This update includes 3 new components, more than 20 new features and lots of smaller improvements and fixes.

New Components

We will start of to get you acquainted with the freshly added components in our VCL UI Pack family, which has over 600 members.

TAdvRichEditorHorizontalRuler

The TAdvRichEditorHorizontalRuler is your new go-to component for the markup of your familiar TAdvRichEditor. With the TAdvRichEditorHorizontalRuler, you can set margins on your text document, add an indent for your lines and add different tabs to help you with the layout of the document. The mouse control is implemented in an intuitive way that is similar to some of your other text editor applications.



TAdvBadgeCalendar

With the TAdvBadgeCalendar, we’ve added the power of TAdvBadge to the TPlannerCalendar. You can add badges to different dates in your calendar and give them your own selected color to get a good overview of your agenda. With the OnBadgeItemClick event you can handle whatever you want when one of the badges is selected.



TAdvDurationEdit

If you want an easy and simple way to show a time span, TAdvDurationEdit is now available to help you with this problem. The span can be configured from years to milliseconds and everything in between with the properties DurationFirst and DurationLast. The units TAdvDurationEditUnits are customizable, so you can set them to what is the most convenient for your application. In case you don’t want to have to fill the numbers in yourself, a function is added which takes 2 TDateTime parameters to calculate the difference and set the duration for you.



All of the components are supported from Delphi XE7 onwards.

New Features


TAdvDualListBox

Our customers had a feature request to add the possibility to change the order of the items in the right listbox. This has now been added with the top, up, down and bottom buttons on the right side of the TAdvDualListBox. To keep the component backwards compatible, you need to set these buttons in the VisibleButtons property.



TAdvTouchKeyBoard

We’ve added some features to the TAdvTouchKeyBoard as well. First of all it is possible now to set your key with a custom text with the KeyString property, which allows you to use images as well. Another thing that has been added is the support for multiple characters for example the use of ‘.com’. There is a nice example of this new behaviour the accompanied demos.



Another thing that has been added is the OnlyShowStateCaption property, which gives you the advantage to only see the exact caption that will be used.

TAdvEdit

Via our website another request from our customers was to add Hex value support in in TAdvEdit. So from this version the HexValue property is added in TAdvEdit and TAdvEditBtn. Where you enter a decimal number and the component calculates the Hex value. With the HexDigits property you can configure the number of digits that are shown for the value and to make it a little more aesthetic, you can set the prefix to ‘0x’.

Theme and color properties

A couple of components have some new properties with regards to the look.

- A Color property has been added to the TInspectorItem in TInspectorBar, to make it possible to set the color of each item separately.

- StyleElements property is added to the TAdvSmoothTrackBar for VCL Styles usage.

- VCL Styles support in TAdvMetroCatergoryList.

- ButtonTransparent property added in TPlannerDatePicker, TPlannerMaskDatePicker and TAdvMaskEditBtn.

- And a Transparant property is now available on TAdvOfficeRadioButton and TAdvOfficeCheckbox as well.

- Just as with the TAdvComboBox, it is now possible to set the BorderColor of TAdvDBLookupComboBox.

Other New Features

- Support for using ZIP files for distributing application updates with TWebUpdate.
- TAdvListEditor WantTab property to shift through the items with the TAB key.
- EditAlign and EditType properties added in TAdvMultiButtonEdit.
- Method HideHoverButtons added in TAdvStringGrid.
- Method HasHTMLForm(Col,Row) added in TAdvStringGrid.
- Property grid.MouseActions.AllSelectAllFixedColumns: boolean added in TAdvStringGrid.
- TAdvGridCSVPager.ColumnHeader property added.
- TCurvyPanel.BorderWidth property added.
- Overload of Save() function in TAdvRichEditorHTMLIO to specify encoding.
- Grid OnIsFixedHoverCell event added in TAdvStringGrid.
- THTMLRadioGroup, THTMLCheckGroup inherited all TAdvGroupBox features.
- Property DisabledShadow added to THTMLRadioGroup, THTMLCheckGroup.
- Public property DragCaret added in TAdvMemo.
- TAdvInputTaskDialog demo added.

And with that some fixes and improvements which can be found in the version history.

TMS XData in a COVID-19 app: comments from the developer

$
0
0


Photo by National Cancer Institute on Unsplash

Stephen Ball has recently posted about a new app released by the Military Institute of Medicine that is helping fight the spread of the global SARS-CoV-2 pandemic.

Stephen's blog post describes with more details what the application is about, so here I will mention how TMS XData - our framework to build multitier REST/JSON applications - helped the team to accomplish it.

The project is headed by Piotr Murawski (Ph.D, Head of ICT, Military Institute of Medicine, Warsaw, Poland) who shared with me some more interesting information in the (kind of) format of an interview. Thus I'm providing the content more or less how I asked him. I hope you enjoy it!

Q: Do you have interesting screenshots of the software?
A: I attached them, two from mobile application (Android), one form Epidemilogist’s panel and one from a Windows Services.



Q: Do you have any idea of how many users are using the software?
A: Until today the software has been used by 1515 users from hospital and others institution. These users send 18031 results of Medical Self-monitoring Card. Each card have 8 questions and four are connected with COVID-19.



Q: Do you have any idea of the number of requests per day (or hour, or minute)?
A: As You can expect there is not a statistical even distribution. In reality it is connected with the hours when people start or finish they job.



This is a long term distribution (until today), where the first registration was 15.03.2020. As You can see a the beginning was “test time” and the peaks are as Monday to Friday, which is understandable.

Q: Is the remote (cloud) communication only done with XData, or are there other frameworks/communication involved?
A: The remote connection is done only with XData for REST Services.

Q: Is the XData server a single one, or load balanced?
A: At the moment we use single instance of XData server but probably we will use load balancer for it in the future – an increase in the number of users is planned. As you can guess infrastructure and software architecture was designed to get as short answer time as possible. This is why some task has been done by the SQL Server procedures or triggers to.

Piotr kindly provided additional information:

" The infrastructure modules have a roles:

  • Covid Analytics Service: The analyse answers individually for every persons and qualified the answers to the group: white, yellow, red, dark red for an intervention;
  • Covid Core Service: authorization, result sending, user registration;
  • Covid Database Service: Database (TMS RemoteDB and TMS Aurelius – two versions) for an application for Epidemiologist to be possible analyze a data not only in a Institute but at home or other place too;
  • Covid External Service: Connection to the medical laboratory. If they get a positive result the lab can automatically create a record for a monitoring.
  • Covid Messaging Service: SMS reminder, for every person it is possible to set a different time between card what is expected. This service check this delay and if is greater than expected send a SMS by use of Microsoft Exchange and VoIP/SMS gateway. The messages are send from Moday to Friday from 7am to 9 pm every 2 hours, so it is motivated to send a card.



  • Application’s works on:

    • For patients and other persons: Windows, Android (8.0 and higer), Mac OS, iOS. Because I still have a problem to put them to the Apple Store and Google Play there ae available from the Institute’s cloud;
    • For Epidemilogy Department: Windows;
    • Infrastructure: webservices and some servers for test and service debugging.

    If we will think about productivity there was impossible to do without TMS Software. As you can see in the table the system cost 129 hours one man programming with help of UI Specialist and Medical doctor. "


    I cannot thank Piotr enough, first for creating such a nice application that is helping in all this crazy times we're living, but also in providing such detailed information about his software, and ending with such nice compliments.

    It makes us proud to what have done so far and give us confidence and energy to keep moving on and helping people all around the world to be productive and accomplish their missions!

    TMS WEB Core for Visual Studio Code beta is ready for TMS ALL-ACCESS users

    $
    0
    0

     
    With this new step and announcement, we're excited to have reached a new milestone in the vision of TMS WEB Core.

    On July 26, 2018, we released the first version of TMS WEB Core for the Delphi IDE, hereby offering a RADically new way for creating web applications directly from the Delphi IDE. RADically different because TMS WEB Core offers RAD component based rich web client application development thanks to the technology of compiling the Object Pascal code to JavaScript with the pas2js compiler. A next step was to also enable using TMS WEB Core from the Lazarus IDE with a first version introduced in October 2018. At the same time, TMS WEB Core was extended with support for creating PWA's, that is progressive web applications, meaning web applications that can be installed on mobile devices or Chrome desktop browsers, run offline and access several parts of the device hardware. In a later step, February 2019, we announced support for creating cross-platform desktop applications via the Electron framework. On November 15, 2019 we unveiled that TMS WEB Core was also coming to Visual Studio Code. And now, today, after a huge amount of intensive work, we feel confident to give our baby in the hands of TMS ALL-ACCESS users. It took more time than expected to reach this level as the challenges turned out to be quite complex. Challenges we couldn't have coped with without having the absolute best engineers on board. In the first place, José Leon Serna, architect of the IDE integration into Visual Studio Code, Roman Kassebaum overlooking and ensuring the Visual Studio Code integration works on 3 operating systems and remains compatible with Delphi's project management, the pas2js compiler team assisting with debugging integration, the framework team itself taking up the huge task for making the UI controls all design-time editable.

    Let's go back to the WHY of taking up this huge & challenging task. Before embarking on this project, José Leon Serna, former Embarcadero IDE architect and head of the engineering team in Spain, and myself mutually shared the vision that Visual Studio Code offered a couple of unique technical features that could potentially make it an ideal candidate for using it for TMS WEB Core web client development. Visual Studio Code is based on web technology. Visual Studio Code is an Electron application and internally, everything is rendered via web views. This makes it ideal to offer design-time live rendering of the forms designed by TMS WEB Core. This is the primary driver. But there are nice additional benefits coming with Visual Studio Code. So, in a nutshell, key decision factors for our endeavour were:

    • Based on web technology, offers a live web rendered designer form
    • Is cross-platform, Visual Studio Code can be used on Windows, macOS, Linux
    • Designed to be extended via plugins with seamless plugin 'marketplace' distribution
    • A powerful established Pascal code editing plugin OmniPascal is already available
    • It is a high-DPI compliant IDE
    • Features built-in mechanisms for debugging of applications running in a browser
    • It features side-by-side editing, multi-view code editor windows that can be freely arranged
    • It has a very low barrier of entry, as Visual Studio Code itself is free and open source



    Just like our support for Lazarus adds a freedom of choice, the capability to use Visual Studio Code now is an extra freedom of choice. Of course, this won't stop nor influence our plans for TMS WEB Core for Delphi. Version 1.4 of TMS WEB Core for Delphi is around the corner. All the work we did on the framework to make it behave nicely live in the Visual Studio Code designer benefits the quality of the framework itself, so also users with the Delphi IDE. And of course, Delphi remains the powerhouse for building fast native backend solutions for Windows or Linux servers with solutions such as TMS XData, Embarcadero RAD Server or other commercial & open-source initiatives for creating server software. We actually hope in fact that it helps bringing Object Pascal in the spotlights of Visual Studio Code users and makes developers curious for exploring and using RAD Studio as well.

    So, we hope for a fruitful beta period with our baby in the hands of TMS ALL-ACCESS users. We will meanwhile work extremely hard to polish the product so we can reach the release stage within a couple of months. Regardless, we always keep the words from David I (@davidi99) in mind, we'll release it "when it's ready!"

    TMS Business is good to go with Delphi 10.4 Sydney

    Viewing all 1006 articles
    Browse latest View live


    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>