Coming in TMS WEB Core v1.7: Miletus

TMS Software Delphi  Components
When it comes to bringing web applications to a desktop enviroment the choice falls on Electron as it’s the most popular framework among web developers. We offer support for Electron applications already, but the downside is always there: it’s a 3rd party solution that we have no control over.
At the end of the last year we asked ourselves if we can provide an alternative that fits us better. A few months later here we are about to release a beta version of TMS WEB Core v1.7 with Miletus!

What is Miletus exactly?

Named after Thales of Miletus, Miletus is a framework that enables TMS WEB Applications to run as desktop applications and it also provides access for native features. In a nutshell, you can fully reuse code created for a web application, take advantage of HTML/CSS for creating a modern & spectacular responsive user interface, access local files & local databases or closely integrate with operating system capabilities and still easily deploy the application as standalone executable.

Our colleague Holger Flick explains it in more detail how one could create such Miletus application with TMS WEB Core:

Let’s take a look at the available classes, functions and components that will enable you to interact with native operating system functionalities!

Classes and functions

  • TMiletusStringList: Read and write local text files.
  • TMiletusBinaryDataStream: Similarly to TMiletusStringList this enables you to write and read local binary files. It also provides multiple formats to access the data.
  • TMiletusClipboard: Read from and write to the OS clipboard.
  • TMiletusShell: Exposes some shell functionalities: open a file with its default application, open an external URL with the default browser, move files to the trash and show files in the containing folder.
  • GetCursorPos: Returns the position of the cursor.
  • GetMiletusPath: Returns the common paths.
  • StartFileDrag: Start dragging a file from your application to any destination where the file is accepted.

Components

  • TMiletusOpenDialog: Displays a native open dialog and returns the selected path(s).
  • TMiletusSaveDialog: Similarly to TMiletusOpenDialog, it displays a native save dialog and returns the selected path.
  • TMiletusMessageBox: Shows a native message dialog. The labels, the dialog type, the buttons and the verification checkbox are all customizable.
  • TMiletusErrorBox: Shows a native error message dialog.
  • TMiletusMainMenu: Creates and appends a native main menu to the form where it’s dropped.
  • TMiletusPopupMenu: Creates and displays a native popup menu 
  • TMiletusNotificationCenter: Allows you to show notifications on the operating system. 
  • TMiletusWindow: Allows the creation of multiple application windows which can be linked to forms or other sources.
  • TMiletusTrayIcon: Creates a tray icon on the OS tray. An optional popup menu can be assigned to it.
  • TMiletusFileWatcher: Monitors a list of files for changes. Each file has its own event handler which will be triggered when the file has changed.
  • TMiletusGlobalShortcuts: Add a list of keyboards shortcuts that will be recognized even when the application is not in focus. 

What about database support?

We also added support for local databases! The component TMiletusClientDataSet makes it easy for a Miletus application to create and use local databases by a familiar syntax of using TClientDataSet. It also allows a seamless integration of multiple types of databases with data-aware components like TWebDBGrid, TWebDBTableControl, TWebDBEdit etc… All the database operations can be done in the standard Delphi way through the TMiletusClientDataSet component. 

We prepared 5 database drivers to be used with TMiletusClientDataSet:

  • TMiletusAccessDBDriver for MS Access databases
  • TMiletusMySQLDBDriver for MySQL databases
  • TMiletusSQLiteDBDriver for SQLite databases
  • TMiletusPostgreSQLDBDriver for PostreSQL databases
  • TMiletusMSSQLDBDriver for MS SQL databases

Future plans

While the beta version of TMS WEB Core v1.7 is about to be released with built-in Miletus support for creating Win32 or Win64 applications, we are already working hard on bringing Miletus to both macOS and Linux as a cross platform alternative in TMS WEB Core v1.8! April Fool’s Day has already passed but if you still have any doubts here’s a sneak peek of our TodoList demo running on macOS! It is the exact same project as the Miletus TodoList demo for Windows but packaged as macOS application.

TMS Software Delphi  Components

As we have full control now with this technology to expose operating system features to the Miletus app and to define how such application integrates with the operating system on Windows, macOS and Linux, we will continue to extend OS integration support. We are eager to learn for what type of applications and for what functionality you would wish to use this technology!