westereng 1 Posted yesterday at 06:59 AM Hello! I am just about to start up a quite big project that needs, ios and android apps, in addition to desktop and web apps. I have experience in Delphi for desktop and web, but not for mobile. I am also looking at .Net MAUI to see if that fits my needs. The most important thing for me is that I want to develop all this in one tool/language. So before I embark on the road to learning how to do mobile stuff with Delphi, I wanted to know your experience with creating mobile applications in Delphi. Regards Ronny Share this post Link to post
Patrick PREMARTIN 69 Posted yesterday at 07:51 AM Hi Using FireMonkey is globally the same than using VCL except it's more graphic and has more features to auto adapt visual components depending on windows sizes and styles. The big advantage to stay in Delphi is to share a part of your code between desktop and mobiles applications. A lot of samples, docs and books are available to learn how to use FMX features. Check this repositories list https://github.com/DeveloppeurPascal/Delphi-samples/blob/main/OtherDelphiSampleRepositories.md or this books : Fearless Cross-Platform Development with Delphi and Expert Delphi (second edition) For the code you only have to learn how to program asynchronously and a few things about Android permissions if you use some APIs. Start by doing a little app like in Delphi Programming Projects 1 Share this post Link to post
Rollo62 536 Posted yesterday at 08:31 AM https://github.com/FMXExpress/Cross-Platform-Samples https://github.com/FMXExpress/CPP-Cross-Platform-Samples https://www.youtube.com/@QuarkCube/videos Share this post Link to post
Der schöne Günther 316 Posted yesterday at 11:06 AM (edited) My experience is from a long time ago (around 2016), so things might have changed completely (hopefully for the better). All in all, it was disastrous. It was supposed to be some kind of dashboard / remote control app for industrial production lines. It had to be presented at an exhibition. There were numerous problems I never really got behind, and which each change, I felt more and more helpless because of extremely limiting debugging and analysis capabilities. Battery consumption was inexplicably high We used the TeeChart Pro library for some graphical displays which was extremely buggy on FireMonkey. Steema acknowledged some of the bugs, but never fixed them or provided workarounds. It was around fall, and Apple released a new iOS version. Debugging capabilities in RAD Studio broke and I was more or less flying blind. I think something like this still happens today. Overall performance was completely random, sometimes it was stuttering extremely badly or just terminated. I suspected memory leaks in FireMonkey or TeeChart Pro, but had no way of tracking that down. I felt that if I had stayed with "native" development options (like Apple XCode), I might have had better chances of getting behind such problems. At that time, it was impossible to re-use much existing Delphi because because of the fundamentally different memory management model. I haven't followed it, but I think this should no longer be a problem: Directions for ARC Memory Management in Delphi All in all, it was considered a failure and we scratched it completely. Edited yesterday at 11:07 AM by Der schöne Günther Share this post Link to post
Rollo62 536 Posted yesterday at 12:16 PM (edited) Yes, it moves between stable-unstable-stable over the years. But I can say also, that this is mainly because of external effects from Apple/Google, while Firemonkey tries its best to keep up. I have often seen original XCode and AndroidStudio developers, struggling with the same problems we saw in Delphi, only that those IDE's were maintained more eagerly. And to keep in mind, mobile development is way different to traditional desktop development, I fell into that trap too. Edited yesterday at 12:18 PM by Rollo62 1 Share this post Link to post
Die Holländer 45 Posted yesterday at 12:28 PM Since you have a web app, consider a common technique used by Web, Android and iOS developers. You could simply embed a TWebBrowser component in your application and direct it to your web app's URL. This approach often goes unnoticed by users and management, providing a seamless experience while effectively integrating your web app into a native interface. Share this post Link to post
Dalija Prasnikar 1396 Posted yesterday at 12:31 PM 52 minutes ago, Der schöne Günther said: My experience is from a long time ago (around 2016), so things might have changed completely (hopefully for the better). Yes, things have changed significantly for the better. However, there are still some pain points (more specifically debugging, especially on iOS as Apple keeps throwing curved balls) Main difference is that ARC was being source of significant performance issues on mobile platforms. I have done extensive investigations at the time, and by doing slight modifications in FMX code I was able to significantly improve performance. Used optimizations were covered in my blog posts: https://dalijap.blogspot.com/2018/01/optimizing-arc-with-unsafe-references.html https://dalijap.blogspot.com/2018/01/optimizing-arc-hard-way.html https://dalijap.blogspot.com/2018/03/optimizing-arc-weakness-of-weak.html Even though there is no ARC compiler, above articles are still valid when dealing with interfaces in Delphi. Removing ARC compiler was not the only performance improvement. Next one was introduction of Skia library in Delphi 12, which gives better performance on mobile platforms. It is not perfect and depending on the project it is not necessarily working better on the desktop FMX applications, but it is easily configurable, so different rendering methods can be used depending on the platform. Another pain point was using 3rd party frameworks on both Android and iOS, and this has also been significantly improved in the meantime. Overall, plenty of bugs have been fixed in the meantime (of course, that does not mean there are no new bugs), but things are way better than they were at the early beginnings. Most importantly people are successfully using Delphi for writing Android and iOS applications. You can find one such example here: Whether Delphi is the best option for some project that is another question and it can really depend on the project. The best option would be putting down all the tech your app needs to interact with and what are basic features you need to support. After you have tall that listed you can make a demo app to see whether you can easily incorporate all that you need across various tools and platforms. Only after doing that you will be able to tell which one will be the best for the project. And at the end, the grass is not greener on the other side. For development Delphi is much more stable platform than some others. It does not have some fancy features language wise, but its UI frameworks are very stable. Over the years, both Google and Apple made significant shifts in their native frameworks that required extensive code refactoring (yes, you can still use the old ways, but it still requires a lot of work to keep up with changes). If you are looking for cross-platform tool, then situation is not too much different. 3 Share this post Link to post
Rollo62 536 Posted 23 hours ago Web app? Then TMS WebCore this is maybe intersting too https://www.youtube.com/watch?v=Az7X6jjDRd0&list=PLp3eFyNKVPpvCFj7lLTZjOoIjeH9pcdDA 1 Share this post Link to post
westereng 1 Posted 16 hours ago (edited) Thank you all for the answers, ans links to resources. 7 hours ago, Dalija Prasnikar said: Whether Delphi is the best option for some project that is another question and it can really depend on the project. The best option would be putting down all the tech your app needs to interact with and what are basic features you need to support. After you have tall that listed you can make a demo app to see whether you can easily incorporate all that you need across various tools and platforms. Only after doing that you will be able to tell which one will be the best for the project. Yes, you are of course right, and I'm doing that as we speak. I have gotten quite fluent in c# in the last years (day job), and that would maybe be the obvious path to take. But in this project I am able to choose whatever stack I want(my own company) and since I have a long lasting love affair with pascal/Delphi in earlier years, I am drawn to get back into that universe 🙂 Having one environment and one source code for most of the project is appealing because I'm the only one doing this project. So I think it will save me time and resource, although Delphi is not cheap. 7 hours ago, Dalija Prasnikar said: You can find one such example here Thanks for that, that looks great, and further solidify the point of using one language for everything. 7 hours ago, Dalija Prasnikar said: And at the end, the grass is not greener on the other side. For development Delphi is much more stable platform than some others. It does not have some fancy features language wise, but its UI frameworks are very stable. Over the years, both Google and Apple made significant shifts in their native frameworks that required extensive code refactoring (yes, you can still use the old ways, but it still requires a lot of work to keep up with changes). If you are looking for cross-platform tool, then situation is not too much different. True, I need stable, and I have Delphi apps written twenty years ago that still works as expected. Not many dev tools can deliver something like that. That is the kind of stable I need, considering this is a one man project. 7 hours ago, Die Holländer said: Since you have a web app, consider a common technique used by Web, Android and iOS developers. You could simply embed a TWebBrowser component in your application and direct it to your web app's URL. This approach often goes unnoticed by users and management, providing a seamless experience while effectively integrating your web app into a native interface. No web app yet, but it is something to consider yes. 6 hours ago, Rollo62 said: Web app? Then TMS WebCore this is maybe intersting too https://www.youtube.com/watch?v=Az7X6jjDRd0&list=PLp3eFyNKVPpvCFj7lLTZjOoIjeH9pcdDA Yes, web app too :O. I have been reading a lot about Webcore lately, and will probably be the tool of choice going forward, expecially with the new visual designer I guess I am not finding any reason to not go forward with using Delphi for this Edited 16 hours ago by westereng .. 1 Share this post Link to post
Dalija Prasnikar 1396 Posted 2 hours ago 13 hours ago, westereng said: True, I need stable, and I have Delphi apps written twenty years ago that still works as expected. Not many dev tools can deliver something like that. That is the kind of stable I need, considering this is a one man project. When it comes to mobile development you cannot count on that kind of stability. Not because of Delphi, but because of platforms. android and iOS get new OS version every year, often with drastic changes in some workflows and features. They also expect that you frequently update your application and make it compatible with new OS versions (old applications still run, but if you don't make an update in two years period applications will not be available to users with new OS versions - this is just example, there are variants of what exactly happens in each particular case). Those OS changes also require changes in Delphi toolset and sometimes additions in code. How drastic depends on the each particular change. This is valid for all mobile development toolsets, and is nothing Delphi specific. But, this also means that you will have to keep current with new Delphi releases and you cannot stick using some old Delphi version for too long after new one gets out. Share this post Link to post
westereng 1 Posted 2 hours ago 2 minutes ago, Dalija Prasnikar said: When it comes to mobile development you cannot count on that kind of stability. Not because of Delphi, but because of platforms. android and iOS get new OS version every year, often with drastic changes in some workflows and features. They also expect that you frequently update your application and make it compatible with new OS versions (old applications still run, but if you don't make an update in two years period applications will not be available to users with new OS versions - this is just example, there are variants of what exactly happens in each particular case). Those OS changes also require changes in Delphi toolset and sometimes additions in code. How drastic depends on the each particular change. This is valid for all mobile development toolsets, and is nothing Delphi specific. But, this also means that you will have to keep current with new Delphi releases and you cannot stick using some old Delphi version for too long after new one gets out. Great point, I did not really think about that. That also means increased costs, since I need to keep my Delphi current at all times 😓 Using the .Net universe will be the more cost friendly option to consider. But the point about keeping on top of new os versions apply there too... Hmm, not as straight forward choice as I thought 🤔 Share this post Link to post
Patrick PREMARTIN 69 Posted 2 hours ago Don't forget the cost of maintaining two or more projects in more than one language, with more than one IDE / OS. Depending on the subject, the cost of Delphi licenses is not so high. Share this post Link to post
sjordi 39 Posted 1 hour ago 1 hour ago, Patrick PREMARTIN said: Don't forget the cost of maintaining two or more projects in more than one language, with more than one IDE / OS. Depending on the subject, the cost of Delphi licenses is not so high. Absolutely, that, to me, is one of the main point to go with Delphi or C++Builder. You have 1 codebase. Sure, you'll have conditional compile/code for specific platform, but still only 1 project. No need for 5 different sources/teams to maintain in parallel (it never works) for Windows, macOS, iOS, Android and Linux. Share this post Link to post