Write once, run anywhere (WORA) aims to let one application run across multiple operating systems without platform-specific modification. Runtimes and shared APIs hide differences between operating-system APIs. section 1.1 section 1.6
The approach developed through several runtime models:
- Java paired a common language and API set with the Java Virtual Machine, supporting applications across many operating systems. section 1.1
- .NET Framework separated application code from Windows APIs, but remained Windows-only and required an installed framework. section 1.1
- .NET Core removed key Windows dependencies and could ship its portable runtime with code for Windows, macOS, and Linux. section 1.1
- .NET MAUI applies the WORA approach to native UI applications, allowing one app to run on multiple platforms. section 1.6
A cross-platform .NET MAUI app
Build one .NET MAUI application using .NET APIs and a supported UI language such as XAML or C#, then run it across multiple platforms without further modification. section 1.6
Figure 1.1 Legacy applications are built directly on top of operating system APIs. Java and .NET provide their own APIs for developers to use and runtimes that hide the platform APIs.
Compare legacy applications built directly on operating-system APIs with Java and .NET runtimes that provide shared APIs and hide platform details. section 1.1
