You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Enhancement] Keep Native Platform API with the same name convention as it is in Native Platform #522
I have lots of experience in Xamarin.Forms and Xamarin in general and one of the issues in this framework is that when I copy platform example to .NET project it is not working without renaming the whole API !!
API Changes
I think it would be helpful to have the same API name conversion as in Native Platform or at least to provide the same API in two variants:
However, I doubt you will get much support as the advantages seem minimal. You say that you have to rename the whole API when copying platform examples - in my experience much more has to change when copying native Android code and just changing case is a small part. This will only increase as more is written in Kotlin.
However, I doubt you will get much support as the advantages seem minimal. You say that you have to rename the whole API when copying platform examples - in my experience much more has to change when copying native Android code and just changing case is a small part. This will only increase as more is written in Kotlin.
@GalaxiaGuy I agree that it is maintained by separate projects, but only guys that develop MAUI can decide to request this feature for next major framework as MAUI otherwise guys in that project will just reject this request
And regarding the Kotlin, Android documentation provides examples for both Java and Kotlin languages ;)
changed the title [-][Enhancement] Keep Native Platform API with the same name convension as it is in Native Platform[/-][+][Enhancement] Keep Native Platform API with the same name convention as it is in Native Platform[/+]on Mar 19, 2021
This would be a breaking change for all existing Xamarin.Android and Xamarin.iOS code, and cause a similar problem for anyone porting existing Xamarin.Forms code to MAUI. Plus those names would violate the C# and .NET naming conventions; since MAUI is part of .NET, we need to remain consistent with those naming conventions.
That said, there may be some demand for a Visual Studio extension which can automatically convert pasted Java examples into C# by fixing names and casing. Maybe someone in the community can take a stab at that.
This would be a breaking change for all existing Xamarin.Android and Xamarin.iOS code, and cause a similar problem for anyone porting existing Xamarin.Forms code to MAUI. Plus those names would violate the C# and .NET naming conventions; since MAUI is part of .NET, we need to remain consistent with those naming conventions.
That said, there may be some demand for a Visual Studio extension which can automatically convert pasted Java examples into C# by fixing names and casing. Maybe someone in the community can take a stab at that.
Oh ... Some of Microsoft guys think differently as I mentioned in dotnet/machinelearning#5918
(they will support Python naming convention)
Also I do not ask to break existing code, I ask to generate method with two names ...
Also it can be generate in separate namespace like Microsoft.Maui.Android.Native without breaking of Microsoft.Maui.Android symbols
ghost locked as resolved and limited conversation to collaborators on Feb 19, 2022
Activity
GalaxiaGuy commentedon Mar 17, 2021
The bindings to the native platform are maintained in https://github.com/xamarin/xamarin-android and https://github.com/xamarin/xamarin-macios for Android and iOS respectively, and so those repose would be the better places to bring this up.
However, I doubt you will get much support as the advantages seem minimal. You say that you have to rename the whole API when copying platform examples - in my experience much more has to change when copying native Android code and just changing case is a small part. This will only increase as more is written in Kotlin.
redradist commentedon Mar 17, 2021
@GalaxiaGuy I agree that it is maintained by separate projects, but only guys that develop MAUI can decide to request this feature for next major framework as MAUI otherwise guys in that project will just reject this request
And regarding the Kotlin, Android documentation provides examples for both Java and Kotlin languages ;)
[-][Enhancement] Keep Native Platform API with the same name convension as it is in Native Platform[/-][+][Enhancement] Keep Native Platform API with the same name convention as it is in Native Platform[/+]hartez commentedon Mar 19, 2021
This would be a breaking change for all existing Xamarin.Android and Xamarin.iOS code, and cause a similar problem for anyone porting existing Xamarin.Forms code to MAUI. Plus those names would violate the C# and .NET naming conventions; since MAUI is part of .NET, we need to remain consistent with those naming conventions.
That said, there may be some demand for a Visual Studio extension which can automatically convert pasted Java examples into C# by fixing names and casing. Maybe someone in the community can take a stab at that.
redradist commentedon Aug 31, 2021
@hartez
Oh ... Some of Microsoft guys think differently as I mentioned in dotnet/machinelearning#5918
(they will support Python naming convention)
Also I do not ask to break existing code, I ask to generate method with two names ...
Also it can be generate in separate namespace like
Microsoft.Maui.Android.Nativewithout breaking ofMicrosoft.Maui.Androidsymbols