Getting Started with Multiplatform Application Development Using Delphi X5: Part 1

Share on FacebookTweet about this on TwitterShare on LinkedIn

Share on FacebookTweet about this on TwitterShare on LinkedIn

A few months ago I found out that Embarcadero had put out a new version of Delphi XE5 that supported Android app development. Their previous version had only included iOS development. Now, they were touting that you could deliver to multiple platforms (Android, iOS, Win32/64 and Mac OS) using only one codebase with their tool. This is one of the hottest topics in mobile application development at the moment and I was excited by the potential of this product.



As a former Delphi developer for many years, I wanted to see how easy it would be to leverage my old skills into mobile app development. In the past few years I spent a fair amount of time learning Objective C and XCode for iOS development and managed to produce a few fairly functional apps, but none of them made it into the app store. I found Objective C and many of the rules in iOS development frustrating; they do not follow RAD development principles and you could create something in the visual development tool but then there was no way to tie that to your code directly, you had to write it manually. I found this extremely tedious. It seems like they purposefully made it harder to develop the interface just to emphasize the MVC (model viewer controller) model, and that each part should be separated. Ultimately, it slows you down when you’re trying to code.

Some of you iOS, Objective C purists may be screaming at the above paragraph. I understand there are reasons for these separations of the visual part of your code from the data part of your code. For a moment though, consider that RAD development has a real place in the world, and that many of us grew up with what-you-see is what-you-get (WYSIWYG) visual development interfaces that can be developed at lightning speeds. To be pushed back into a world where you have to hand code your interface almost seems archaic to me.

So now you understand my motivation for better or worse. I loved the Delphi of days past, loved the language, and the WYSIWYG nature of the development. In addition, I wanted to see if I could parlay that into developing apps that held their own with natively developed apps.

The Benefits of One Codebase: A Case Study

The idea of one codebase deploying to multiple environments has huge advantages. One codebase means generally fewer developers and easier maintenance. It can also mean a more cohesive team because you are using the same development language and integrated development environment (IDE) for development. You can get more done working cohesively from a single codebase which produces multiple products for Android, iOS, and other platforms. One developer in fact could produce a great deal more quickly if this worked as promised, and that is what I set my sights on.

What was of interest to my company is the cost saving aspect and speed to market. We develop native Android and iOS applications with each platform having dedicated development resources and generally utilizing separate code bases. Management was very interested in the idea of one codebase and deploying one product to multiple platforms. Plus, Delphi XE5 by Embarcadero touts that the code delivered is native.

With new development tools that use their own platform and language to create apps for multiple environments, come many complications. Many of these tools use the native libraries and SDKs from their native counterpart, the Android SDK, iOS SDKs, etc.. The most popular of these deploy native Android or iOS code as their finished products. That is a huge selling point, if you are ending up with native code in the end, the app is potentially as good, if not better, than an app developed natively with the Android and iOS tools. However, that is rarely the whole picture. The tools are either lacking in functionality, lacking in supported components or services, or have their own translation library that adds bulk, if not performance hits, to the finished app.

Management was intrigued when I mentioned Delphi XE5 and explained the new multi-platform deployment capabilities to them. They agreed to purchase an Enterprise version of Delphi XE5, also known as RAD Studio. In exchange, I had to remake one of our existing apps, report during the process, and provide a review of the product at the end. The existing app was developed by our Segue app teams both in iOS and Android. I was to redevelop the app using one code base and deploy it to both environments.

We purchased RAD Studio Delphi XE5 from Embarcadero in late October 2013 through their amnesty discount. Anyone that owned a previous version of Delphi 2007 or later could upgrade under special pricing. It was an excellent deal that has now expired, but they often run special incentives to entice previous users to return to Delphi. I installed the software on my personal laptop and began setting up my environment in my local network. Since you have to deploy to a Mac machine, a simpler and consistently working and accessible network can be your best choice. In part two of this blog you will see how the experiment progressed.

Download our Mobile eBook