143 points · by mattkol · 8y ago · 70 comments
My name is Kola I am a .NET Architect currently working on WPF projects.
I was working on a SugarCrm WPF project - https://github.com/mattkol/SugarDesk - and wanted to include a reporting module to my project. I was presented with many options and concluded that an HTML5 report will be more appropriate. That led me to Cef. However all Cef WPF implementations use bitmap rendering (https://stackoverflow.com/questions/43362301/automation-why-...). I started looking into raw html rendering. Long story short - Chromely was born. I found it a lot more challenging and rewarding, as a result, I abandoned SugarDesk to focus more on Chromely as I concluded in my mind there is almost no fully developed framework using Cef and thin native UI host without WinForms or WPF.
Summary: Chromely is a lightweight .NET/.NET Core HTML5 Chromium desktop framework alternative to Electron.NET, Electron for .NET/.NET Core developers.
Chromely builds HTML5 desktops without WinForms or WPF. Chromely is based on CEF's Xilium.CefGlue and CefSharp using thin Windows and Linux native GUI API as chromium hosts.
With Chromely, you can build SPA's HTML5 desktop apps- using Angular, React, Vue or similar - with or without Node/NPM.
For more info please go to - https://github.com/mattkol/Chromely
The OS already has two web browser controls built-in.
The good old IE has a couple of issues, but they are fixable, especially if you only display your own content.
Also there’s newer MS Edge: https://blogs.windows.com/msedgedev/2018/05/09/modern-webvie...
No, Chromely does not use WPF or WinForms. That is the main difference compared to other .NET Cef approaches. Chromely uses "thin" native GUI as host. This can be seen as an advantage or disadvantage depending on which angle you are looking at it.
You can see Chromely as an alternative to this.
A better solution is use WPF for the complete GUI.
Text & typography, raster and vector graphics are very compatible to HTML5. Effects, animations and templating are far superior. The only areas where HTML5 is winner are styling, maybe layout, and definitely the labor market i.e. it’s easier and cheaper to find a front-end developer than a WPF developer.
Also WPF is better integrated into Windows. Its easier to implement per-monitor DPI awareness (starting from .NET 4.6.2, released in 2016), easier to support accessibility (narrator & others), etc..
Is there a reason why you chose to use Ajax instead of WebSockets which has much lower latency and overhead? Not backward compatibility I hope! The spec was finalized and implemented ages ago.
However ... Ajax is one of the options of IPC, and this is common to both CefGlue and CefSharp implementations. The options are:
1. Ajax HTTP/XHR (Xilium.CefGlue, CefSharp) 2..NET/Javascript integration (CefSharp) 3. Generic Message Routing (Xilium.CefGlue)
I see 2 and 3 as the common usage for the CEF .NET community. Ajax may see less usage because it's use can result in other issues -- like cross-origin error and may be more complex for some people.
Like I said, I have just started looking into WebSocket and may soon be implemented for CefGlue apps.
I think a sprint or two to document this project better would be massively helpful and I'm willing to volunteer.
I hope you will give it another shot sometimes later.
Chromely is based on CefGlue, CefSharp that are also based on CEF. So yes, restrictions, unless overridden will pass up from base.
You still need both pair of HTML/CSS/js and C# to develop an app.
However, you can use any frontend Javascript frameworks like Angular, React that may require transpiling.
It shouldn't be that horrible anymore to do it cross browser like that, at least as long as you follow web standards and ignore Internet Explorer, requiring Windows 10 support there.
And it would make these apps, of course, absolutely tiny.
How about using that as a starting point, and have that Electron alternative focus on making cross-browser development as painless as possible instead via built in Javascript shims/polyfills where necessary, and special API calls to integrate it into the underlying OS of course (OS native notifications etc)?
The enabling technologies, like service workers and web assembly are in the early stages of being supported across evergreen browsers. These are progressive, because they work in all modern browsers, but have extra capabilities like being "installable" on forward looking systems like, Android and Chrome OS.
It is a big deal when industry is willing to work together.
That also includes Microsoft Store support for PWA apps.
Several applications in the Microsoft Store for Windows 10 have already launched or switched to PWAs (one of the most noticeable one was Twitter replaced their increasingly outdated Windows 8 application with a PWA as soon as the April Release happened).
The Android Store also supports PWAs directly in recent versions (the "Twitter Lite" application on Android is the same PWA that Windows users now get by default, and presumably will be the only first party Android Twitter client once usage of PWA-capable versions of Android rises).
Microsoft's Bing crawler is supposed to start adding "high quality" PWAs directly to the Microsoft Store as soon as it finds them on the web and minimally vets them (and will provide tools to PWA website owners to control/enhance their listings).
Google's search crawler team is also supposedly investigating lighting up automatic app ingestion into the Android and/or Chrome Stores.
CEF3 still allows single process, but it is only advisable for testing/debugging only. Multi process is recommended for optimal performance and likely some functions may not work well without it. My experience is for simpler apps, single process can still be used.
Chromely is fully configurable and allows single process usage. Please see configuration wiki page at : https://github.com/mattkol/Chromely/wiki/Configuration
Because it's proprietary software, and $8,600 gives you the right to request features and see the source for a year.
Reason for not liking webapps - what is that reason? Because of chromium/CEF?
There are a lot of potential reasons to use something like this, but having a main selling point of it being "lightweight" is just flat out lying.
What has lying got to do with a subjective definition of "lightweight". See discussion on Javascript - https://stackoverflow.com/questions/39797181/why-javascript-...
What does "lightweight" really mean?
The idea that everyone sees "lightweight" and they ONLY think of Chromium size seems an ascription of "lightweight" ONLY to chromium size. I understand that has been a more common approach to chromium based solutions. This is not it here.
I have said in a few of my comments that this is simple referring to "simpler".
See a definition of "lightweight" from wikipedia:
A lightweight programming language is one that is designed to have very small memory footprint, is easy to implement (important when porting a language), and/or has minimalist syntax and features.
https://en.wikipedia.org/wiki/Lightweight_programming_langua...
So if we replace "lightweight programming language" with Chromely, while the small memory footprint, may be arguable false, it is however easier to implememt and minimal features. Note the "and/or" part.
Because it's a whole extra web browser, using a lot of resources (much more than a native app would).
And Chromely doesn't address that concern.
The notion of Chromely not needing Node to run and may not even be needed for development should count for some difference and less use of resources, methinks.
Worse if you consider Electron.NET, you have to run a separate Asp.net server besides Node.
These are differences that made me conclude, yes, it is somewhat "lightweight" or simpler compared to them.
To me these are the advantages Chromely brings to the table.
I appreciate the feedbacks.
Chromely is relatively new, so may be soon someone may show interest and combine with Blazor. I will also take a look.
Thanks for pointing that out.
https://github.com/fable-compiler/samples-electron
Related, the ionide extension of Visual Studio Code ( https://github.com/ionide/ionide-vscode-fsharp ) is implemented with fable, and used to generate extension of vscode (electron/js based). works really well and power the F# language support of Visual Studio Code
Sure Xamarin.Forms will be a lot more "lightweight".
Chromely is an HTML desktop app.
All the options you mention will end up being traditional (with their own controls) desktop apps with HTML support. Chromely is pure HTML. Chromely is not tied to rigid frontend controls .. you can use any html/javascript/css framework you like.
Chromely does not use WinForm or WPF. Extendable to WinForms and WPF for those who want to.
So, a different approach, if you may.
It's a great project though, thanks for building it!
Thank you.
No support yet for macOS, but the plan is to make Chromely truly cross-platform. The only limitation now is the required skill. I have never developed on macOS before and do not currently have the bandwidth to learn enough.
However, as I have mentioned to others in the past, help and contributions are welcome.
No plans to support macOS?
However, as I have mentioned to others in the past, help and contributions are welcome.