liveBook · Manning

Cross-platform codebase

As explained in .NET MAUI in Action

A cross-platform codebase is a shared source-code base that can be built or deployed for multiple target platforms.

A cross-platform codebase is one shared source base that builds a single app for multiple target platforms. For most installable applications, this avoids maintaining separate versions while retaining a path to platform-specific variations when requirements demand them. section 1.3

Choose the implementation approach by weighing practical trade-offs:

  • Use a web app wrapped in an installable binary when web technology is the preferred foundation; the app still runs and renders through a web view, with associated performance and threading limitations. section 1.3
  • Use a single codebase that builds native apps when multithreading, performance, and full access to native platform APIs matter. section 1.3
  • .NET MAUI, React Native, and Flutter represent the native single-codebase approach; .NET MAUI can still support platform-specific versions when necessary. section 1.3

One DatePicker, two platforms

A .NET MAUI DatePicker can run on Android and Windows from the same code, with each version feeling appropriate to its platform without additional modification.

How .NET MAUI in Action covers it

How deep it goes
Compares web-wrapper and native approaches, stopping short of implementation steps or code.
Examples
Uses a .NET MAUI DatePicker running from shared code on Android and Windows.
What it assumes
Assumes familiarity with building an installable application but does not assume mobile or cross-platform framework knowledge.
What you can do after
Evaluate whether a web wrapper or native single-codebase framework better fits a multi-platform installable application.
How it connects
Connects cross-platform codebases with native apps, web views, native platform APIs, .NET MAUI, React Native, and Flutter.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of .NET MAUI in Action. The section links point to the parts of the book it draws on.