Embarcadero has released version 7 of its XE programming suite. The main products included are Delphi and C++ Builder, RAD development tools that share the same underlying libraries and visual designers but give developers a choice of language. Delphi uses an object-oriented evolution of Pascal.

Delphi is best known as a Windows Programming Tool – it used to be the main competition for Visual Basic – but over the last few years Embarcadero has added cross-platform Mac and mobile development with native compilers for OSX, iOS and Android. The IDE runs only on Windows but can compile for the Mac or for iOS New versions have come thick and fast – XE6 was released in April 2014 – so if you want to stay up to date, prefer for frequent upgrades or buy with a support and maintenance agreement. You can buy Delphi or C++ Builder separately if you do not require the suite.

The full RAD Studio also includes HTML 5 Builder, which supports mobile app development using Cordova (open source version of PhoneGap). There seems to be little new in HTML 5 Builder. An earlier PHP tool variously called Delphi for PHP and RadPHP was dropped some time back. I get the impression that Embarcadero is now more focused on its core good thing.

So what’s new? Making effective cross-platform development tools is not easy, with trade-offs between productivity (share more code) and writing the best app for each platform (share less code). This edition introduces a new approach to designing the user interface, called the Multi-Device Designer. It is based on a kind of inheritance. You build your base UI in a master form and write most of the event-handling code there. This master form is automatically adapted, to some extent, to other platforms. You can see how your form looks on these other platform by dropping down a list.

When you select the form for a specific platform, you can modify it for that platform. There is still only one form, but the platform-specific views override properties set in the master form. If you then further modify the master, the changes will flow down to the platform-specific forms unless properties have already been overridden.

My impression after a five-minute play is that you will indeed have to made modifications to get each form looking right; the automatically generated versions were not too good. There is still good productivity potential here presuming the designer proves to be robust.

A common criticism of Embarcadero’s approach is that visual controls are custom-drawn on each platform, rather than using true native controls. That does not matter at all, Embarcadero always assured me. It does matter though; and now in XE7 we have the beginning of a solution. There are a couple of optional Platform Native Controls, TEdit and TCalendar for iOS, which do use native controls. I suspect this will be popular and hope that more platform native controls arrive in due course.

App Tethering is a feature/library that lets you easily set up connectivity between Delphi/C++ Builder apps on a local network. The first version only supported Ethernet/Wi-Fi, but now Bluetooth support has come, including Bluetooth LE on Windows 8 and recent Android devices.

On Android, a new tool called Java2OP lets you generate Object Pascal interfaces for Java Android classes, which sounds handy.

Aside: the naming of this tool suggests that the language is now called Object Pascal again, rather than Delphi, which became the official name some years back. Object Pascal makes more sense to me.

The System.Threading library now includes a new parallel programming library, including Parallel For, task scheduling, and futures. Futures are a way of creating code that will run at an indeterminate time. You associate a variable with a function that calculates its value. That function will run when you access the value, or before that if a background thread is available.

The IDE now has limited Git support (local repository only).

Another new piece in XE7 is Enterprise Mobility Services, a REST-based middleware stack that runs as an ISAPI DLL in Microsoft’s IIS web server. This includes database connectivity (using the FireDAC library), user management (though not Active Directory integration as yet, as I understand it) and usage analytics.

If you are using IIS, why would you not use ASP.NET and the Web API? The answer is that with EMS you can do end-to-end Delphi/C++ Builder as well as getting the performance of native code on the server.

Challenges for Embarcadero and RAD Studio

In the nineties it was Delphi versus Visual Basic, and although most developers who gave Delphi serious attention discovered that it was superior in most ways to Microsoft’s tool, the big-company backing and integration with Microsoft’s overall platform meant that VB was not much disrupted (though we may have Delphi to thank for the appearance of native code compilation in VB).

Today Embarcadero is up against Xamarin, which is similar in that it gives Microsoft platform developers a route to cross-platform development for Mac, iOS and Android.

From what I hear, cross-platform support in RAD Studio has been successful in reinvigorating the product within its niche, but it is Xamarin that has grown explosively, thanks to a combination of the C# language, Visual Studio integration, and a degree of official endorsement from Microsoft. Whereas Xamarin fits with Microsoft’s Universal App concept, shared C# code across all platforms, RAD Studio takes its own path, avoiding .NET in favour of native executables.

[I realise that there is endless debate about what native means, and that while RAD Studio has a good claim to native code, it is weak when it comes to native controls as noted above].

Unlike Xamarin, which has its own cross-platform IDE for Windows and Mac, RAD Studio requires Mac developers to use a PC or a Windows VM.

Embarcadero chose not to support Windows 8 “Metro” or Store apps, a decision which now looks wise, though it could yet work against them if Universal Apps are more compelling in Windows vNext. Another omission is Windows Phone; perhaps this does not matter greatly given its small market share, but within the Microsoft platform community it is a bigger lack than simple market share implies.

The advantage of the RAD Studio approach is that it is less dependent on Microsoft’s constant changes of direction, and performance is generally good. I have always been a fan of Delphi. There were some quality concerns when the FireMonkey cross-platform UI library was first adopted, but now in RAD Studio XE7 there is reasonable hope that the library is mature enough.

RAD Studio is the obvious route for long-time Delphi or C++ Developers migrating to mobile; it is a viable niche but I question whether it can ever move beyond it to grab a share of the wider mobile development market.

More information here.