5 ms·
I think this highlights the need for Microsoft to open source Edge’s new rendering engine. I’d love to be able to use the renderer in .NET Core for a whole host
by lwansbrough 9y ago
I think this highlights the need for Microsoft to open source Edge’s new rendering engine. I’d love to be able to use the renderer in .NET Core for a whole host of applications (including rendering dynamic HTML to OpenGL) but unfortunately EdgeHTML has remained closed source! With many components of the .NET stack being open sourced, and even some of the Edge stack, I had high hopes for seeing the rendering engine open sourced as well too - but no such luck.
Can anyone on the Edge team comment on this? There would be so many major use cases for this in .NET. Currently we have to use CEF but I really don’t like being forced to delegate work to Chrome - it further secures Chrome’s place as “the only browser”. Not to mention the Edge team would likely receive many benefits from open sourcing the project in the way of pull requests, even if this is a little more managerial overhead.
This has been requested on MS’ UserVoice site. Would love to see it get some love. https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/18543541-make-edgehtml-layout-engine-open-source https://wpdev.uservoice.com/forums/257854-microsoft-edge-dev...
Also, what I'd love to see would be some sort of UI subsystem that all vendors target. Something built on a protocol that can be implemented in any language, and communicated to by any other language. That way all browsers' HTML renderers would target the same UI subsystem, and any UI framework could choose to either target HTML or the UI subsystem itself, as well. That UI framework (if it targets the UI subsystem) could then be run in a different context (say a JS engine running in .NET) and its output could be routed to a .NET implementation of the UI subsystem. This would allow any components built in any language to interface and work together using a common protocol, and as long as you can host the language a given UI framework is built in, you can use it to create UI elements in whatever platform you want. I see this as being THE solution to JS/web/UI stuff - there's tons of amazing developments happening there, but we can't use them in the desktop world. I'd like to see that change, and in a way that doesn't require running an entire browser inside a desktop app.
- hacker_9 9y ago> This would allow any components built in any language to interface and work together using a common protocol No it wouldn't? How would a C++ app run my managed control built in C#? Or my JS page run components written in Rust, Java and Clojure? Unless you are expecting all of the runtimes to be bundled with the app/page too, in which case good luck with your file size and startup time...
- lwansbrough 9y agoThis is obviously true. That being said, it would enable opportunities for developers to use controls where a bridge can be made. For example, if your C# library can be made into a Windows Runtime component then it could be run by C++, and I'm sure there are other ways of running C# code in C++ as well. JS would obviously be limited - it would be as limited as it ever has been. It won't be long before one can write Rust or Java or Closure and have it compiled to web assembly. At such time, you'd be able to have your components run alongside JS as I described.
- steveklabnik 9y agoYou can already compile Rust to webassembly today!
- j_s 9y agoI voted for the Developer Feedback issue you linked. > Currently we have to use CEF [https://cefsharp.github.io https://cefsharp.github.io] https://bitbucket.org/geckofx https://bitbucket.org/geckofx What benefits would an open-source Edge provide to developers that the combination of Chrome and Firefox don't already? PS. 100% managed C# HTML renderer: https://github.com/ArthurHub/HTML-Renderer https://github.com/ArthurHub/HTML-Renderer [edited]
- yunyu 9y agoFor me, the main thing is that scrolling on a touchpad in Windows feels extremely "off" on Chrome and Firefox, while Edge manages it perfectly. Additionally, Edge has lower power consumption than Chrome.
- j_s 9y ago> Edge has lower power consumption than Chrome Thanks! This is a real differentiator. It it unfortunate that Microsoft does not currently allow hosting of the Edge renderer "by design". https://stackoverflow.com/questions/31773359/add-new-microsoft-edge-to-web-browser-control https://stackoverflow.com/questions/31773359/add-new-microso...
- lwansbrough 9y ago> PS. 100% managed C# rendering engine While this works, it's very limited in terms of HTML feature support. Not something you can give to a web developer and say "here use this to make a JS app."
- j_s 9y ago> some sort of UI subsystem that all vendors target Like the X Window System?
- matthewmacleod 9y agoThat's a glib answer, given that literally nobody writes UI code that talks directly to X for obvious reasons.
- j_s 9y agoIt was not intended as a glib answer -- can you provide any aspect of the given requirements that are not met by X11? It is an interesting exercise to consider it as an alternative to Electron. "Not hard to use" was not mentioned, but definitely correlates with popularity. Apple and Microsoft do not target it as a business decision, but X11 is available on both of these platforms with commercial support. > nobody writes UI code that talks directly to X for obvious reasons Nor would I expect them to; there are libraries to simplify that. I was pointing out the existence of a cross-platform UI protocol; X11's plight and your immediate visceral rejection provide additional insight into how well an idea like this works out in practice.
- lwansbrough 9y agoThe trouble is not in finding a solution that works on desktops for Linux, macOS and Windows -- we have that already 10 times over. What is needed is a protocol which can be targeted by the average JS UI framework creator. It needs to be fairly light weight, and exist mostly as a layer below any sort of framework. If that's X11, so be it, but I haven't seen it running in a browser before. One such use case would be a JS library which handles the protocol at a fairly low level, allowing someone to create a custom ReactJS renderer which targets the protocol instead of the DOM. Hook up a protocol receiver in your favourite native language, and now you've got native UI driven by React + JS.
- j_s 9y ago> native UI driven by React + JS. https://github.com/Microsoft/react-native-windows https://github.com/Microsoft/react-native-windows Watching how Microsoft manages this project may give an additional insight into how ideas you are suggesting would fare. (It doesn't seem to be a tire fire or anything from initial impressions.)
- Narretz 9y agoI assume EdgeHTML isn't open source because it isn't fully new like Chakra. For example, the first Edge versions had the same select box rendering bugs as Internet Explorer 11 had.
- manilafolder 9y agoRegarding native cross-platform UI frameworks, isn't this what Xwt is supposed to be (https://github.com/mono/xwt https://github.com/mono/xwt)? There's no XAML non-sense and it's an object-oriented approach to building your UI, similar to Windows.Forms. The primary benefit to it over something browser-based is start-up time. Since it's ultimately using native assemblies and there's no web server that needs to be spun up causing start-time lag. Is anyone using Xwt? The NuGet packages for it are up-to-date (but don't have very many downloads), and the official forum for it seems very dead.
- j_s 9y agoMaybe non-Xamarin-employee interest has declined sine the announcement of Xamarin Forms coming to the desktop? https://blog.xamarin.com/glimpse-future-xamarin-forms-3-0/ https://blog.xamarin.com/glimpse-future-xamarin-forms-3-0/ (2017May)
- LemurMadness 9y agoThat's good point. But one big difference between Xwt and Xamarin Forms is that Xwt supports Linux via GTK (GTK1, GTK2 & GTK3) whereas Xamarin Forms does not. Xamarin Forms also requires different code for different targets, such as: // Android Forms.Init(this, null); var androidFragment = new MyFormsPage().CreateFragment(this); // iOS Forms.Init() var iosViewController = new MyFormsPage().CreateViewController(); // UWP Forms.Init(e); var uwpElement = new MyFormsPage().CreateFrameworkElement();
- j_s 9y agoFrom the roadmap linked in that blog post: Xamarin Forms Gtk# Backend - https://github.com/xamarin/Xamarin.Forms/pull/1174 https://github.com/xamarin/Xamarin.Forms/pull/1174 It's all floating out there right now but maybe by end-of-year ("Q4 2017") there will be something solid. This uncertainty promises enough to keep people like me from evaluating alternatives.
- hacker_9 9y ago
- Const-me 9y ago> open source Edge’s new rendering engine I don’t think they’ll be useful for anything. AFAIK, Edge’s rendering engine relies on DirectX 11, Direct2D and DirectWrite. These are huge and depend on other Windows-specific stuff. There are open alternatives (OpenGL/GLES, OpenVG, Pango, Skia, etc.) but these are not as good.