which approach for MAUI IOS/Android apps with offline support to backend Web App / App API?

mixedup 1 Reputation point
2023-01-04T09:03:17.65+00:00

Which approach of Microsoft tecnologies would be recommended for this? (mainly I ask around any mobile app sych ideas)

  • System that has a Web Interface, as well as MAUI cross platform IOS/Android app.
  • Central database for Web Interface (can be ASP .NET API) which IOS/Android apps can sync to
  • IOS/Android apps have offline capability with Sqlite (using EF Core), but can elect to "sync" to the backend API/database when available
  • Ideally would be nice for some views in the Website to share components with MAUI mobile apps, perhaps through the Blazor Hybrid approach

Questions:

Q1 - Is there an automated way of handling the "sync" from the MAUI mobile apps back to the backend database? I see there is a "Offline data sync is an SDK feature of Azure Mobile Apps" available, however I am not sure this would be appropriate/work if I'm trying to sync the database back to my system backend database (also used directly by the web application)?

Q2 - Any other advice / tips. My thoughts were to use the following perhaps:
* ASP .NET API with database (SQL server)
* Blazor Web App
* MAUI cross platform mobile apps (IOS/Android) [perhaps with Blazor Hybrid to share views?]
* [mainly not sure about any good MS approaches to handle the mobile app offline/sync aspect that does fit into this mix]

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,192 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,398 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,902 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,920 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Takahito Iwasa 4,841 Reputation points MVP
    2023-01-04T11:16:00.787+00:00

    Hi, @mixedup

    First, you can use the DataSync Framework to set up the MAUI client and ASP.NET Core server respectively for offline data synchronization.

    And since Blazor Hybrid can access the platform API, it seems that the implementation itself can be implemented on his MAUI native side.

    2 people found this answer helpful.
    0 comments No comments

  2. Bruce (SqlWork.com) 56,771 Reputation points
    2023-01-12T17:26:21.7466667+00:00

    clearly the webapi can be fully shared.

    if you want the app source as close as possible, then you could use blazor WASM for the web app, and hybrid blazor for the mobile apps.

    as the blazor wasm does not have a sync library like mobile, you should wrap and use injection. typically you would use a service worker for sync with wasm.

    note: this is not the approach I have taken. I use react for the web app, swift/swiftui for IOS and kotlin/jetpack for android. I have found its faster and easier to use the native mobile app environments.

    0 comments No comments