In part one of this blog, I discussed the benefits of using one codebase and why multi-platform development is attractive to developers and management. In part two of this blog I will detail what I learned through the process of redeveloping an app with Delphi XE5.
Getting Started with Multiplatform Development
Delphi XE5 is based on the Object Pascal language and has had a huge following for years. Embarcadero’s RAD Studio XE5 includes Delphi and/or C++ versions of their software and most recent version was released in August 2013. Delphi XE5 allows developers to develop apps in Object Pascal in the Delphi IDE and deploy them to Win32, Win64, iOS devices, Android Devices and the Mac, all from one codebase. Embarcadero accomplishes this using their FireMonkey library. For Android, it is more seamlessly integrated into the completed app, as a FireMonkey library is deployed with the app. In either case, this additional layer adds bulk to the app on the Android side and decidedly adds performance issues as the translations are made for components through the library. There is a great deal of setup and overhead required to do multi-platform development. Since Delphi XE5, like most of these tools, relies on the platform SDKs and JDKs, you must have those installed. For Android, Delphi XE5 will install those for you on your Windows platform during the regular installation. They can also be adjusted after installation for updates and things with settings in the interface. For iOS, you must have a Mac setup with XCode and be ready for development with your certificates setup and installed from Apple. They do have a “Mac in the cloud” that you can sign up for and the setup is straightforward and integrated into the Delphi XE5 interface as well. Initial month of usage was free when I tried this out, early on. Then you can sign up for a small or large subscription service. After we purchased a real Enterprise edition of the Delphi XE5 RAD studio, I moved to using my own Mac. On the Mac you need to install a platform assistant tool that aids in deployment for iOS and Mac OS. Each time you get a Delphi update or XCode updates it requires updating and/or adjusting this platform assistant. There are a million moving parts in this process if you are creating in one environment to deploy to Android, iOS, Win 32/64, and Mac OS. Your SDKs and/or JDKs have to be in place and listed properly in your settings for each environment. Platform assistant must be installed and configured properly so you can communicate with it from your development machine. Embarcadero put out numerous updates during my review process and each one meant, in most cases, reinstalling and reconfiguring each of these components. There were issues along the way, but I was able to work through them. There is a huge community of Delphi developers old and new that are very responsive to questions online. Embarcadero also has their own support forums and are very helpful on those as well. As a review of Delphi XE5 we selected an app created internally for the Android and iOS platforms using native development of each. I redeveloped it using Delphi XE5. It was not an exact replica, but took advantage of some of the features in Delphi XE5 to do cross-platform development like overall design skinning. In our simple example, there were numerous things evident from the start. The apps start up much slower and this was the most pronounced on the Android platform. Also the size of the app on the android side was 39 MB, which is about four times the size of the app developed natively. The iOS app was only slightly larger, but suffered from latency issues, while switching between screens. Overall, I enjoyed getting back into Delphi and learned so much. I refreshed and enhanced my Object Pascal knowledge-things I used to do on a daily basis when using Delphi 6-7 years ago. Luckily much of that knowledge transferred seamlessly to the app development. Development in Delphi XE5 was as RAD as always because you can get things up and going very quickly. Being able to deploy to Win 32/64 environment lets you test your apps very quickly without having to deploy to a simulator or iOS device. That speeds up development time exponentially. WYSIWYG visual design of the interface allows for ease of development and experimentation and interface issues are spotted quickly.
Issues with Delphi XE5
There are a number of bugs in Delphi XE5 and many are addressed in the continual updates from Embarcadero. However, there continues to be glitches and anomalies in the IDE that can take hours to figure out even with help from friends online. Still, even with that, I thoroughly enjoyed the development process and environment in Delphi XE5. There is a lot to be said about leveraging your skills in an environment that you enjoy. I just wish the app redevelopment had been more favorable for Delphi XE5. I believe certain apps may be better suited to this kind of multi-platform development than others. The bottom line is when looking at other tools for doing mobile development, and especially cross-platform development, identify what is most important for your app. In some cases, like games or other apps that are heavy with pictures or video, the size of the app may not be an issue. Your app is going to be huge anyway and the addition of a translation library like FireMonkey in RAD Studio XE5 would not be a big consequence. However, responsiveness within a game app may be crucial than for a data tracking type app. Also support for certain services or components may be necessary for the app development, like accessing REST or SOAP or utilizing cloud services. If the multi-platform development tool can support the things you need, the downsides of using them may be outweighed by speed to development and speed to market. These multi-development platforms cater to existing development languages and environments where developers have tons of experience, more than Android or iOS development. Also, the environments offer significant development advantages that experienced developers in the environment can leverage.