On May 20, 2020, at the Microsoft Build event, “.NET Multi-platform App UI (MAUI), the future of Xamarin.Forms” was presented, which is nothing more nor less than a new user interface for cross-platform applications with .NET, in other words, it seeks to unify all the tools for the development of mobile apps in a single “base” project that is built for the different platforms (Android, IOS, macOS and Windows), this to streamline the way you create current Xamarin.Forms projects.
The difference between these techniques is that the PCLs are compiled and generated by the Assembly (.dlls), this being the reuse unit that is added to the target projects (Android, iOS). Instead, with the SP, the source code is the unit of reuse and is added within the Assembly of each platform. In both cases, the structure of a solution for a Xamarin project would be:
- A project for the shared code.
- And then another project for each target platform.
And then another project for each target platform.
Current Xamarin project structure.
But, with the arrival of .Net 5, the .Net platform has begun to be unified, with .Net Core and Mono which is the base of Xamarin.Android, Xamarin.iOS and Xamarin.Mac, in a single Base Class Library (BCL). Therefore, it is planned that with the release of .NET 6 for next year, this migration is already completed and it is expected that all new Xamarin projects will be based on this version, which will already have all the tools to build cross-platform apps.
MAUI project structure.
The following image shows what the new structure of a project solution would look like with Xamarin .NET MAUI:
In the next part I will talk about the new features that MAUI brings…
Thanks for reading,