News for hackers. Stuff that matters.
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by raquo on Monday September 12, 2016 @01:23PM (#12481668)
No one likes that, but

1) HTML/CSS/JS is sill the only truly cross-platform (mac/windows/linux/web/ios/android/etc.) UI platform/ecosystem in 2016, and it will probably stay that way in the foreseeable future because OS makers love their walled gardens.

2) An app's memory efficiency is not a top 10 priority of an average solo-or-small-team developer's concerns, because that's not what most users pay for.

Electron/NW.js apps will only become more common, so I hope things will improve with asm.js/webassembly/etc.

Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by fdgdasfadsf on Monday September 12, 2016 @01:50PM (#12481933)
On point (1) you've kind of loaded the comparison by including web in that list...
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by raquo on Monday September 12, 2016 @01:57PM (#12482012)
It's a common business scenario: start out as a web app, then as business picks up let's start providing native apps.

Or the other way: start out with a native app on the platform we most care about + a web app for "access from anywhere".

Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by Florin_Andrei on Monday September 12, 2016 @01:55PM (#12482002)
It would be interesting to see the evolution of memory usage for the popular platform du jour from the earliest decades until today. My uneducated guess says it will be an exponential.
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by gr3yh47 on Monday September 12, 2016 @01:52PM (#12481953)
Python would like a word with you about point 1)
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by baldfat on Monday September 12, 2016 @01:56PM (#12482005)
Well I have yet to see Python make a decent cross platform application on all of those platforms especially iOS and Android.

I love Python but people over state its benefits and effectiveness.

Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by Loic on Monday September 12, 2016 @03:21PM (#12482802)
Python is wonderful for business logic and scientific computations. HTML/JavaScript is wonderful to make beautiful interactive user interfaces.

So at the moment, I am using PyQt/PySide and load my HTML/JavaScript/ReactJS GUI in a webview with a simple bridge object between my Python code and the JavaScript code.

As soon as I need native interactions with the file system, etc., I am using Python, which is robust and proven (and I am used to it). For example, if I need a dialog to save a file, I just use QFileDialog.

At the end, because of a clear separation between the GUI and the computation/system interactions with the bridge object, I just need a different bridge object to have everything running fully online.

One point is of course that I am not developing for phones and tablets, I package everything with pyinstaller for the good old desktop users.

Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by woah on Monday September 12, 2016 @01:58PM (#12482029)
I use a network simulation software inside of lubuntu inside of a VirtualBox inside my Mac. VirtualBox is a stream of headaches, and you suffer a big performance hit. What I wouldn't give for the software to serve an http/css/js interface so that I could run it with docker or natively instead.
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by vetinari on Monday September 12, 2016 @04:01PM (#12483155)
Make sure that the virtual machine has "paravirtualization interface: kvm" setting for linux guests, that the guest tools are installed and if you really use network, adapter type: virtio-net doesn't hurt. And also, that you have enough RAM. Then, virtual machines in VirtualBox are fine.
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by woah on Monday September 12, 2016 @06:40PM (#12484267)
Thanks! Good samaritan :)
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by raquo on Monday September 12, 2016 @01:57PM (#12482021)
Honest question – how do you build cross-platform application UI in python?
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by eyko on Monday September 12, 2016 @02:05PM (#12482082)
I'm not familiar with the Python ecosystem but I imagine there are bidings for GTK, QT, or other UI toolkits. The same applies to most (popular) languages. The claim that HTML/CSS/JS is the "only" truly cross platform stack is simply not true.

The main hurdle that other languages faced was not having a native UI. For example, GTK on OSX or Windows did not feel native. Key bindings were often not native. Similar story with Java (was it Swing?).

The HTML/JS/CSS combo has exactly the same issue (it's not comparable to a native GUI - Cocoa or whatever it is.

Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by falcolas on Monday September 12, 2016 @02:10PM (#12482137)
> The main hurdle that other languages faced was not having a native UI.

Electron faces this same hurdle, but with a twist. It just doesn't care; it picks a rendering target (the web) and simply uses it everywhere. Perhaps that's the approach QT and others need to take as well: stop trying to match Apple's UI on Apple, and Windows' UI on Windows.

Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by mgkimsal on Monday September 12, 2016 @02:16PM (#12482211)
> stop trying to match Apple's UI on Apple, and Windows' UI on Windows.

Great idea, but make sure it at least looks/feels good.

I remember Swing stuff from the late 90s and... IMO the primary issue wasn't so much that "it doesn't look like Windows" but that ... it was a very poor experience.

Copy/paste/keys - yeah, that's an annoyance, but if the UI is clean, friendly, easy to understand and be productive on, people can look past the differences of the native host OS. Swing (and GTK and others) really don't provide a 'better' UX (imo).

Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by mixedCase on Monday September 12, 2016 @02:03PM (#12482069)
Kivy.
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by corv on Monday September 12, 2016 @01:53PM (#12481976)
Python on iOS?
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by nodja on Monday September 12, 2016 @02:53PM (#12482561)
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by corv on Tuesday September 13, 2016 @01:43AM (#12485861)
Interesting
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by st3v3r on Monday September 12, 2016 @03:12PM (#12482729)
Python can work on desktop, but it's solutions for mobile are iffy at best.
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by reitanqild on Monday September 12, 2016 @02:15PM (#12482201)
Java as well for basically anything but iOS.

C# might even cover that now.

Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by __derek__ on Monday September 12, 2016 @03:36PM (#12482932)
Xamarin, I reckon?[1]

[1]: https://www.xamarin.com/

Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by adamnemecek on Monday September 12, 2016 @01:55PM (#12481995)
There's also Qt but they have been moving in the web direction too.
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by lostInTheWoods3 on Monday September 12, 2016 @02:05PM (#12482086)
And don't forget JavaFX
Re:JavaScript Conquered the Web, Now It’s Taking Over the De... by adamnemecek on Monday September 12, 2016 @02:14PM (#12482196)
Do people use that?