Friday 27 May 2016

Targeting multiple platforms

The pressure for cross-platform development has never been greater. Windows remains important, butin scenarios other than tightly controlled corporate environments it is not enough; and even there the trend towards mobile and ‘bring your own device’, where employees can use their own computers, tablets and smartphones, means demand for non-Windows clients. Indeed the truth is that Windows is now running on a minority of client devices, with a larger share going to Android and Apple iOS devices.

This makes cross-platform development tools increasingly attractive. Single-platform tools are stillimportant of course, and allocating dedicated development teams to each target platform may be the best approach for organisations with sufficient resources, although maintaining consistency between clients under such a regime is a problem. On the other hand, maximising the amount of sharedcode makes sense both for quality and economy, and there is an obvious appeal for tools which can target multiple platforms.

Impressed by 64-bit support
Anthony West is a developer at The Analytical Group which makes Windows software such as WinCross for statistical analysis. He also has his own small software company. Products are built using C++Builder, and he has been testing C++Builder XE3 for some time.

The big feature for him is 64-bit support: “WinCross 10 has the potential to open up some sizeable databases. We’ve had occasions when we get close to 2GB of memory, and 32-bit dies at around 1.8GB.64-bit gives us the ability to let our customers work with much larger databases."

How is code compatibility between the C++Builder XE3 and earlier versions? He told us that there were some issues towards the beginning of beta testing, but most are resolved. “About 75 per cent of my applications are already compiling into 64-bit, and the ones that aren’t are just some minor issues.”

West is looking with interest at FireMonkey for cross-platform work in “new projects, and possibly a couple of existing ones. I have some customers asking for Macintosh versions. I’ve already tried messing around with FireMonkey. It is quite differentfrom the VCL with a bit of a learning curve, but yes, Ido have plans to do cross-platform development with FireMonkey.”

What does he think of the new release overall? “I’m currently using XE2 for my main products, and the XE3 release is pretty solid for 32-bit applications to move over. But it’s the 64-bit that is really exciting. It’s brand new and a huge undertaking, and I’m impressed that they’ve pulled it together. There are some issues, but I’m a programmer myself, and it’s very difficult not to have issues in a first release of another version.”

Should that be an HTML tool, using Adobe PhoneGap or similar to create native executables oneach platform? The debate continues: in some casesthis is an ideal solution; in others, the performance of native code and its ability to access device features makes it a better choice.

With its latest set of tools, Embarcadero is supporting both approaches. The centrepiece of its RAD Studio product is Delphi, long the favourite choice of canny Windows developers but now repositioned as a cross-platform development tool. Cross platform development was introduced in RAD Studio XE2 with Mac OS X support, and iOS in a rough and ready form using the open source Free Pascal compiler.

The recently released RAD Studio XE3 supports Windows and OS X out of the box. Support for Apple iOS and Google Android is coming in an add-on pack – iOS in the first half of 2013 and Android to follow by the end of the year. The Android add-on will generate native code rather than Java. The mobile add-on will not be free but Embarcadero says it will be low-cost and included automatically for customers with Software Assurance. No announcement has been made as regards to Windows Phone 8.

Although this could be viewed as a step back from RAD Studio XE2, which already targets iOS, the reason for the delay is the big changes to the developer tools architecture used by the latest C++Builder and future versions of Delphi, starting with the iOS release. This new architecture is based on a language engine which forms a front-end to theopen source LVVM compiler. Much of Embarcadero’s effort has been to make the property-method-event programming model used by Delphi and C++Builder work correctly with LVVM.There are several advantages to LVVM, including the ability to generate code for both Intel and ARM processors. Another aspect is CLANG, the LVVM C/C++ compiler, which provides 64-bit and C++ 11 support. LVVM is used by Apple for its own OS X and iOS development tools.Note that currently it is only the 64-bit C++Builder that uses the new compiler. The 32-bit compiler is a minor upgrade of the existing one, making it good for compatibility but inconvenient if you need to build the same application in both 32-bit and 64-bit versions.

No comments:

Post a Comment