News for hackers. Stuff that matters.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by capelio on Sunday October 22, 2017 @03:47PM (#15528559)
Even so, Java is now at a place where you can ship self-contained, zero-dependency applications that are comparable in size to other compiled languages (and superior to web-hybrid options like Electron).

For cross-platform desktop GUI apps, I would argue that JavaFX combined with Java 9 modularization is hands-down the best choice available today.

Electron is succeeding in the desktop GUI space because it tears down the barriers to desktop app development. While the author's article is excellent, when it comes to Electron, he (like most engineers) is still missing the point: the choice between Electron and its alternatives doesn't pivot on file size.

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by ssijak on Sunday October 22, 2017 @04:42PM (#15528819)
Well, will see how Electron will pan out in the end. While I dislike default Java Swing GUI (it can be made easily to look native but many devs previously did not do it), JavaFX can be made to look like anything with almost weblike feel to development and animations. Now, more than the looks I dislike the slowness and utterly unacceptable memory Electron apps consume. I ditched Electron and VSCode (it is a little better than Atom) because I don`t want to have my text editor eat 500mb ram to open 1 medium file and crash on large ones. Same for Slack and other Electron apps. And it is not even funny to see dev console when some Atom plugin or whatever crash. I`m interested how many devs also ditched this two editors ONLY because of Electron bloat.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by jrs95 on Sunday October 22, 2017 @10:42PM (#15530306)
I'm using JetBrains IDEs now instead. They're definitely not lightweight, but it's built in functionality is generally a lot more stable than what I get with text editors + a lot of plugins.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by pjmlp on Sunday October 22, 2017 @04:46PM (#15528837)
Electron pop culture made me buy Sublime Text.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by ssijak on Sunday October 22, 2017 @06:22PM (#15529315)
For me it finally pushed me enough to switch to Vim for web dev work. But I do have Sublime for just in case.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by jjoonathan on Monday October 23, 2017 @01:21AM (#15530894)
What a breath of fresh air Sublime is.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by threatofrain on Sunday October 22, 2017 @08:38PM (#15529884)
There are probably more people hopping onto VS Code than people jumping off.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by cyberpunk0 on Sunday October 22, 2017 @08:24PM (#15529828)
Probably not many. They are too busy developing instead of over obsessing over small performance gains
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by shakna on Monday October 23, 2017 @01:21AM (#15530893)
My cursor lagging is not a small concern. It disrupts the flow between code being re/written and the mental model I'm trying to pour out.

Text input lag is an issue every editor has to deal with, and many go to extreme lengths to optimise it. Electron makes it far more difficult than most editors to fix, and every lag issue opened on VS Code seems to get decent attention, (and patches), and comparisons to Sublime Text.

Seems to be something I'm not alone in caring about.

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by jrs95 on Sunday October 22, 2017 @10:32PM (#15530272)
It's not a small gain for me, it's basically a necessity for keeping RAM low enough. I have 16GB on my work machine, and that's barely enough.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by KGIII on Sunday October 22, 2017 @11:12PM (#15530437)
Your comment ties in so very well with an above exchange concerning resultant binary sizes. RAM was once $100 for a MB, I paid $400 for 4MB of RAM.

Shocking, when I look back at it.

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by aaomidi on Sunday October 22, 2017 @04:40PM (#15528812)
Yes, but it's electron.

I've honestly seen only one properly written Electron app and it's VSCode. Everything else electron sucks. VSCode is not great either but it's much better than say, Atom or Slack.

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by bpicolo on Sunday October 22, 2017 @05:16PM (#15528988)
Discord is great
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by Spivak on Sunday October 22, 2017 @08:23PM (#15529826)
Sure, but Discord's web app and their native app are basically equivalent. The native app gives a little more system integration (like global hotkeys and direct access to sound hardware) but fundamentally the Discord app is just a webview.

I don't think anyone doubts that a high-quality website wrapped in a webview won't be at least the same quality. The question is whether "web-native" platforms can do more than just be a branded browser.

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by supergreg on Sunday October 22, 2017 @05:35PM (#15529080)
So is gitkraken.

But I assume these apps have spent a considerable amount of time in optimizing electron, which not everyone can do.

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by erikbye on Sunday October 22, 2017 @06:14PM (#15529280)
While some may find GitKraken visually pleasing, it can't be used for big repos; didn't even manage to open a few of the ones I tried.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by crispinb on Sunday October 22, 2017 @10:36PM (#15530287)
I was curious as I've never found a standalone visual git client I liked as much as IntelliJ's integrated one. So I downloaded it, found it was 1/4 of a GB and wouldn't look at a local repo without logging in to a web service. Deleted.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by SOLAR_FIELDS on Monday October 23, 2017 @12:56PM (#15534636)
I still haven't found anything better than IntelliJ's triple column view for resolving merge conflicts. Is there anything similar in a more lightweight editor?
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by icebraining on Monday October 23, 2017 @01:10PM (#15534760)
If you don't mind having it separate from your main editor, Meld is great.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by SOLAR_FIELDS on Monday October 23, 2017 @04:05PM (#15536506)
Interesting that this is touted as one of the "best" uses of Meld[0]. Will try this out tomorrow.

0: http://meldmerge.org/help/resolving-conflicts.html

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by friendzis on Monday October 23, 2017 @01:24AM (#15530903)
Some years ago I was evaluating GUI git clients (the landscape has changed since) for rather simple flows and found SmartGitHg simple enough to setup and explain in under an hour and powerful enough not to drop to a shell. No affiliation here.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by philliphaydon on Monday October 23, 2017 @01:21AM (#15530896)
It never used to require logging in but the moment they added that I deleted it.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by richardwhiuk on Sunday October 22, 2017 @06:27PM (#15529350)
Slack?
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by blueline on Sunday October 22, 2017 @08:03PM (#15529764)
stutters horrendously very often for my work setup (~800 people). also eats tons and tons of memory and kills my battery
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by cyberpunk0 on Sunday October 22, 2017 @08:28PM (#15529842)
Anecdotal problems
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by KGIII on Sunday October 22, 2017 @11:21PM (#15530475)
Another anecdote; your comment is the only one I've ever noticed that appears to be defending Slack. From an outsider looking in, I'm not sure why it is so popular.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by always_good on Monday October 23, 2017 @03:50AM (#15531471)
It's popular because technical superiority isn't why people use software.

For example, Spotify eats 100% CPU if I leave it open for 24 hours yet I don't think I've met someone in the last year that doesn't have Spotify running on their computer.

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by KGIII on Monday October 23, 2017 @11:59AM (#15534134)
If it helps, I don't have Spotify.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by NikolaeVarius on Sunday October 22, 2017 @09:07PM (#15529985)
Slack takes up 1.3 gb of RAM if I don't restart it at least once a week
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by Avshalom on Sunday October 22, 2017 @05:24PM (#15529021)
>tears down the barriers to desktop app development

Yes, then it replaces them with the barriers to web app development.

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by Spivak on Sunday October 22, 2017 @08:17PM (#15529815)
Sure, but more companies have the story of needing a web app anyway which requires a specific tech stack. So you can either maintain two tech stacks or you can port your webapp to native.

Having a beautiful, easy to develop, and easy to maintain native stack means nothing when you don't have an answer to, "How do we then reuse our code in a browser?".

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by pjmlp on Monday October 23, 2017 @02:42AM (#15531155)
You don't.

Use the browser for what it was meant for, hyperactive documents.

Everything that matters is on the backend accessed via Web APIs.

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by _sh on Sunday October 22, 2017 @06:24PM (#15529334)
Electron sits in the same hybrid space as Cordova/Phonegap, and will suffer the same fate once React Native, or something similar, starts eating its lunch.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by Can_Not on Monday October 23, 2017 @12:33PM (#15534446)
There are some ReactNative alternatives calling themselves "native" that are only "native looking css in a webview". The future will probably only get more ambiguous.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by profalseidol on Sunday October 22, 2017 @09:09PM (#15529990)
I can be, for very small very cheap devices.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by gdfhhgddhjj on Sunday October 22, 2017 @08:08PM (#15529781)
It’s really not clear what the electron app even provides over the same app in chrome. Its own icon, sure, but the behavior is just as bad as on the web—just take slack for example.
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by cyberpunk0 on Sunday October 22, 2017 @08:27PM (#15529837)
It offers access to file system and system resources as well as multi platform build support. Developers like all people will whine over anything. For students and indie devs who have little time, support, and resources things like electron are great
Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by gdfhhgddhjj on Sunday October 22, 2017 @08:33PM (#15529865)
Right, but does eg slack actually use any of that? It’s not a great native client by any stretch—it doesn’t use a native UI, it’s not particularly snappy, and it doesn’t do any special integration. So, it seems that electron is mostly a way to distinguish certain sites from others, not that they provide a better experience.

Granted I do like the distinct app icon. But electron should mean more than that to qualify as meaningfully native.

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by alexasmyths on Monday October 23, 2017 @08:36AM (#15532662)
What electron gives Slack is A) local install and B) proper notifications.

So Slack gets an icon on the homescreen and possibly offline notification + notification integration with the OS.

That might be pretty limited from a technical perspective, but it's a massive product thing from a product perspective.

Also, it's possible they may use file access for caching/storage etc..

Re:Using Java 9 Modularization to Ship Zero-Dependency Nativ... by 0xFFC on Sunday October 22, 2017 @08:29PM (#15529847)
Not closing and losing your data when your chrome crashes?