Cross-platform frameworks - a step in the right direction towards coding utopia

Yannick Chammings
CEO
portage-et-customisation
The concept of cross platform frameworks is the obvious way forwards where software is required on several platforms - but the reality is not always as easy as the concept might indicate. Find out more . . .

If taken literally, everything we see, hear, touch or otherwise experience is done so through a medium of some form, perhaps artists and performers understand this much better than engineers.

In engineering terms, we would probably express this as a ‘high level of abstraction’, a term that has much greater resonance with developers. In hardware, a high level of abstraction would be using an HDL (hardware description language) to design an ASIC or SoC. In software, the high level is provided by another language, such as C or C++.

If we accept that we can only really experience something through a medium, then we could say that paint has a relatively low level of abstraction, while the actual content of a painting is a much higher level. The way each individual experiences paint will be similar, but everyone’s interpretation of a painting could differ significantly. The fact that the paint will have been painstakingly assembled into a painting means the artist’s intention is able to be appreciated by a wider audience.

Software engineering with an artistic mind…

Applying this analogy back in the software engineering world, the paint would be binary, the painting would be code, the engineer the artist. And just as there are many different styles of painting, there are many, many different coding languages. But, ultimately, the reason behind all languages comes down to the same thing; turning intent into machine code running on transistors.

This commonality raises the possibility for a language that can target any platform and, in principle, there is nothing to prevent it. Indeed, it is the reason why C remains the most commonly used programming language in embedded systems. However, while programs written in C are largely portable to different platforms (typically through recompiling), in practice programs are often optimized at some level for a specific hardware platform.

The idea of a truly cross-platform approach to code development has given rise to software frameworks, which effectively raise the level of abstraction even further from the underlying hardware. This approach works well when developing apps for smart phones running different operating systems, such as iOS and Android. With a small number of possible targets, cross-platform development frameworks are able to allow a single source codebase to be deployed on all platforms, looking, feeling and behaving the same in each case.

With the advent of Big Data, Software as a Service and the Internet of Things, however, developers could face a scenario where, instead of a small number of different targets there could potentially be thousands. Developing the same application multiple times to run on every conceivable platform is untenable; cross-platform development is the only workable solution.

There is a growing number of cross-platform frameworks targeting this new paradigm. Some focus at the application level, such as Apache Cordova which draws on web technologies such as HTML, CSS and JavaScript. Another example is Xamarin; a platform based on C# for developing applications that can run on MAC OS and Windows, as well as iOS and Android, all from the same codebase. The Qt platform specializes in applications and user interfaces, and employs C++. What these frameworks all have in common is the ability to target multiple and ostensibly completely different operating systems with the same source code. The same application runs — and the user gets the same experience — on all platforms. What they don’t share, of course, is the ability to move from one platform to another with the same codebase, as each one uses a different programming language.

One step beyond. When the Artist becomes Meta-Artist. From Cross platform to AI and Machine Learning

Ultimately, the portability comes down to how easily the code can be moved around and retargeted, and this will typically be dependent on how the platform has been designed. Most will use some form of code library and so making those libraries portable would be a step towards making a truly universal cross-platform solution. Of course, that is going to be difficult to achieve from an engineering and, more importantly, commercial point of view.

It could be argued that the way to do it is to keep raising the level of abstraction. The human brain is remarkable in its ability to create order from chaos; from interpreting a collection of shapes, shades and colours on a canvas, to decoding the changes in pressure that reach the inner ear into meaningful noises.

At some point in the future, machine learning and artificial intelligence will reach a point where we, as humans, can express our intentions to machines in a more natural way, rather than using one of a plethora of programming languages. Until that time comes, cross-platform frameworks seem like a promising step in the right direction. 

Share this page


Want more like this? Register for our newsletter
developing bluetooth BLE beacons Joe Tillison | Silicon Labs
Determining BLE Beacon Proximity is a Challenge. Here's How It's Done Today
Bluetooth is an ideal wireless technology. It has developed over the years and as a result it is being used in many applications, although in some cases it presents some interesting challenges.
Training
Online - RF and Wireless Essentials for Engineers
This on-line course enables you to quickly get up-to-speed & understand key concepts of modern radio frequency, RF & wireless communications systems

More training courses

Whitepapers
Using Digital Control Designs for Stable Power Supplies
Find out how to achieve stable power supply designs with fast transient response by using digital control techniques in this whitepaper from Intersil.

More whitepapers