from Hacker News

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

by johns on 11/18/19, 3:36 PM with 52 comments

  • by throwGuardian on 11/18/19, 5:07 PM

  • by slowenough on 11/18/19, 7:09 PM

    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.

  • by yodon on 11/18/19, 4:27 PM

    This looks amazing - can you please add a license file so others can actually use it? (Hoping for MIT or if not then Apache 2.0 or BSD or whatever reflects your intent and preferences)
  • by FlorianRappl on 11/18/19, 6:42 PM

    I'm potentially the only one being skeptical. Don't get me wrong, it's nicely done (for an experiment), but we also did similar experiments several years ago.

    At the fundamental level such an approach works, but it brings several issues that are not addressed with it (in contrast to, e.g., Electron). The most pressing one being "I don't want any browser - I want a browser that I know is capable of doing what I want".

  • by fbelzile on 11/18/19, 6:55 PM

    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 (WebBrowser for Windows, WKWebView for macOS and WebKitGTK+2 for Linux) like this library does.

    To work around some of the ugliness of the old IE rendering engine used in the current WebBrowser control on Windows, just add this meta tag to the HTML file to ensure it uses the new versions of IE to render the UI: <meta http-equiv="x-ua-compatible" content="ie=edge">

    You can disable most non-native app behavior in JS (like scrolling or the default right click context menu using javascript). You're then free to use whatever front end framework you want and pass data between the web-app and native code using JSON.

  • by wayneftw on 11/18/19, 4:17 PM

    Fabulous! Standalone app sizes look to be less than half that of Electron. Wish I had more C++/Obj-C skills to help out...
  • by pjmlp on 11/19/19, 6:12 AM

    Nice work, although WebViews shouldn't be used for anything beyond displaying HTML documents.

    Either go native or go Web, hybrid apps always always feel worse than middleware frameworks.

  • by josteink on 11/19/19, 6:29 AM

    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?

  • by thdrdt on 11/18/19, 5:36 PM

    Has anyone experience with Blazor in production? I would like to jump into it but it still feels a little immature to me.
  • by catchmeifyoucan on 11/18/19, 10:37 PM

    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?
  • by gfodor on 11/18/19, 5:40 PM

    this is really interesting! i'm wondering if there's a variant of this project out there that still uses node/javascript, but similarly avoids the chromium packaging and leans on the OS's rendering engine.
  • by lightdot on 11/18/19, 4:00 PM

    This looks interesting, I'm looking forward to trying it out.
  • by ryanthedev on 11/19/19, 3:51 AM

    Beautiful MVP. I really love this idea.

    I have been tinkering around with some enterprise solutions for delivering desktop native experience for web based apps.

  • by xmichael999 on 11/19/19, 2:52 AM

    Very cool, I am hoping the project is in fact supported and maintained!
  • by jcmontx on 11/18/19, 4:38 PM

    This is fantastic. Another step in the right direction!
  • by The_rationalist on 11/18/19, 6:56 PM

    This is mostly obscoleted by https://github.com/sentialx/electron-global
  • by mscasts on 11/18/19, 4:09 PM

    Looks very cool!