Daddoon / BlazorMobile

Create full C# driven hybrid-apps for iOS, Android, UWP & Desktop with Blazor!
MIT License
413 stars 55 forks source link

How does this compare with Mobile Blazor Bindings? #219

Open ganinja opened 4 years ago

ganinja commented 4 years ago

Does one have anything the other doesn't? Which is easier to use?

Daddoon commented 4 years ago

The main difference is that BlazorMobile allow you to develop an hybrid mobile app with the regular Blazor framework, meaning a web app under the hood + native end if needed.

Mobile Blazor Bindings allow you to use Blazor syntax with Xamarin in XAML but you are not doing any web code. It’s not targeted as a web development framework.

BlazorMobile is regular Blazor Web app with some additional things for easy interoperability with Native side.

So:

Blazor : HTML / CSS / JavaScript / C# BlazorMobile : Same plus access to native C# and device capabilities (Xamarin / Xamarin.Forms) Mobile Blazor Bindings: XAML / C# / native device capabilities (Xamarin / Xamarin.Forms)

ganinja commented 4 years ago

Hi looking at the latest Blazor Bindings is seem to support HTML/CSS also? The latest demo seems to have a XAML page and a html page. Don't know about Javascript. I'm looking at both, trying decide which way to go.

ganinja commented 4 years ago

At least that's how I interpret it: https://docs.microsoft.com/en-us/mobile-blazor-bindings/

Daddoon commented 4 years ago

It seems to be new ! Don’t know about web / native communication with their new support, but it’s a very good move.

I will take a look too, maybe I will deprecate BlazorMobile in the future then. My plugin was here since like 2 years, but now if Microsoft integrate all this too...

Thanks for the information by the way.

As I would say, I don’t know the maturity yet of their own implementation in Mobile Blazor Binding, but you have the advantage of knowing that Microsoft teams are behind it if you need extensive support.

ganinja commented 4 years ago

The HTML is important, but it looks like I can use the MSAL library in either if need be. If you see any red flags let me know.

Daddoon commented 4 years ago

As both run on top of Xamarin , you should be able to use MSAL in native or in the webpage with regular Blazor depending your need. You may even add Mobile Blazor Bindings to BlazorMobile template as it’s standard Xamarin.

So I don’t see any red flag in my opinion.

Even if you change your mind, it should not be complicated to switch to one to an other

ganinja commented 4 years ago

Thank for your help.

arivera12 commented 4 years ago

It seems to be new ! Don’t know about web / native communication with their new support, but it’s a very good move.

I will take a look too, maybe I will deprecate BlazorMobile in the future then. My plugin was here since like 2 years, but now if Microsoft integrate all this too...

Thanks for the information by the way.

As I would say, I don’t know the maturity yet of their own implementation in Mobile Blazor Binding, but you have the advantage of knowing that Microsoft teams are behind it if you need extensive support.

This is new to me also I didn't know we could mix xaml and html together.

I don't think we should deprecate this projects cause its still ports for more platforms than blazor mobile bindings.

Going entire or mixed xaml we will lose portability to other platforms at the end if microsoft doesn't support them.

Daddoon commented 4 years ago

@ganinja Just a side note i was thinking about MSAL support. I don't know exactly how this is managed in the current state, i already used JWT instead, but keep in mind:

I think this is not guaranteed on theses cases as this is not a regular app with a remote domain / certificate when running, compared to a full web app on the web or PWA that internally use the real domain at runtime.

However,in both case i think that MSAL on Native side should works as it will be fully standard. I think you may have to do some test if you hare targeting MSAL from a Webview in a Native app.

As i said before, i don't know what is the internal mecanism, but if you can be able to fetch and feed this protocol later in your app logic, maybe you can workaround theses specific issues, but i'm not a MSAL expert, only tested similar things with JWT.

Daddoon commented 4 years ago

It seems to be new ! Don’t know about web / native communication with their new support, but it’s a very good move. I will take a look too, maybe I will deprecate BlazorMobile in the future then. My plugin was here since like 2 years, but now if Microsoft integrate all this too... Thanks for the information by the way. As I would say, I don’t know the maturity yet of their own implementation in Mobile Blazor Binding, but you have the advantage of knowing that Microsoft teams are behind it if you need extensive support.

This is new to me also I didn't know we could mix xaml and html together.

I don't think we should deprecate this projects cause its still ports for more platforms than blazor mobile bindings.

Going entire or mixed xaml we will lose portability to other platforms at the end if microsoft doesn't support them.

@arivera12 In both case BlazorMobile or Mobile Blazor Bindings, XAML will not be supported if you execute your app on Electron, but it will be ok on other platforms.

From what i read in the doc, no you can't mix XAML Blazor and Web Blazor, but you can now load a kind of lightweight webview in your XAML code if needed (or programatically i think) that will be able to open and run a static Web Blazor app, like BlazorMobile.

Don't know yet how the mecanism works. Maybe i will take a look when i have some time to look at.