I
I
Interface2017-02-11 01:02:58
Delphi
Interface, 2017-02-11 01:02:58

Do you have any GUI libraries in mind for desktop applications written in JavaScript?

For more than a year now, I have been missing a tool for developing native interfaces (GUI) of cross-platform desktop applications in JavaScript.
For those who stumble upon this question while looking for such a tool, here is a list of what is roughly similar to what I am looking for, but fully meets the requirements:
The first category is webkit-based solutions for desktop applications:

  • nw.js (NodeWebkit) - https://nwjs.io/ [Github: https://github.com/nwjs/nw.js ]
  • Electron - electron.atom.io [Github: https://github.com/electron/electron ]
  • Appjs (last commit ~2 years ago) - appjs.com
  • Brackets Shell - https://github.com/adobe/brackets-shell
  • Titanium Desktop - https://github.com/appcelerator/titanium_desktop
    https://habrahabr.ru/post/95010/

(Perhaps I missed something - write - I will add)
WebKit solutions are, on the one hand, an interesting idea and there are several good examples of how it was applied, but they all are to some extent a browser. And this is not a "native" UI. Namely: an overhead in terms of performance and space occupied (+50 MB to the weight of the application). It would not seem critical, but if the entire application is a form with 2 buttons, this is clearly out of the blue.
Also, for sure, there are solutions not on WebKit, but on a different engine or regular webView - but they are apparently not so popular.
Further (a little off topic, but still) we can distinguish a similar category for mobile development:
  • Cordova - https://cordova.apache.org/
  • Phonegap - phonegap.com
  • Ionic - ionicframework.com Ionic is based on Cordova, although it is sometimes antagonized as a "native" alternative to the latter

And here's where it gets interesting! Frameworks with native UI for mobile devices:
  • React Native - https://facebook.github.io/react-native/
  • NativeScript ({N}) - https://www.nativescript.org/
  • Titanium - www.appcelerator.com/mobile-app-development-products

These tools allow you to use native UI for mobile platforms. This is almost exactly what I need! Only I need the same, but for the desktop :(
All three have a mention of desktop applications:
Titanium - see above - on webkit;
React Native - available for macOS ( https://github.com/ptmt/react-native- macos) and for windows 10+ in UWP format: https://github.com/ReactWindows/react-native-windows .And I would like win7 support at least;
NativeScript - (no support yet) https://github.com /NativeScript/NativeScript/issues/27
And in the last category, I would put the projects closest to what I would like to see:
  • node-qt - https://github.com/arturadib/node-qt - latest commit 06/15/2014 :(
  • node-gtk - https://github.com/WebReflection/node-gtk - "This project is abandoned, it's not even a work in progress anymore :-("
  • wxnode - https://github.com/joeferner/wxNode - Latest commit da16a8e on 9 Oct 2012

These are projects that were born ~5 years ago and lasted about a year :( I would like to know why they are no longer supported.
There is also QML - but as far as I understand, JS is not limited to this. Correct me if I'm wrong!
There is also WPF - but it is limited to Windows as far as I understand
Do you have any tools in mind that:
- have a native interface (not a webview / browser etc.)
- are cross-platform
- opensource
- JavaScript is enough to create an application (not counting markup languages ​​and the like)
- allow you to create desktop apps
?
Ps he tried to make his own solution on a bunch of Delphi + javascript - i.e. using Delphi "enhanced RTTI" you can throw control classes into the JS engine (in my case, SpiderMonkey 24), which made it possible to draw native lamp windows buttons and menus. I even made a working prototype, I can share the link if anyone is interested. But in the end, the project has a number of key drawbacks:
- only windows (and I would like to have cross-platform), but this is the least of the problems;
- the project code is open, but the Delphi license does not allow such use of its IDE as far as I know;
- limitations of the js engine - SpiderMonkey 24 is es2015, and given that the delphi-javascript project, on which all this is built, is dead - everything is very sad :(
Thought about switching to Lazarus, but there is no "enhanced RTTI" from Delphi 2010+.
I also considered the mormot project, since there is a more recent SpiderMonkey 45, and the project itself is alive: https://synopse.info/forum/viewtopic.php?id=3498
If you can comment on this approach, I would be interested to listen to you . If you're interested in taking on this idea of ​​pushing lazarus control classes into SpiderMonkey 45 - I'll be thrilled! :)
Also, there was an idea not to use a separate js-engine, but to make a completely dynamic application in runtime in lazarus (i.e. creating buttons, forms, arranging them, deleting, etc. in runtime, which is not clearly possible with its RTTI) and connect it to Node.js via a socket... But such a solution now seems at least ambiguous :D
By the way, do you have, for example, similar tools so that you can control the GUI completely freely through the socket?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
P
peter23, 2017-02-16
@Interface

https://github.com/andlabs/libui

G
gimntut, 2017-02-11
@gimntut

In my opinion, there is a confusion of concepts. If you need a native application, then a render for html called webkit/blink/gecko/trident is definitely not needed. You need a js engine V8/SpiderMonkey/Chakra, but they are not that big.
What is called "enhanced RTTI" in RAD 2010 has been built into windows since XP and is called ActiveX. At one time it was actively used in VB. Moreover, JS can still be used as a language (see WSH). Only there is not much sense in this, because. 99% of js libraries are designed to work with the DOM, i.e. with webkit or other renderers, which means you have to write everything from scratch. And why, when there are already ready-made libraries written in native languages? Therefore, either Electron and all the power of js, or Delphi and all the power of VCL.

J
Jacob E, 2017-02-11
@Zifix

Almost everything can be done in QML, but some things are much easier to bring to C ++ and work with them through it.

X
xmoonlight, 2017-02-11
@xmoonlight

I myself have been looking under Lazarus, but so far I have come to one thing: a graph is taken. either BGRABitmap and everything is done manually on it.
Bonus.

D
developer007, 2017-02-14
@developer007

I use this www.awesomium.com/download

D
Dmitry Makarov, 2017-02-22
@MDiMaI666

HTA web muzzle for Windows

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question