Kastri + Delphi = 🎉

I’ve been developing with Delphi since version 1 and still swear by it. It’s a stable workhorse that keeps delivering, and improves with age.

I read a description of Delphi recently which hit the nail on the head of why it’s still going strong despite more popular languages taking the spotlight.

Delphi applications have exceptional longevity due to Embarcadero’s commitment to backward and forward compatibility, allowing decades-old software to run on modern operating systems with minimal modification.

In fact, Embarcadero wrote a whole blog post on the topic!

This explains why some teams are still using Delphi 7 (released July 2002) to develop and maintain Windows apps that run happily on Windows 11. At time of writing, the latest version is Delphi 12.3 which is 23 years later!

But Delphi is capable of much more than just Windows apps (VCL), it’s a very capable and modern cross platform development environment. With a change of a drop-down you can run the same code in Windows (32 and 64 bit), MacOS (Intel and Silicon), iOS (64 bit devices – anything after iPhone 6s), Android (32 and 64 bit devices) and even Linux. It can also be used to create back-end API and web services, Android services, and front-end web apps. That’s a lot out of one toolset.

There are other cross platform frameworks available (Flutter, React Native, Microsoft’s MUI etc) but Delphi is the only one that’s been consistently evolving since first release in 1995, still supporting the latest OS versions and continuing to modernise the language, framework and tools.

However, it’s a big ask to expect Embarcadero to support the IDE, compilers, core frameworks, device tools and also full support for all third party frameworks and features in Delphi for all platforms. This is where the community is very important and will make or break a developer toolset.

Thankfully, we have a number of committed third party developers supporting Delphi. Some commercial and some free.

The only I rely on the most, is the exceptional and free Kastri, a must-have repository of features, libraries, demos and API conversions from the Delphi evangelist Dave Nottage (Delphi Worlds).

This plugs the gaps in Delphi’s RTL and Firemonkey framework, adding features such as:

  • Firebase Push Messaging (FCM) and Analytics
  • Google AdMob
  • Biometric Authentication (Fingerprint, Face ID, etc)
  • Advanced video player components
  • Universal Links support
  • Text to Speech
  • Native app review prompts
  • And lots more

Along with the “big ticket” features included in Kastri – all of which have great readme documents explaining how to use them – it includes lots of smaller components and classes that take the hard work out of developing cross platform apps.

There are so many great smaller facilities in Kastri that it can be easy to miss them.

To help expose these for the benefit of all Delphi developers, over the next few posts I’ll be highlighting a number of these great classes, along with examples and use-cases to help with your app development.

NOTE: If you find it useful, you can offer to support Dave’s hard work through the Github page.

Here’s a simple one to get you started.

DW.DialogService

This unit contains TDialog class, providing convenient ways to show system message dialogs for General (Information), Warnings, Errors and Confirmation.

uses DW.DialogService;
...
begin
  TDialog.Information('Your data was saved successfully');
  TDialog.Confirm('Did you really want to do this?', False,
      procedure (const btn: TModalResult)
      begin
        if (btn = mrYes) then
          //do something positive
        else
          //handle cancel (no) choice
      end);
end;

I hope this helps. More to come very soon!

Leave a Reply

Your email address will not be published. Required fields are marked *