Cross Platform Development

Producing applications for multiple platforms at the click of a button.

The problem

Writing cross-platform applications with standard tools can be difficult. For example, if you only want to target iOS (iPhone or iPad) and Android, you will need to use Java for the Android version of the application, and Objective C for the iOS version. Apart from requiring different tools, the two operating systems have completely different APIs (application programming interfaces), which means you need to learn two different ways of accomplishing things. Presumably, that is why you are reading this page: to find out what 8th™ does differently.

Our solution

8th lets you, the developer, write your code only once, using the 8th language, and produce your application for multiple platforms at once. You need not be concerned about platform-specific issues, in general; there are always some issues to be dealt with. 8th does this by means of a runtime engine which compiles your code on the target device at run-time, and which supplies all the necessary support code.

For example, you may wish to access the GPS of the device your program is running on. The API for that is wildly different between Android, iOS and Windows. Using 8th, you access the GPS in the same manner across all the supported platforms:

"gps" hw:sensor dup null? if
   \ no gps detected or available
   \ do something with the gps

In that code snippet you see that your code is platform-agnostic; you don’t need to be concerned with the “how” of accessing the GPS, you just use the 8th API. The case with other device-specific issues is similar: the special value null is returned when there is no support for that feature, or if it is otherwise unavailable.

Likewise with your application’s GUI. An 8th program uses a data description language based on JSON to describe the GUI to be created. Because of this, the GUI requirements can be determined and loaded at runtime — for example, from the application’s “assets” (named data packed with the application). That means you might have a “small-screen” version of the GUI and a “large-screen” version, optimized for the screen size but unconcerned with the specific device type.

One last issue is worthwhile mentioning: convenience. As an 8th developer, you will develop your application on whatever desktop platform you prefer — Windows, macOS or Linux (or even on the Raspberry Pi). You can run your application on that desktop platform, and debug it there, and test it, and be reasonably assured it will run similarly on any of the other platforms supported by 8th. When you need to add features or fix bugs, you can do so in one place, and have your fixes or additions on all the platforms you support.

How is 8th different?

At this point you may wonder what distinguishes 8th from other cross-platform solutions like PhoneGap or Java. That’s a fair question.

To begin with, 8th does not run your application inside a virtual machine like Java does. Your application runs as native code on the target device, using the 8th support code as it might any library. Speaking of libraries, your application can use external libraries easily. Thus, if you have specialized code you can integrate it with your application.

Your application is also not a “web-application” as it would be using PhoneGap or similar solutions. You do have access to a web-browser control if you need one, but you are not required to use it. You can write a “command-line” application if you like; you are not restricted to only GUI applications.

Finally, your application is packaged in an encrypted format which makes it tamper-resistant as well as difficult to hack. A lot of thought has been put into how to make the 8th product and applications produced by it resistant to hacking, and we continue to improve the product every day.