Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey, Delphi Android, Delphi IOS

Top Tips And Tricks To Speed Up Development With Delphi 10.4 FireMonkey On Android and IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi 104 Sydney FireMonkey Tips | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSREST Debugger Tool

The REST Debugger is a UI based app that ships with Delphi 10.4 and allows you to easily craft REST requests. You can enter various login information and parameters and then see the results parsed into a grid based on the returned JSON. The JSON can even been flattened (using the Nested setting) so that all of JSON fields are available in the grid columns. This is great but now is where the magic happens. You can click Copy Components in the REST Debugger and then directly paste them onto your form or datamodule in Delphi 10.4 Sydney (this also works with C++Builder). It will automatically create all of the TRESTRequest components plus pipe it directly into a TFDMemTable where you can utilize the data at both design time (in the IDE) and runtime after a simple TRESTRequest.Execute call.

http://docwiki.embarcadero.com/RADStudio/en/REST_Debugger_Tool

MonkeyBuilder

If you are using Delphi or C++Builder to publish to the apps stores (verses ad hoc enterprise deployment) MonkeyBuilder can be a huge time saving utility. It offers “Single-click build/deployment of iOS and Android apps”, “Generates Android *.aab 32bit/64bit app bundles”,
“Automatically uploads *.ipa files to AppStoreConnect”, “Generate all required icons from a single 1024×1024 *.png file with the Icon Generator feature”, and a bunch of other features to streamline the app deployment process. If you’ve ever wasted time getting your apps into the App Stores take a look.

https://www.monkeybuilder.io/

TFDMemTable Design Time Edit DataSet

Delphi 10.4 has a feature with TFDMemTable where you can edit the data inside a TFDMemTable at design time. This feature can really speed up development because you can edit and bake data directly into a TFDMemTable during development. It also allows you to easily investigate the contents of a TFDMemTable at design time if you are using some of the other design time features like Executing a TRESTRequest at design time. Additionally, you can use the feature to create data at design time and LiveBind it to controls. One example of this is using TFDMemTable to hold the state of buttons (Visible True and False) across tabs. Instead of writing a bunch of state change code to toggle button visibility (especially on Android and IOS devices) you just set up the states at design time with the Edit DataSet feature and you’re done.

https://flixengineering.com/archives/398

Alcinoe Component Library For Delphi

If you’re looking to do video with Delphi FireMonkey it can be overwhelming because of all of the different formats (across devices) and building a high quality video player is not for the faint of heart. The Alcinoe component library is an open source library that has already done a lot of the hard work for you to make video work great in FireMonkey on Android and IOS. On top of the video player functionality it also offers “WebRTC delphi wrapper, native ios/android TEdit, improved firemonkey controls, Firebase cloud messaging, Android/ios facebook sdk login, Json/Bson Parser, ImageMagick wrapper, MongoDb client, and much more”. It appears to be somewhat widely used as it has a high GitHub Stars count as well.

https://github.com/Zeus64/alcinoe

100 Cross Platform Samples For FireMonkey

There are over 100 cross platform samples available in one of our GitHub repos. It features a lot of simple apps but also some more complex tricks like saving a TFDMemTable to SQLite, encrypting an SQLite database, a drawing app, an emoji navigator app, a mail app, a music player, an instagram style feed interface, an RSS newsreader, a notes app, persistent TFDMemTable sample, a connectivity tester, DNS lookup, ping sample, and many many more. There are a lot of tricks used in the samples utilizing LiveBindings (like the button visibility state trick) and even control drawing buffering with TScene. The first 50 samples are also available in C++.

https://github.com/FMXExpress/Cross-Platform-Samples

https://github.com/FMXExpress/CPP-Cross-Platform-Samples

TFrameStand / TFormStand

TFrameStand and TFormStand are an easy way to break up your app into “screens” (frames and forms). The T*Stand components provide nice transitions between the screens and make it easy to wire up the screens to navigation via code. TTabControl can also be used to do something similar but visually. For large projects with a lot of frames TFrameStand and TFormStand can be a lifesaver. It keeps the memory usage of your app down by not having all of the interface controls active at the same time. I don’t directly use TFrameStand but I did use the principles behind it using the TTabControl way to easily handle over 30 screens in an enterprise app for IOS. It helped to keep IOS from closing the app due to low memory on some of the original Ipad devices.

https://github.com/andrea-magni/TFrameStand

Boyer-Moore String Search

If you are looking to get some extra speed while searching through strings using native Object Pascal code there are some Boyer-Moore implementations that can help out. Apparently, it depends on your use case whether you get extra speed out of this algorithm or not but in the one case I tested I saw a speed increase of over 10%. Ten percent may not sound like a lot until you start talking about tasks that take a long time (like an hour). I’d rather wait 54 minutes than 60 minutes for a task to complete.

Object Pascal Boyer-Moore Version On StackOverFlow

Alternate Object Pascal Boyer-Moore Version On Delphi Dabbler

For Old Versions Of Delphi There Is The Original FastStrings Library

Delphi Javascript Bridge For TWebBrowser

If you’re looking to build apps in a similar fashion to how Electron apps are put together there is an open source library called ScriptGate which can really help out there. Basically you can use the native WebView control of the device (instead of Electron’s Chromium) and have Javascript call out to Delphi for access to the file system, notifications, and high performance code. ScriptGate makes it easy to build and ship such and app with Delphi. Electron apps are known for their high inefficient memory usage and Delphi provides a solution to that through ScriptGate. Delphi FireMonkey can compile to Windows, macOS, and Linux just like Electron. Additionally, Delphi also supports Android and IOS. You can leverage the power of the Delphi RTL from within your Electron like apps.

https://bitbucket.org/freeonterminate/scriptgate/src/master/

Exit mobile version