Developing Cross-Platform Applications
By admin In Tech Facts On December 10, 2014
When specifying new applications, FABNexus recommends that decision makers consider the benefits of developing cross-platform capable software. Cross-platform development requires specialized development skills and a portable programming language and graphical user interface (GUI) library, but it offers valuable benefits. These include
- A contingency and risk mitigation plan should your OS vendor change their pricing, technical or support policies.
- For externally marketed software a larger potential customer base.
- Mitigates risk from potential trend shifts in customer gravitation to specific computer brands.
Cross-platform capability is most commonly realized with carefully crafted source code that once compiled or reconfigured can execute on different computer processors and operating systems.
Minimizing the software’s dependence upon the host operating system is key. There are numerous portability areas that must be dealt with, the most significant two issues being an application’s need to invoke native operating system primitive operations and native GUI operations.
Operating system (OS) primitives encompass thread synchronization mechanisms, thread and process control, memory management, device drivers, etc. The operating system primitive dependence problem is most commonly handled by defining a platform neutral ‘virtual’ OS subsystem. Briefly, when the application source code must perform an OS primitive operation it instead invokes a comparable function provided by the virtual OS module. This technique reduces the application’s direct dependence upon the underlying native operating system. The virtual OS subsystem’s internals are reimplemented for each hosted operating system, utilizing as few native operating system specific functions as needed to fulfill the intended operations. The virtual OS subsystem implementation is usually small in size and relatively easy to implement for most operating systems.
The GUI dependence problem is more challenging, and typically requires using an off-the-shelf cross-platform GUI library or framework. This is discussed more below.
It’s unrealistic to expect any operating system or programming language to be supported indefinitely, but there are well proven techniques and technologies available that can reduce one’s dependence on the target system’s underlying operating system. It’s well understood that writing software programs using certain high-level programming languages permits one to ‘transport’ (i.e. port) the program to disparate vendor computer systems, with minimal changes. Specific programming languages support platform transportability more than others. In all cases there is effort involved, since even with the most widely accepted and trusted high-level programming languages porting difficulties arise regarding GUI libraries, file systems, numeric formats, I/O libraries, and operating system primitives.
A common technique for creating cross-platform programs is to select and use a vendor neutral cross-platform GUI library compliant with the highly portable programming language c/c++. Two widely accepted packages are QT and WxWidgets. Further motivation for using c++ is the availability of an abundance of compiler tools and powerful cross-platform library packages such as STL and BOOST.
Other potential cross-platform development options are the programming environments of Java, Mono (c#) and Ada, each with their own specific set of advantages and limitations. There are additional portable language environment choices, but each must be evaluated in the context of your target platforms and application domain requirements.
Another approach is to construct an application system using a web-server coupled to an associated client browser-based application. Even though based on a standard web server and browser, this approach allows one’s application to run without a network connection. Unfortunately this approach has drawbacks, including
- more constrained graphics support,
- relatively complex cross-browser compatibility support problems,
- potential security issues,
- potential performance issues,.
- the need for awkward and specialized web-based programming techniques.
There appears to be less convergence in the web-application development arena regarding acceptance of a common set of development tools and techniques, where a huge collection of such tools and environments have evolved. HTML5 is supposedly a step towards improving the situation, but this isn’t entirely clear yet.
A related factor that impacts an organization’s software development efforts, costs, and long-term planning is the degree to which your application is dependent upon another organization’s proprietary software or hardware technology. By proprietary technology we refer to computer technology (software development tools, operating systems, software services and products, computer hardware, etc) which is commercially controlled by another organization and requires one to purchase a time-limited license or subscription, or a perpetual license fee.
A popular alternative to proprietary commercial software technologies are open-source packages. These typically are licensed with a mandate that the user agrees to provide the community unfettered access to any source code modifications. There are hybrid open-source agreements which contain more limiting commercial terms, but these are less common. Linux and Apache are two very popular open-source software resources that offer significant value to their users.
With current popular computer software technology, specifically as it relates to mobile devices, it’s unfortunate that the more commonly used platforms of Windows .Net, Apple iOS / Objective c, and Android Java have significant architectural differences and therefore present major challenges to creating flexible non-proprietary cross-platform mobile software. There are organizations striving to provide cross-platform mobile development tools, but it is quite challenging. Examples are PhoneGap and Xamarin.
To be continued.
FABNexus (www.fabnexus.com) is a SF Bay Area ‘Silicon Valley’ based software consulting firm that provides expertise in industrial automation, data communications development, embedded firmware, factory automation, and patent litigation support
Leave a comment