Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

How does this compare with Mobile Blazor Bindings? #219

Open
ganinja opened this issue Jul 30, 2020 · 10 comments
Open

How does this compare with Mobile Blazor Bindings? #219

ganinja opened this issue Jul 30, 2020 · 10 comments

Comments

@ganinja
Copy link

ganinja commented Jul 30, 2020

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

@Daddoon
Copy link
Owner

Daddoon commented Jul 30, 2020

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
Copy link
Author

ganinja commented Jul 30, 2020

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
Copy link
Author

ganinja commented Jul 30, 2020

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

@Daddoon
Copy link
Owner

Daddoon commented Jul 30, 2020

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
Copy link
Author

ganinja commented Jul 30, 2020

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
Copy link
Owner

Daddoon commented Jul 30, 2020

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
Copy link
Author

ganinja commented Jul 30, 2020

Thank for your help.

@arivera12
Copy link

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
Copy link
Owner

Daddoon commented Jul 31, 2020

@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:

  • On BlazorMobile, the current implementation clear web cache and cookies at each startup. Meaning that if MSAL as a web version rely on such storage mecanism it will not works as expected. As for how i managed with JWT, i simply store the token on the native side when fetched, and restore it when the app start, as i can communicate between Web and Native.

  • On Mobile Blazor Bindings, i don't have tested myself, but depending also how this is managed on the web version, does it works out of the box ? I don't know, i don't know what is the protocol used internally when "running" Blazor web in it, and if something prevent it (does cache and / or localstorage cleared ?)

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
Copy link
Owner

Daddoon commented Jul 31, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants