Repository navigation
The future of Maui Blazor in terms of its creators #4199
|
@Eilon @danroth27 @davidortinau @jfversluis
Originally posted by @masoodafar in #4170 (comment) |
Replies: 4 comments
|
I'm not sure if I understand everything you're saying and asking here correctly, so apologies if I misunderstand something, but here is my take on this. There is a place for both Blazor and XAML. And even writing your UI in code with the C# Markup Extensions or Comet. I think both Blazor and .NET MAUI do different things, however, they can also work together very well. Like you said; .NET MAUI with XAML (where I say XAML, you can also do everything in code if you wish) you will see that you get a platform native app, running with platform controls exactly as you would expect them to be when building an app with iOS, Android or Windows tooling. With Blazor, you will get a hybrid app. Everything is rendered through HTML and CSS. This makes app building more accessible to people who might be more familiar with web technology. However, with .NET MAUI Blazor, it's not just a hybrid app, because you will not be limited by a sandbox as you normally would when running something through a browser or web view. With .NET MAUI Blazor you can still access all the device sensors like camera, GPS, etc. or let people do in-app purchases or leverage push notifications, but you can model your UI in a way that you already know and love. On top of that, (.NET MAUI) Blazor is also very suitable for transition scenarios. Perhaps you have a legacy WinForms app that you want to modernize. You can now incorporate a For performance; something that is meant to run on that platform, that will always have the best performance. Running something through Blazor in your app will always perform less. However, will that be noticeable apart from in benchmarks? I don't think so. Additionally, I think there is a difference in how Blazor runs through a client/server scenario and on your device. At the very least there won't be an internet connection necessary when your Blazor app is running on .NET MAUI which always is the biggest bottleneck in these scenarios. The .NET MAUI Blazor app will run on the device, no internet connection necessary apart from of course the servers you want to reach to get your data. So in terms of performance I wouldn't worry. Translating XAML to platform controls also has some overhead. I think the key question you have here is: what is the future of all of this? And to be honest, I don't think anyone knows at this point. What we're trying to do is create bridges between different worlds (web development, app development, desktop development) and make it easier for anyone and everyone to start and/or transition to any of the other worlds. Make it more accessible and empower more people to achieve more and be more productive, regardless of what type of device they are targeting. As I see it there is a place for each part of this technology somewhere. Will they all still exist in 5 years? 10 years? Maybe not. I can't look into the future, no one can. If we see that one of the things we tried to do here doesn't work out, we can't keep maintaining it for the handful of people that do decide to like it. That sucks, but that's the reality. For the foreseeable future I don't see any of the mentioned technologies going away though. If anything, I think there will be a great synergy between .NET MAUI and Blazor and they will all make each other stronger and reach a lot of new and existing developers. Apart from all this, there is also the Blazor Mobile Bindings experiment which kind of bridges these worlds together as well. This way you can "write Blazor" but it will still be translated to platform-specific controls. So you could see that more as an alternative syntax to XAML. I hope this answers your questions. Please note that this is all my personal view and opinion, not Microsofts official standpoint. |
Thank you for your good and comprehensive answer. |
|
@masoodafar @jfversluis Gentlemen, it's such a great question and answer, thank you!
If I understand this correctly, currently with Blazor MAUI, the html markups are rendered via the WebView on each platform, which from the perspective of XAML, it's just another "view" like Button, Grid etc. But with this experimental "Blazor Mobile Bindings" project, HTML will be the truly ''First-class citizen", and works similar to XAMAL. That is, there will be those new "custom renderers" for all those HTML tags on each platforms, like 'input' to 'EditText' on Android and 'UITextField' on iOS. In another word, there will be two officially supported UI markups on .Net MAUI, one being XAML and the other is HTML? And from there, we opened a gate of new world that allows us to build native apps with HTML/CSS? Please correct me if I was wrong. Thank you. |
|
What @jfversluis said is quite accurate. As far as it mostly being me working on BlazorWebView, that was just because I was the main developer working on it. We have lots of features to build and usually features get focused on by specific developers. But there will soon be several other developers also working on BlazorWebView. |
I'm not sure if I understand everything you're saying and asking here correctly, so apologies if I misunderstand something, but here is my take on this.
There is a place for both Blazor and XAML. And even writing your UI in code with the C# Markup Extensions or Comet. I think both Blazor and .NET MAUI do different things, however, they can also work together very well.
Like you said; .NET MAUI with XAML (where I say XAML, you can also do everything in code if you wish) you will see that you get a platform native app, running with platform controls exactly as you would expect them to be when building an app with iOS, Android or Windows tooling.
With Blazor, you will get a hybrid app. Every…