Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maui example #232

Closed
wants to merge 3 commits into from
Closed

Maui example #232

wants to merge 3 commits into from

Conversation

prok155
Copy link

@prok155 prok155 commented Jan 16, 2024

This PR show how to use CSharpMath package in .net Maui app.

Fixes #206

@charlesroddie
Copy link
Collaborator

Hello. Thank you for your interest in CSharpMath.

This PR show how to use CSharpMath package in .net Maui app.

Is it possible to do this via a change in docs instead of adding code?

Ideally docs should contain:

  1. How to draw on a Skia canvas (a platform-independent description with no reference to MAUI)
  2. A link to how to use Skiasharp on various platforms
  3. A statement that MAUI is supported via SkiaSharp

Is anything missing in your opinion from this list, or anything that in the list that is not present in the CSharpMath docs?

It is not a CSharpMath responsibility to show what a sample MAUI app looks like (which is MAUI's responsibility) or to get SkiaSharp working on MAUI (which is SkiaSharp's responsibility). We should not therefore add MAUI code to the repo. It will cause several problems: 1. longer build times and a lot more code in the repo, and 2. need for an additional maintainer: a person who will review this PR, permanently commit to making sure this maui code will build and work in perpetuity and make updates as needed and delete it when if it becomes obsolete.

@Happypig375
Copy link
Collaborator

Happypig375 commented Jan 19, 2024

@charlesroddie Is the build time issue really a problem? I think this example can lay the groundwork for CSharpMath.Maui as a replacement for CSharpMath.Forms. It would be easy for users to just import a view just like with XF.

And the maintenance issue can be done with PRs as well. The code can just sit there with external PRs.

@prok155
Copy link
Author

prok155 commented Jan 19, 2024

@charlesroddie If you look at reported issues, 80% of people used CSharpmath in Xamarin.Forms apps. MAUI is the successor to Xamarin, so I think that adding a sample is better than adding docs, it would be much easier for people to use it.

You can remove Xamarin code from this library as it is no longer supported.

@charlesroddie
Copy link
Collaborator

charlesroddie commented Jan 19, 2024

@prok155 adding a sample is better than adding docs, it would be much easier for people to use it.

Can't you add a sample as a code snippet instead? Then it would be a 20line increase in instead of a 1100 line increase. And no compilation or maintenance would be needed (unless the snippet is reported as stopping working, in which case it can be altered (if there is a maintainer) or deleted (if not) easily).

@Happypig375 Is the build time issue really a problem?

Yes if anyone starts developing this library again they will naturally try to build it. Build times will be a problem, and also the requirements for a build, which will may involve various sdks or workloads. Also the need for tests to pass in various platform test projects which should again not be the responsibility of csharpmath at all.

I think this example can lay the groundwork for CSharpMath.Maui as a replacement for CSharpMath.Forms. It would be easy for users to just import a view just like with XF.

Introducing CSharpMath.Maui would smooth some users over during migration but would maintain a lot of annoyances with CSharpMath.Forms. Users come with bug reports and post xaml markup and the bugs could be in xaml, could be in csharpmath.forms, or could be in the core library. The benefit for users would be minor provided that the skiasharp path is documented.

@prok155 prok155 closed this by deleting the head repository Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What about Maui?
3 participants