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,
- Elements RTL 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 Elements RTL APIs instead of (or i addition to) platform-specific APIs, you can make your code more portable.
The Tutorials section provides a range of tutorials specifically about writing cross-platform code using Elements RTL.