Shared slim renderers project preparation #210
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
This takes a shared project approach for constructing the necessary binaries used for XF 5.0 and for Maui builds.
This doesn't use any multi targeting so it basically gathers up all the necessary files into a given binary to produce what's needed.
The advantages here are
Disadvantages
Project outline
System.Maui.Android.SLN
This contains the projects needed to work on Android .NET MAUI
Common.csproj
This contains types that are the basic classes used by everyone
Common.Android.csproj
This contains the common implementations that are shared between XF 5.0 and Maui. As the behavior of each renderer is extracted out to common methods and types they get moved here. In this PR you can see some code that's been moved to FormsEditText. All
System.Maui.Interfaces
This contains the common view interfaces
These are used by the Maui.MVVM project and the renderers projects
System.Maui.SlimRenderers.Android
This contains the android implementation of the android slim renderers. This could probably be it's own dll but this is all the static mapper implementations for Androiod
System.Maui.SlimRenderers.Common
This contains the shared Slim Renderer classes that has all the mapper implementations etc...
Xamarin.Forms.Core.Shared
This is a shared project that contains every single file that's part of Xamarin.Forms.Core (the project files are even in the same directory) this is used to create a portable shared version of all our BO implementations that we can add into other projects
This works with
System.Maui.MVVM
to add interfaces to our BO classes that can be used by the slim renderersSystem.Maui.MVVM
This includes a reference to
System.Maui.Interfaces
and has added partial classes that tie our things like Label and Button to those interfaces.System.Maui.MVVM.Android
This is the concrete unification of all the shared projects. Currently this is using SDK Extras but it will be changed over to .net SDK 6
This project unites all the shared projects required to generate a System.Maui dll
At some point this will be a single shared project but until there is proper IDE support this is probably the best option.
This is basically what each implementation (comet and blazor) would use to implement there own "CometButton" or "RazorButton" etc....
Additional Thoughts and work
We should call slim renderers something else just for clarity When working with these files just having something called EntryHandler vs EntryRenderer or whatever would probably help
Currently a large part of the UI tests are part of a shared project so my hopeful goal is to share those into a Maui based testing project that we can use to run UI tests
We could probably add another layer of dlls here before they are unified into the MVVM project that's just the MAUI renderers
We need to add in the faster registrar we already built and add an actual platform head that runs and uses these renderers