Cross Platform Development and Portability

Faisal Khan
5 min readFeb 13, 2019

Let us first start by understanding the meaning of cross-platform development and portability. It is very important to understand as to why these terms were coined in the software industry and how that eventually helps in developing software that lasts. A Greek philosopher Heraclitus said, “The only constant changes.” This saying applies to the software engineering world in the best way possible and this should never be forgotten whatsoever. Conclusively, it requires that the software should be built in a way that it should be able to withstand unpredictability. By unpredictability, it should be understood that the software requirements and the environment that it stays in. Software portability means that the software should be usable in different environments. We will look into what are all the intricacies that are surrounding the software engineering and how can we make it more efficient by making it more platform independent.

The process of making a software code independent of the environment and platform depends on various factors. Usually, you have to answer a lot of questions:

· What happens in case of new hardware arrival?

· How a small software can encompass development for a variety of platforms, resulting in a customer base and profits?

Cross-Platform Environment

Answering these difficult and challenging questions often leads to building a high performing robust system that is platform independent and at the same time portable to be used anywhere.

Let us now see, when we talk about platforms what actually it means when we are thinking about the architecture of the software. Platforms can refer to the type of processor or other hardware on which the OS or the application runs, it can also refer to the combination of OS and the hardware running on a system. For example, MS Windowsonx86 architecture and others like Linus and MacOS.

This problem is not a well-known problem in the software engineering world. Because most of the stakeholders focus on the construction of the software, managing teams and using tools to get the work done. In conclusion, giving them a successful completion of a large project. Then came in the concept of component-based software engineering that has made a significant impact in the software world by not only building the software but also focusing on various more important topics. The emergence of new technologies and the serious choice of different platforms have made a very thin line between hardware and software platforms. We don’t necessarily have to buy new hardware which requires eventually new software for the same.

But, still it doesn’t solve most of the problem pertaining to the time required and spent on maintenance and upgrades of the project, it still counts for two third of the project lifetime cost.

Platform changes usually require moving the software to new or additional languages, operating systems, hardware, or devices. We focus on these changes and particularly on the platform dependent parts which obviously are the low-level parts. Platform changes usually introduced in the software only when there are technical advances in the industry, this can be hardware, Operating system, networking these changes are not easy and cannot be ignored at all or postponed. Changing any of these would result in system failure partially or altogether.

To address all these issues there had been many improvements in the software world. Java has its own cross-platform development tool, Microsoft came up with .NET. These don’t completely guarantee the software will work perfectly. So we need to exploit software development advances to build a new era of software that can last and what are those developments? Those are, APIs, VMs and the XML and also later JSON.

Application Programming Interfaces:

Abstraction has always been used to manage complexity and APIs are one of the best ways to do that when it comes to executing subclasses or subroutines. API is now an integral part of mostly al the languages and provide immense functionality. It also at the same time complicates the process as it has many things attached to it.

Cross-Platform Toolkits:

These are an important part of GUI development. Like APIs, they provide a set of classes that define the widgets (or controls or components) that developers can create and manipulate in developing an event-driven GUI. But unlike APIs, they define the widget set independently of any platform and then provide multiple implementations for many widely used platforms. (In this context, “platform” can be a language or OS.)[2]

Reflection:

In computer science, reflection is the ability of a computer program to examine, introspect, and modify its own structure and behavior at runtime.[3] It is essentially the ability to use the fields, properties, and methods in allowable ways. For example, get a list of fields an object holds in the program is done through reflection. In general, reflection lets the programmer defer implementation decisions to runtime and thus provides a new form of program abstraction. It is extremely powerful when used in conjunction with APIs and toolkits.

Virtual Machines:

VMs provide an abstraction level just above the OS layer. A VM implements a machine architecture that is both computer and OS independent. To implement a programming language, a compiler translates a program written in that language to the VM’s instruction set. Using a VM has several important advantages [4]:

· A compiled program distributed as instructions for the VM is independent of all platforms that run the VM.

· The VM controls the program’s access to files and other system resources, thus providing a high level of security.

· Using just-in-time technology, the VM can dynamically translate the program’s VM instructions into the host computer’s native instructions. With direct access to the host computer’s resources, performance is much higher than if the host computer interpretively executes VM instructions.

Extensible Markup Language:

XML is a platform-independent notation for representing structured data. Both XML and the ubiquitous Hypertext Markup Language (HTML) notation derived from the Standard Generalized Markup Language (SGML). As its name implies, XML is extensible through the addition of tags, and programmers have developed standard tag sets for an extraordinarily diverse set of applications, including spreadsheet data, calendars, mathematical equations, stock market data, and geographical mapping[4].

By using all these technologies apart from the technologies that are coming up every day and the current ones are evolving fast. It is really helping the developers as well as the users all over the world to be efficient in their work directly or directly impacting largely in terms of time to build the software applications and the money and time of the users providing a high level of portability.

Challenges to cross-platform development:

· Developers are restricted to a lot of extents as they have to use the most common amongst all the platforms.

· Different platforms have different conventions, cross-platform does not always accommodate them.

· VMs and scripting languages need to be translated in native executable each time the application is executed, resulting in a performance penalty.

· Security flaws are quite evident.

· Testing is quite difficult.

--

--

Faisal Khan

“When it’s dark, look for stars.” — Oscar Wilde