Live data from Hacker News

WebWindow, a cross-platform webview library for .NET Core

blog.stevensanderson.com

41–50 of 55 posts

Re: WebWindow, a cross-platform webview library for .NET Core

#41
post #25
post #8

Has anyone experience with Blazor in production? I would like to jump into it but it still feels a little immature to me.

I would recommend starting with the server-side variant of Blazor on a non-production test app to familiarize yourself. You can easily move to client-side WASM mode once you need to (or feel comfortable doing so) without any major changes to your codebase. Our long term plans (aka by end of 2020) are to rewrite all of our internal tooling from SPA (RiotJS) w/ JSON APIs to server-side Blazor. The principal motivations…

I created an account to say this:

Someone has written a wrapper for Local/Session storage for you, so you don't even need to write your own jsInterop for them: https://github.com/BlazorExtensions/Storage

Re: WebWindow, a cross-platform webview library for .NET Core

#42

My biggest problem is that WKWebview on Mac just seems so slow compared to Chrome. I have a canvas in my application and it just doesn't seem to render as efficiently as it should or with ease as it does in Chrome. Does anyone experience similar issues?

It might have to do with the retina settings that rescale after rendering. I had this issue when we were testing 3DC.io on some Macbooks. Play around with the scale and css a bit, there is some information on Stack Overflow if you search for canvas+retina. Edit: Also check out devicePixelRatio, that might be causing the issue as well.

Ohh! That actually was it. My canvas was a very large size - like 1900x1200 and Safari drastically slowed down - I readjusted for it to only take page height and width and it works nicely again. Thanks!!

Re: WebWindow, a cross-platform webview library for .NET Core

#43
post #25
post #8

Has anyone experience with Blazor in production? I would like to jump into it but it still feels a little immature to me.

I would recommend starting with the server-side variant of Blazor on a non-production test app to familiarize yourself. You can easily move to client-side WASM mode once you need to (or feel comfortable doing so) without any major changes to your codebase. Our long term plans (aka by end of 2020) are to rewrite all of our internal tooling from SPA (RiotJS) w/ JSON APIs to server-side Blazor. The principal motivations…

> determine what a clean JSON API contract looks like, write all the boilerplate for controllers

Isn't this what GraphQL suppose to solve?

Re: WebWindow, a cross-platform webview library for .NET Core

#44
post #38

This looks like a nice solution to save some time for cross-platform developers on .NET Core. I'm sure we're going to see a lot more of this once the new Chromium version of Edge is released mid Jan 2020 (which will include the new webview2 component). If you don't want to add an external library to do this, or your source is already platform dependent, just use the default web view component of each operating system…

I think setting x-ua-compatible ie=edge doesn't mean use the Edge EdgeHTML engine - it means enabling "Edge mode" in IE, which means "the latest available version of IE" and you end up with IE10 or IE11. EdgeHTML can be embedded, but only using the WinRT API, not the ActiveX WebBrowser control.

Welcome to the web, where browsers are named after existing browser concepts in as confusing a way as they can come up with. “You know how browsers have chrome around the web content, and how that’s the accepted term of art? Let’s call our browser Chrome!” “You know how we can tell IE to run in edge mode? Let’s call our replacement browser, which IE compatibility mode won’t be able to use, Edge!”

Re: WebWindow, a cross-platform webview library for .NET Core

#47

Earlier quoted context omitted.

It might have to do with the retina settings that rescale after rendering. I had this issue when we were testing 3DC.io on some Macbooks. Play around with the scale and css a bit, there is some information on Stack Overflow if you search for canvas+retina. Edit: Also check out devicePixelRatio, that might be causing the issue as well.

Ohh! That actually was it. My canvas was a very large size - like 1900x1200 and Safari drastically slowed down - I readjusted for it to only take page height and width and it works nicely again. Thanks!!

No problem. I think of it as collectively saving the mankind another 10 hours of debugging.

Re: WebWindow, a cross-platform webview library for .NET Core

#48
While this definitely sounds like a good alternative to everything bundling its own Electron, I do have some questions.

To make sure I understand how viable this solution is...

> On Windows, WebWindow uses the new Chromium-based Edge via webview2, assuming you have that browser installed (it could fall back on older Edge if you don’t, but I haven’t implemented that)

So this will currently only work for those running the absolutely newest version of Windows 10?

(But if the user does, you get a reasonably up to date and capable web-engine, which sounds good)

> On Mac, it uses the OS’s built-in WKWebView, which is the same technology behind Safari

Sounds decent, I guess?

> On Linux, it uses WebKitGTK+2, which is yet again a WebKit-based technology

Isn't WebKitGTK horribly outdated, or have things improved recently? Couldn't that be a source of issues down the road?

Re: WebWindow, a cross-platform webview library for .NET Core

#49
post #25
post #8

Has anyone experience with Blazor in production? I would like to jump into it but it still feels a little immature to me.

I would recommend starting with the server-side variant of Blazor on a non-production test app to familiarize yourself. You can easily move to client-side WASM mode once you need to (or feel comfortable doing so) without any major changes to your codebase. Our long term plans (aka by end of 2020) are to rewrite all of our internal tooling from SPA (RiotJS) w/ JSON APIs to server-side Blazor. The principal motivations…

I absolutely see the benefits of using Blazor. But it feels immature because I see a lot of tutorials with ways to work around little bugs and problems.

But orcourse those tutorials could be from before the official launch which was just some months ago.

I think Blazor looks a little like Phoenix Live View. And imho this is the way to go. It is way more productive for the reasons you describe as well.

Re: WebWindow, a cross-platform webview library for .NET Core

#50

This is very exciting, thanks for creating this! I've been hoping for a way to build native apps via web technologies without the bloat. Please let this be it. .NET is such a good runtime.

We're doing it. It's (misleadingly) called server side Blazor. The UI is seamlessly and naturally web, while 95% of the logic is plain old C# running on the plain old core CLR.
Post reply on HN