4 ms·
WinRT isn't embracing JavaScript because JS is so great, but to make the platform more attractive to web developers. Same with the HTML/CSS-style toolkits. HTM
by millstone 10y ago
WinRT isn't embracing JavaScript because JS is so great, but to make the platform more attractive to web developers. Same with the HTML/CSS-style toolkits.
HTML/CSS, and Chrome tools, are definitely the better part of the web. The really terrible stuff are the JavaScript APIs. Of course there's JavaScript itself, which is gross. But there's no APIs for basic questions: where is the mouse pointer now? And is the mouse button down? How many screens does the user have? What is the width and height of this text? [1] Or anything Unicode-related. Or any sort of precise, pixel-accurate drawing. Web programming means resorting to terrible hacks all the time.
Maybe Electron has its own JS APIs that fix those issues, I don't know. But compared to making a traditional web app, it's a relief to use a real desktop API that actually has coverage of desktop capabilities.
[1] See the ridiculous lengths Atom went to just to figure out how wide a character is: http://blog.atom.io/2015/10/29/atom-1-1-is-out.html http://blog.atom.io/2015/10/29/atom-1-1-is-out.html
- nilliams 10y ago> WinRT isn't embracing JavaScript because JS is so great, but to make the platform more attractive to web developers. That may be true for WinRT, but I did not mention WinRT. XAML/WPF were around a long time before that. > Same with the HTML/CSS-style toolkits. Not sure what you're referring to but no, I don't believe that's true for the projects I mentioned. Your complaints with JS APIs are warranted, but won't apply to 90+% of apps. Still seems like an overall win to use Electron/NW.js over any other option currently.