Cross-Platform Development

In addition to being a great tool for writing apps for each of the three supported platforms, Elements also provides a range of features targeted at sharing code across two or more platforms, for example to allow you to reuse business logic between versions of your app for different platforms, or for just writing certain lower-level non-UI code in a platform agnostic fashion.

Aside from of course the core languages being provided across all platforms with only very minimal differences, Elements provides three core features that enbable cross-platform develop ent and code sharing between platforms:

  • Cross-Platform Compatibility Mode is a a special mode of the compiler than can be activated (per project or per individual file) that makes the compiler more lenient towards platform differences and makes it easier to write sharable code. In essence,
  • Sugar is a cross-platform library of low-level classes an APIs that provide functionality that normally is platform-specific in ways that are platform agnostic. By using Sugar APIs instead of platform-specific APIs, you can make your code more portable.
  • Gotham (BETA), coming in the future "Intrepid Class" release in 2017, is a new meta-platform that will allow the creation of pre-compiled cross-platform libraries.