When I use MAUI, I don't want to have the database on the device (desktop PC, cell phone or tablet) but rather on my server. The good alternative option is a service (CRUD). My idea is that I then write an ASP.NET server application that allows any MAUI frontend to communicate with database on the server.
I've read a lot about it, but I don't know what the current status is in .NET Core 6 or 7? Earlier web application project is specified in tutorials, but now Web API. I assume that it is the same, right?
Or are there other (better) ways to implement communication between a MAUI native client and server database?
Thanks pcsasa
CodePudding user response:
I assume that it is the same, right?
Yes, the Web API
is appropriate for your project
Actually, you can separate your projects into two types. Backend
and Frontend
. it enables you to use your Web API
to feed other types of frontend
projects like WebSite
CodePudding user response:
In the time between I found out that there are some updates. Basically, since Core there are "Minimal APIs" and that is a bit different from what you know so far. Between Core 6 and Core 7 there are then some crucial differences in "Minimal APIs" (especially regarding filters). But you don't find much about this and I'm currently implementing the findings in a project (let's see if I succeed).
Authentication and authorization can, as I initially also thinking, best be implemented via JWT, but beware also here there are differences between Core 6 and Core 7 (please see https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-7-preview-5/ ).
The only thing I haven't figured out yet is how to implement 2FA with JWT, but I haven't looked for it for long either. If someone here knows, can he please post.