dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.97k stars 1.71k forks source link

[workload] add maui-linux-gtk or maui-gtk to speed maui+self draw solution adoption on cross desktop platform development #3564

Open congzhangzh opened 2 years ago

congzhangzh commented 2 years ago

Description

I'd like to propose a maui workload to easy self draw cross-desktop solution, which seems very promise and easy community involve, as pointed by https://github.com/dotnet/Microsoft.Maui.Graphics.Controls/issues/57

the hardest part of the solution may be the maui Dotnet config part, like props, target, and workload, hope Maui upstream can do this work for the community.

After the work is done, evolution can drive by the community, which is easy and fast!

Public API Changes

n.a

Intended Use-Case

cross-desktop development

congzhangzh commented 2 years ago

@Eilon @jsuarezruiz if possible, hope we can add a new top workload response to maui like, maui-gtk or maui maui-selfdraw or something else. Tks

Eilon commented 2 years ago

I think this would be an interesting area to investigate but it's not in the plans for the first release of .NET MAUI.

congzhangzh commented 2 years ago

Hope this be useable in .net 7, before that I will base on https://github.com/congzhangzh/desktoploveblazorweb

osnipezzini commented 2 years ago

Any news about this ? @jsuarezruiz

NickMaev commented 2 years ago

@jsuarezruiz up

osnipezzini commented 2 years ago

I want to collaborate and speed up the development of the components, but for that it would be necessary to have this workload to be able to run the app.

Or if someone updates the main-linux fork I could continue working on it

jiafuzhang commented 2 years ago

good idea

congzhangzh commented 2 years ago

I want to collaborate and speed up the development of the components, but for that it would be necessary to have this workload to be able to run the app.

Or if someone updates the main-linux fork I could continue working on it

I can do the basic build, but no workload, props, target stuff, maybe this can help you some

https://github.com/dotnet/Microsoft.Maui.Graphics.Controls/issues/57#issuecomment-994207088

Btw, do all be hand first maybe easy iteration, merge to workload later

@osnipezzini

jsuarezruiz commented 2 years ago

@Redth Maybe we can include this topic in a team meeting Spec review?

juepiezhongren commented 2 years ago

make everything possible, not just desktop

Laftek commented 2 years ago

Yeap, this would be a great. Whats better is that community is willing to help with this if possible.

cyberdarius commented 2 years ago

At least the workload/host bootstrapper.

This open to a first implementation of blazor hybrid and self draw solution (Maui.Graphics.Controls) in linux

juepiezhongren commented 2 years ago

uno is a example, just learn some lesson from them

Redth commented 2 years ago

This is currently out of scope for .NET 6.

What I'd like to discuss here in the future (maybe for .NET 7) is that we create a stand alone repository with an example pattern of adding an additional platform to work with MAUI.

If we work through creating this pattern outside of our own repository, we can make the changes necessary to MAUI itself to be properly extensible for this pattern, and we also end up creating a template for the pattern for others to use.

congzhangzh commented 2 years ago

This is currently out of scope for .NET 6.

What I'd like to discuss here in the future (maybe for .NET 7) is that we create a stand alone repository with an example pattern of adding an additional platform to work with MAUI.

If we work through creating this pattern outside of our own repository, we can make the changes necessary to MAUI itself to be properly extensible for this pattern, and we also end up creating a template for the pattern for others to use.

If we can stable abstract and split out a new platform that’s good, or we will need rebase from upstream too often, which will be very bad!

A good example is asp.net team split out webview, which make photino.Blazor possible, which is cool, and really cross platform, at least for desktop applications

congzhangzh commented 2 years ago

Personally, I think only self draw for linux is value to consider, gtk itself is not like IOS/Android which all fast envolving, which will provide more widget or functionality, gtk is slow evolving.

Even just self draw for maui is not enough, mvu/comet style + selfdraw is must, to make it reactive and weak the tie to maui’s abstract behavior, implement first and weak the abstract, that’s the nature of functional programming.

reactive is not a good way to describe logical, but a good way to define the ui programing as a whole.

for this idea, we may need focus on widget, and Microsoft focus on basic workload:)

osnipezzini commented 2 years ago

This is currently out of scope for .NET 6.

What I'd like to discuss here in the future (maybe for .NET 7) is that we create a stand alone repository with an example pattern of adding an additional platform to work with MAUI.

If we work through creating this pattern outside of our own repository, we can make the changes necessary to MAUI itself to be properly extensible for this pattern, and we also end up creating a template for the pattern for others to use.

So we need wait more 1 year to have a linux compatibility ?

Martinn2 commented 2 years ago

If MAUI core was separated the way I suggest in https://github.com/dotnet/maui/issues/4721 it would be much easier to add linux support with drawn controls and/or Blazor.

alfosua commented 2 years ago

Came here just to support this proposal 👍

jmalcolm137 commented 2 years ago

I have moved all my .NET dev to Linux. The inability to build MAUI apps on Linux has made it easier for me to use other solutions than .NET which makes me sad. At the very least, I will have to use UNO instead.

There is an opportunity here for "embedded" as well which increasingly is really just a subset of mobile. In my industry, moving to a cross-platform application often requires a "Linux" UI even if the customer is primarily interfacing via Android or Windows. There has already been more than one project that I initially though MAUI would be perfect for that ultimately had to go a different direction due to a lack of Linux support.

nzbart commented 2 years ago

It seems a bit misleading these days to call something cross platform and not support Windows/Mac/Linux. I know I assumed that Linux would be supported. Please follow the principle of least surprise...

greatawesome commented 2 years ago

I am in the same boat. Our company needs support for embedded systems, so therefore we need Linux support. It is too bad the GTKSharp backend was dropped when MAUI became Xamarin.Forms, rather than building on what was there. Once Linux was dropped, MAUI was ruled out for us.

Thankfully everyone outside of Microsoft considers Linux support essential for cross-platform UIs, so we have the option of using Eto.Forms, Avalonia, and Uno.

osnipezzini commented 1 year ago

Any news on this ?