TMS Software | Newsletter

NEWSLETTER April 23, 2020


In this newsletter ...

TMS FNC Maps v1.0


TMS FNC Maps: Hold the full power of mapping in your hand!

TMS FNC Maps v1.0 has been released!

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

List of services for mapping, directions and geocoding

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

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.






Importing web components into TMS WEB Core



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!

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!





Chrome update


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

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




As always, we thank all users for the numerous inputs, feedback, comments and suggestions. This is an invaluable help to steer our developments here at TMS software.

Kind regards,
TMS software team
Email: info@tmssoftware.com
Web: http://www.tmssoftware.com
Support, FAQ & Manuals: http://www.tmssoftware.com/support.asp


Follow latest developments at tmssoftware.com


NOTICE: If you wish to unsubscribe from the TMS software Newsletter, please click here.