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

TMS WEB Core: Webanwendungen mit Delphi entwickeln

$
0
0

Lernen Sie in diesem 350-seitigen Buch die zahlreichen Möglichkeiten der Softwareentwicklung mit TMS WEB Core kennen.





Seit mehr als zwei Jahrzehnten ist Delphi bekannt für die schnelle Programmierung von Windows-Anwendungen. Insbesondere die einfache Erstellung von Desktop-Datenbankanwendungen und die unkomplizierte Bereitstellung der Anwendungen auf Kundensystemen machten Delphi gegenüber anderen Programmiersprachen populär. Seit einigen Jahren kann Software für die Zielplattformen Linux, MacOS sowie die mobilen Betriebssysteme iOS und Android erstellt werden. Mit TMS WEB Core können seit Anfang 2018 moderne Webanwendungen mit Delphi programmiert werden, die vollständig im Webbrowser ausgeführt werden, da die programmierten Anwendungen in JavaScript übersetzt werden.

  • 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
Die Inhalte sind sowohl für Einsteiger als auch für fortgeschrittene Entwickler geeignet, die sich für die Erstellung von Webanwendungen mit TMS WEB Core interessieren.

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.

Eine englischsprachige Version ist in Arbeit und wird in den nächsten Wochen erscheinen. Die deutsche Sprachfassung ist weltweit auf allen Amazon-Shops verfügbar.

USA: https://www.amazon.com/dp/1090700822/
DE: https://www.amazon.de/dp/1090700822/





Holger Flick



Dr. Holger Flick studierte Informatik an der Universität Dortmund und promovierte an der Fakultät Maschinenbau der Ruhr-Universität Bochum.

Bereits seit 1996 programmiert er mit Delphi und war immerzu in der Community aktiv. Während und nach dem Studium arbeitete er als Freiberufler an zahlreichen Projekten für Borland und konnte sich so mit vielen Delphi Experten aus dem Scotts Valley in Kalifornien direkt austauschen. Hauptsächlich testete er Delphi für die QA Abteilung, programmierte aber auch Datenbankanwendungen und Webanwendungen für das Borland Developer Network. Auch auf Konferenzen und Seminaren hat Holger zu den verschiedensten Delphi Themen vorgetragen. Sein Engagement und seine umfassenden Kenntnisse im Bereich der Delphi Programmierung, erlangt durch seine jahrelange theoretische und praktische Arbeit im Themenbereich der objektorientierten Programmierung mit Delphi und anderen Programmiersprachen (z.B. C#, Objective-C), führte zu seiner Ernennung zum Embarcadero Delphi MVP im Jahr 2016. Von 2013 bis 2018 war Dr. Holger Flick bei der Korfmann Lufttechnik GmbH in Witten für die gesamte Software- und Hardwarearchitektur der Firma verantwortlich und entwickelte unter anderem unternehmensspezifische Softwarelösungen mit Delphi. Seit 2017 präsentiert er Produkte und Lösungen von TMS Software als Chief Evangelist in Form von zahlreichen technischen Artikeln, zweisprachigen Video Tutorials und führt durch Seminare.

Im Jahr 2019 gründete er FlixEngineering LLC und machte die Vereinigten Staaten von Amerika zu seinem neuen zu Hause.


qq => qa

$
0
0

Most will wonder what kind of programmatic expression or what kind of mathematical formula makes up the title of this blog.
In this blog, for once I don't want write about programming nor maths, although the expression makes a lot of sense in the daily world of software development, more in particular in the support work that comes with software development.

Honor who honor deserves, I didn't invent this expression, but I learned this expression from business coach and mentor Carl van de Velde. The Carl van de Velde training institute is probably the most influential training institute for business managers and entrepreneurs in Belgium and I had the luck to attend a series of seminars and training sessions in the past couple of years.



What Carl van de Velde frequently offers during his training seminars, is the opportunity for attendees to ask questions of any kind related to business. Carl van de Velde isn't shying away from any question but before giving the opportunity, the room is given one big advice: The quality of the answer is in direct relationship to the quality of the question. In short, we come to the title of this blog:

"A quality question leads to a quality answer."

So, why are we bringing up this topic on a blog of a software development company? Well, one of the pillars of what we want to offer as a company is first-class technical support for our products. Our engineers strive to give you the best possible answer, solution, tip as fast as possible. In a nutshell, a quality answer.

And I think that by now you realize how important YOU are in that equation. Yes, there is a direct relationship between the quality of the question and the quality of the answer. If one goes to a doctor and tells the doctor: "Can you help me because I do not feel good?", it's clear that 99.99% of doctors (and that 0.01% are very questionable doctors) won't prescribe right-away medicine X or Y to help you. The quality of the question is so poor that the doctor will come up with a series of questions so he can detect what is wrong and do the right thing to help the patient. Imagine this same patient coming to the doctor and telling: "Doctor, yesterday I played football and another player kicked my right foot ankle and every since, it is swollen and hurts a lot when wanting to lift it. The effectiveness of the doctor diagnosing the problem and proposing a solution will be way higher.

The same in software. The scene with the doctor translates in the software world to the question in the first scenario "Engineer, the software doesn't work, please fix the problem". In the second scenario, we get: "Engineer, when I open the file attached on a system with Windows 10 64bit OS with your software version 5.67.012 and then click button X and select item Y, I get the message 'Error 103: item ABC cannot be selected'". In what scenario will the user get the most effective & efficient help?

Given that we don't want anything more than giving your quality answers, what can you do to come with quality questions?

  • Provide exact information about the operating system you use: OS version, 32bit or 64bit...
  • Provide exact information about the IDE you use, that is the Delphi version number including the updates/patches applied.
  • Provide exact information about the version of the software you use.
  • Provide exact information about your display(s). Is your question related to using the software on a normal or high DPI screen. Do you use the software via RDP, on a virtual machine, on a multi-monitor machine... Include such information if this can be relevant to the question.
  • If the question relates to an error message, provide the error message in full detail. Even better, using a stack tracing tool like Eurekalog or madExcept and provide stack trace information.
  • If the question is in relationship with web development, inspect the browser console for possible error message and save the console log and include it with the problem report.
  • Preferably test with the latest version of the software to avoid cases where you report problems that have been solved or request features that have already been implemented.
  • Perform a test on just the functionality concerned in a component in a new project as validation that the issue is not in code unrelated to our components.
  • By far the most efficient is to isolate the problem and provide a sample source project + step by step information how an issue can be reproduced.
We're sure you have other excellent ideas to increase the quality of the question. Share these below in a comment. It will help us tremendously to improve the quality of the answer for you!


Eating our own TMS WEB Core food

$
0
0

While we have used TMS WEB Core already for several internal projects, earlier this year we decided to embark on a first public TMS WEB Core project.
"Eating our own dog food" was one of the main objectives but an even more important reason was bringing the concept of our TMS Subscription Manager to the computing universe.

That is, TMS Subscription Manager is a strict Windows only desktop application while the TMS WEB Core based variant can be used from Windows, macOS, Linux, iOS, Android, in fact any computing device that has a HTML5 enabled browser, so also your SmartTV or Tesla car.

Purpose of our first public TMS WEB Core application

The new application is called TMS Subscription Dashboard. It is not a 100% replacement for TMS Subscription Manager as it can of course not launch Windows based executable installers automatically (talking about a huge security breach that would be) on every platform. But TMS Subscription Dashboard offers our customers having purchased a subscription to any of our subscription bundles information about the latest releases, the latest features, improvements & fixes added. It shows of course the status of the subscription, shows when it expires and offers a possibility to renew an expired subscription. Finally, it offers access to product manuals, product forums for support and a direct path to our social media channels.





Let's get technical

Being software developers, I'm sure you will be interested about a number of technical tidbits about the new TMS Subscription Dashboard. To begin with, TMS Subscription Dashboard is a progressive web application.

PWA

A "progressive web application" (PWA) is a term coined for web applications that respect a number of requirements:

  • They are responsive: i.e. these web applications adapt the rendering to work optimally on a wide range of screen form factors
  • They can start offline: i.e. also with no internet connection available, the application can at least start
  • They are safe: the web application is hosted on a HTTPS enabled server and only routed from HTTPS
  • They can be installed on a desktop / home screen: the application offers a title, icon, description and can be added on a desktop or home screen for future launching without needing a browser
  • They are app-like: When launched directly, the user cannot visually see it concerns a web application, it looks & behaves as a native application


TMS WEB Core offers the creation of a progressive web application out of the box. It is an application type. When you select to create a new "TMS WEB Core PWA", a new project template is created that satisfies all technical requirements to be a progressive web application. For the TMS Subscription Dashboard, this means we didn't have to do any specific effort in this area except specifying an application icon, title and description.

Login

Another very nice freebie we get being a PWA is that the browser / operating system can (optionally) take care of the credentials management. Of course, the TMS Subscription Manager requires you to login to get access to the information concerning your subscription. Login is performed through your registration email and your registration code. As under the hood this concerns a web application, the browser will offer to persist the credentials entered and offer to automatically complete these for future login. It gets especially nice on a smartphone device for example, where the browser stored credentials are coupled to your biometric data. Use your touch ID (finger scan) or face ID and your previously entered credentials will be used to login. No need to remember your login information anymore. To get this functionality from a TMS WEB Core web application, all we need to do is put a TWebEdit control for username & for password in a TWebHTMLForm. The TWebHTMLForm signals the browser it concerns login information. No extra code is needed here. It takes literally not much more than putting the right controls together. Yes, RAD in its purest form as we have always loved from Delphi.

Scrolling list

Displaying the products in a subscription bundle is done via a new control: TWebContinuousScroll. This control offers a list of items that can optionally load dynamically as the user scrolls. Think about wading through your endless feeds from Twitter, Facebook, Instagram, ... where new feed entries are loaded as one scrolls down. The same with TWebContinuousScroll. It can fetch information during scroll and it offers full customization (via a HTML template) of the information displayed in items. Here it is used to show per product a description, version number, release date, link to manual + tips & faq + download. Of course, TWebContinuousScroll is also mobile friendly, meaning that it offers smooth touch based scroll. If you are curious about this new control coming to TMS WEB Core v1.4, you can explore an infinite list here. Don't forgot to try it also from a smartphone and its touch scroll.

Responsive

It is a requirement that the web application is responsive for being recognized as a progressive web application. The core responsive behavior for TMS Subscription Dashboard is achieved by 2 controls: TWebMainMenu and TWebResponsiveGridPanel. For TWebMainMenu, via which the various parts of the application are opened, there is as a developer actually nothing in particular to do. It is as RAD as it can be. Drop a TWebMainMenu on the form and add your menu items and in a desktop browser, it looks & behaves as a Windows menu. When used on mobile device, it automatically converts into a hamburger menu. Then the TWebResponsiveGridPanel is used to make the application convert from a 2 column layout on desktop to a single column layout on smartphones. On desktop browsers, there is a left column that has the main menu items and a client aligned pane in the right column that displays the information. On a smartphone, the TWebResponsiveGridPanel transforms this into a single column layout with the hamburger menu on top to select the view in the single column layout. While the responsive behavior of the TWebResponsiveGridPanel is fully configurable, it already has standard settings to differentiate between smartphone, table and desktop browsers. Also here, maximum RAD.

Get started

When you purchased any of the following subscription bundles: you can use your credentials and login.

To let even more customers explore the results of the capabilities of TMS WEB Core, we have also opened this for customers having purchased TMS VCL UI Pack or TMS WEB Core!

What's next?

We have a lot of exciting ideas for future version of TMS Subscription Dashboard. This could include the integration of the push notifications that are supported by TMS WEB Core. Another idea is to host the TMS Subscription Dashboard in a native application with our new Edge Chromium based browser and add the necessary bridging to give it access to registry and local files for the version management of download products and launching install & uninstall. On a whole other level there is the idea to open-source and fully document the architecture and code of this application so you can learn about every little detail and apply what you learned for your applications. But what is actually most exciting is to hear about YOUR ideas, wishes, desires. We look forward to interesting discussions!

Oh and by the way ...

While we created the whole TMS Subscription Dashboard in our beloved Delphi 10.3 Rio IDE with TMS WEB Core, we also have our ongoing development to bring TMS WEB Core for Visual Studio Code. So, we were interested to see if we would be able to open this project in Visual Studio Code with an internal TMS WEB Core version and work on the project from there. As you can see, it can open & succesfully compile the project. A huge difference in the Visual Studio Code environment is that the form designer is based on a real webbrowser view, so the form designer still has some glitches that need to be worked on to make the form designing a smooth experience. So, also here, eating our own TMS WEB Core food will be an interesting experience.



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!

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!

    Viewing all 1008 articles
    Browse latest View live


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