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

Should Photino continue to support Blazor? #18

Closed
MikeYeager opened this issue Mar 18, 2021 · 38 comments
Closed

Should Photino continue to support Blazor? #18

MikeYeager opened this issue Mar 18, 2021 · 38 comments
Labels
All OS question Further information is requested
Projects

Comments

@MikeYeager
Copy link
Collaborator

This is an open question to the community. Microsoft is clear that it is invested in making Blazor available on the Windows and Mac desktop (via Xamarin Forms) in the .NET 6 timeframe and adding Linux support some time later. They are currently in Preview 2. Photino support all web frameworks, not just Blazor and the community can use it outside of the .NET world. We anticipate at some point dropping Blazor desktop support when it's fully integrated into .NET in the .NET 6 - .NET 7 timeframe. Should we continue to invest in supporting Blazor in Photino as well?

@MikeYeager MikeYeager created this issue from a note in Bugs (Needs triage) Mar 18, 2021
@MikeYeager MikeYeager added All OS question Further information is requested labels Mar 18, 2021
@MikeYeager MikeYeager pinned this issue Mar 18, 2021
@peerem
Copy link

peerem commented Mar 18, 2021

Every article I read from Microsoft on the subject just confuses me more and more. I don't know what Blazor Desktop is going to be and I have a feeling Microsoft doesn't know either and just wants too much at once.

Blazor desktop is built on top of .NET Multi-platform App UI. It relies on that UI stack for a native application container and native controls (should you want to use them). We are building Blazor to have startup and throughput performance on par with other desktop solutions. For developers that love Blazor and love web technologies, we think that Blazor is going to be a great choice for building desktop apps.

https://visualstudiomagazine.com/articles/2021/02/25/app-model.aspx

But still eliminate the 2-3 bug in Photino and it seems perfect.

@sharpninja
Copy link

Why wouldn't you continue to support Blazor? How much work does it add?

@hbxtlhx
Copy link

hbxtlhx commented Mar 23, 2021

‎I don't know what effect Microsoft will achieve, but Photino has done a lot. ‎
‎ Just solve the current Photino bugs and let it run smoothly. ‎
‎ This is countless times better than waiting for Microsoft's uncertain results. ‎

@DavidMcGaha
Copy link

I sought out Photino due to its support of Blazor. This, when working as expected, creates the easiest way to create a truly cross-platform app, at least in my opinion. And I have been reviewing the different methods to build for release on Linux for my next work project. As a matter of fact, I would be just as interested in a Linux only way of doing desktop dev with Blazor using an html interface.

@ottodobretsberger
Copy link
Contributor

At this point in time we have a lot of work in the Native and .NET areas of Photino, and due to being short staffed for this, it's not on the top of our priority list.
We would certainly appreciate the community helping us out in this area!

@DavidMcGaha
Copy link

It seems to me (and I may be incorrect, so please inform me if I am wrong) that this project took a product designed to create Blazor coded Electron-like applications ( which even Steve said he had to "decouple Blazor" in order to make run regular web apps) broke the code apart from a 3 project solution into 3 solutions interdependent on each, but no longer even possible to efficiently debug as a solution. And now, this has lead to the propagation of breaking changes in the lower level api's (.net and native) will forever float to higher level project(the Blazor project) making it nearly impossible to maintain by anyone.

Perhaps instead of having the folks at CODE (if that is what it is) work on Native and .Net projects constantly wagging the Blazor(dog), why not re-integrate, return the blazor primary model and implement good tooling to automate the decoupling of the Blazor to afford the Vue, React etc app. Then garner support from a larger base of users for a community.

Also, Microsoft is poorly communicating the vision for BlazorDesktop, since they are saying it is built on Maui, but Maui is not going to support Linux...so does that mean BlazorDesktop will not support Linux??

@pahosler
Copy link

Without Blazor, I can't think of a compelling reason to use Photino. Initially photinoblazor worked on Linux, I'm not sure what changed, the one thing I have noticed in VSCode debug is that the path to the razor files aren't mapping to the right place. I don't know how to fix that, I'm a newby to dotnet stuff.

So for me, I'm trying to move further away from javascript, I don't like Vue or Angular, and I'm bored with react. For that I might as well use Electron.

@sharpninja
Copy link

sharpninja commented Mar 31, 2021 via email

@ottodobretsberger
Copy link
Contributor

Thank you @DavidMcGaha for your comments.
The debugging experience even initially had never allowed a complete solution to debug down into the Native project.
We are currently working on a way to allow that though.
As far as the debugging into the .NET layer is concerned, that is still possible and very easy to set up. You just remove your Photino.NET nuget reference and reference the Photino.NET project instead.

Due to the uncertainty of what Blazor for Desktop will actually entail and support, we do not want to put too many resources into a Blazor - first approach. Especially if there are going to be breaking changes added to the Blazor release in .NET 6, it would render much of that effort wasted.

But yes, you are correct, Blazor for Desktop will not (at least not initially) run on Linux.

@ottodobretsberger
Copy link
Contributor

@pahosler A fix for the Linux platform has been made and will be deployed soon. If you can elaborate further on the issue of the razor files not mapping to the right places, we will be happy to look into that.

@MikeYeager
Copy link
Collaborator Author

After working with the .NET 6 and MAUI previews quite a bit and researching how to best update Blazor support for Photino, we've come to the conclusion that we will NOT be including Blazor support in the next release. Of course, the community is always welcome, and even encouraged, to continue supporting Blazor, but among the core team, we don't think it's a good investment in time and effort. The original implementation pulled parts of the Blazor source code from upstream GitHub repos. There have been big changes in Blazor source code, including moving the source into the main ASP.NET repo that preclude a painless update to the latest source. We're happy to help in any way we can, but getting V2 out the door for Native and .NET use is our priority. V2 includes many new features, bug fixes and ease of use updates that allow us to get past some major roadblocks, especially in the area of multiple window support while introducing the smallest number of breaking changes we can manage. It also makes adding features and options MUCH easier moving forward. If you'd like to contribute by updating Photino.Blazor, based on V2, please let us know and we'll bring you up to speed on the changes.

@sharpninja
Copy link

Sooo... how to support Linux clients? MAUI doesn't do desktop Linux.

@peerem
Copy link

peerem commented Jun 25, 2021

For us that now means that we will stay with Chromely, because MAUI is not an equivalent replacement. The advantage: we have a one hundred percent controlled browser environment.

@congzhangzh
Copy link

For us that now means that we will stay with Chromely, because MAUI is not an equivalent replacement. The advantage: we have a one hundred percent controlled browser environment.

Hope webview2 will cross platform some day!

@congzhangzh
Copy link

After working with the .NET 6 and MAUI previews quite a bit and researching how to best update Blazor support for Photino, we've come to the conclusion that we will NOT be including Blazor support in the next release. Of course, the community is always welcome, and even encouraged, to continue supporting Blazor, but among the core team, we don't think it's a good investment in time and effort. The original implementation pulled parts of the Blazor source code from upstream GitHub repos. There have been big changes in Blazor source code, including moving the source into the main ASP.NET repo that preclude a painless update to the latest source. We're happy to help in any way we can, but getting V2 out the door for Native and .NET use is our priority. V2 includes many new features, bug fixes and ease of use updates that allow us to get past some major roadblocks, especially in the area of multiple window support while introducing the smallest number of breaking changes we can manage. It also makes adding features and options MUCH easier moving forward. If you'd like to contribute by updating Photino.Blazor, based on V2, please let us know and we'll bring you up to speed on the changes.

Too pity to hear it, maybe we can use a light wrapper to continue this project? Like https://github.com/congzhangzh/desktoploveblazorweb

The Photino.Native, and Photino.Net solve the problem of browser depend problem, and the roadmap is really a great future.

@MikeYeager how about? It’s very dangerous to complete drop blazor support, as no blazor no .net

@congzhangzh
Copy link

For us that now means that we will stay with Chromely, because MAUI is not an equivalent replacement. The advantage: we have a one hundred percent controlled browser environment.

Maui will solve some problem, but it will never be a popular choice in my opinion!!

@DavidMcGaha
Copy link

When I look at Maui, I see the need to drop support for Windows and Mac from Photino, and be the Blazor Desktop solution for Linux that Microsoft says is coming from the community! Very disappointing, indeed.

@congzhangzh
Copy link

Linux
I will not use MAUI, web stack will give more power and possible, I do not want to wait but finish work and improve ii by myself, If you choose MAUI, you cant, that all depend on MAUI team. After the wonderful WPF, what we can expect from Microsoft team!

Use Blazor’s reactive style + powerful components maybe a good idea, like:

https://github.com/ant-design-blazor/ant-design-blazor
+
https://github.com/congzhangzh/desktoploveblazorweb
+
https://github.com/tryphotino/photino.NET

that will be the real small, smart, useful, and controllable by community itself!

@davidjeba
Copy link

Newbie question:
Can Photino be used to create PWA [Progressive Web Apps]?

@MikeYeager
Copy link
Collaborator Author

@davidjeba No, Photino creates a native desktop window (Windows, Linux or macOS) and runs a browser control that takes up the whole window so that a Web UI can be used in a desktop application, whereas a PWA is a web application that runs in a standard browser with no native window.

@peerem
Copy link

peerem commented Aug 1, 2021

Thats really sad. I tried using our Blazor app with MAUI, it's a disaster. That would have been a chance for this project, otherwise I don't see any use for this project.

@En3Tho
Copy link

En3Tho commented Dec 11, 2021

Maui is a disaster for sure (at least for now). Workloads always break and conflict with each other. Every new release something breaks with no error messages (native windows at least, android seems to work fine at least on real device). Not to mention that it's tied to this new kind of windows shop apps (instead of simple exe). Also, maui is w/o linux support.

I would really like to see this project going on but at the same time I understand that it might be time consuming and if result of that effort is not really used/appreciated by people then it's not worth it.

@MikeYeager
Copy link
Collaborator Author

@En3Tho Agreed about MAUI. We did merge some pull requests from the community and publish a new version recently and are happy to continue doing so. We just have our hands full ensuring the C++ and .NET components (which the Blazor component is built on) are kept up to date. As long as the community keeps working on the Blazor implementation, we'll keep putting updates out.

@tomlm
Copy link
Contributor

tomlm commented Jan 10, 2022

I have rewritten Photino.Blazor to use Microsoft.AspNetCore.Components.WebView which is the library that backs MAUI, WPF, WinForm Blazor pages.

Here is the PR: #30

Can we revisit Blazor support :)

@MikeYeager
Copy link
Collaborator Author

Photino.Blazor is now updated to use .NET 6. Many thanks to @tomlm!!!

Bugs automation moved this from Needs triage to Closed Jan 13, 2022
@peerem
Copy link

peerem commented Jan 15, 2022

I'm so glad Photino Blazor is back. Currently, we ended up having a Blazor Server app that had either Chrome or Edge launched in "App Mode". Chromely was also unsuitable, since CEF did not support important codecs and all dialogs (save/open file) were missing under Linux.

The easiest way for me to express the difference between Photino and MAUI is in pictures:

This is what Blazor developers wanted and Photino delivers:

https://img.gartenjournal.net/wp-content/uploads/schaukel-befestigen.jpg

This is what Microsoft is building with MAUI:

https://www.moz.de/imgs/38/8/0/5/7/6/7/1/3/tok_ee0a4e78978f4f6d794a8c8fb163a938/w1176_h662_x750_y499_95e6a6929bdfaaaf.jpeg

But there are still 2 problems. The following has no effect, the window opens in a random size and we still don't have access to the camera and microphone:

app.MainWindow.SetMaximized(true);
app.MainWindow.SetGrantBrowserPermissions(true);

@MikeYeager
Copy link
Collaborator Author

@peerem Currently SetGrantBrowserPermissions(true); is not supported on Linux or Mac. We will support it as soon as it's available to us.

SetMaximized(true); works for me on Linux, but not in WSLg. Which distro of Linux are you using and are you running it in WSLg?

Please create a new issue in Photino.NET if you'd like to follow up with this.

@peerem
Copy link

peerem commented Jan 20, 2022

We misunderstood each other. I mentioned Linux only to clarify why "Chromely" or CEF is not useful for us.

We currently test Photino exclusively from Visual Studio under Windows in debug mode. These are our settings:

app.MainWindow
    .SetUseOsDefaultSize(false)
    .SetMaximized(true)
    .SetTitle(Globals.AppName)
    .SetIconFile("peerem.ico")
    .SetGrantBrowserPermissions(true);

The launschSetting:

{
    "profiles": {
        "PeerEm.Desktop": {
            "commandName": "Project",
            "environmentVariables": {
                "ASPNETCORE_ENVIRONMENT": "Development"
            },
            "applicationUrl": ""
        }
    }
}

On the topic of access to camera and microphone we get the following JavaScript Error. According to documentation, we get this message when the page is not running in a secure context (https).

TypeError: Cannot read properties of undefined (reading 'enumerateDevices')

We had already opened Issues for both points in the past.

tryphotino/photino.NET#25
tryphotino/photino.NET#20

@MikeYeager
Copy link
Collaborator Author

@peerem The code above doesn't specify StartUrl or StartString. What is it trying to navigate to on startup?

@peerem
Copy link

peerem commented Jan 27, 2022

In Visual Studio it works with and without specifying the StartUrl. But now we have added this line:

app.MainWindow.StartUrl = "/index.html";

@aabluedragon
Copy link

aabluedragon commented Apr 17, 2023

Yes! x10
this is a very useful usecase, Photino with Blazor.
Please don't drop it, at least not before .NET Maui has proper support for linux, and even then, not sure if worth giving up on the Photino+Blazor stack.
Currently it's the only lightweight alternative to Electron.NET that is truly cross platform, as far as I know.

@billqian
Copy link

Yes! please, it's so great!

@MilesFan
Copy link

MilesFan commented Jun 2, 2023

Please continue this awesome project. Microsoft seems to insist on msix package that either tight-couples with Windows Stores, or requires side-loading that introduces complexity. We choose Blazor for simplicity, but don't want to end up with complexity.

@En3Tho
Copy link

En3Tho commented Jun 4, 2023

I can relate. I don't know what has changed recently in Photino nugets but I've finally been able to run my test app on linux and that was awesome! Thank you guys!

@JensNordenbro
Copy link

I would say Blazor is the kille feature of Photino!

@charleypeng
Copy link

i like photino blazor better than maui blazor, since Microsoft seems just don't like the linux gui community :p

@Kizari
Copy link

Kizari commented Apr 16, 2024

For whatever it's worth, Photino Blazor is still very important even today. Despite years since this issue was first opened, MAUI is still a buggy cumbersome mess with a horrible development experience, and Microsoft still have no plans to support Linux. Electron.NET is seemingly on life-support, is heavier than Photino, and as far as I'm aware executes the .NET code via WASM when using Blazor. Same issue with Avalonia+Blazor. Photino is the one option that seems to have parity with BlazorWebView (WinForms/WPF/MAUI) while also being a better, lighter experience with Linux support.

As such, I'll be sticking with Photino Blazor for the foreseeable future, and will contribute to it where I am able to. Thanks to you and all the contributors to Photino and Photino Blazor for the existence of this project.

@kimdiego2098
Copy link

Please continue this awesome project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
All OS question Further information is requested
Projects
Bugs
Closed
Development

No branches or pull requests