Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Easily Bridge Your FireMonkey Windows Apps And JavaScript Using ScriptGate

Before knowing how to bridge FireMonkey application and JavaScript using ScriptGate, Let’s understand what is Native App and Hybrid App? What’s the difference between them? How to develop a Hybrid App using Delphi? Is it possible? What’s the challenge? This post will guide you to understand better.

Native Apps : A software application built in a programming language, for the specific platform like iOS, Android ,Windows, macOS and Linux. The pros and cons are,

Hybrid Apps: Hybrid apps are part native apps, part web apps. It can take advantage of some device features available. Like web apps, they rely on HTML being rendered in a browser, with the caveat that the browser is embedded within the app. The pros and cons are,

Check out this post we have on the JavaScript logo.

Hybrid apps with Delphi is that possible? Yes, using the TWebBrowser component and ScriptGate.

Why do we want to use ScriptGate?

It looks like a native application, access to platform-specific features, like get device token, working with push notifications (including background mode), access to BLE and other hardware onboard features, working with permissions, and so on. Possibility to publish the application to app stores like a native app.

What’s the challenge here?
The main challenge – organize communication between your HTML/CSS/JavaScript web application, stored inside the TWebBrowser component, and your Host application code..E.g)

ScriptGate solves the above challenges: ScriptGate is a library that allows you to call back and forth between JavaScript and Delphi code on TWebBrowser across Android, iOS, macOS, and Windows.

Watch the Video Demonstration on how to bridge the FMX and JavaScript using ScriptGate mentioned below.

Check out the other ways to Bridge Your Delphi Application and Javascript here.

You can download the ScriptGate library for Delphi over on BitBucket.

Exit mobile version