Live data from Hacker News

Show HN: Hacker News desktop application in Kotlin/Swing

github.com

71–80 of 92 posts

Re: Show HN: Hacker News desktop application in Kotlin/Swing

#71

Some suggestions: 1) don't start a new project in Swing when you could use JavaFX instead. Since you're using Kotlin, you'd also want to use TornadoFX, a nice DSL for JavaFX. 2) use Maven or Gradle (or hell, any build tool). Don't store artifacts in source control. I was really hoping someone who knew what they were doing was building this after the mini Electron debate earlier this week :/

Excuse a quick aside -- do you know of any good examples of real non-enterprisey apps using JavaFX? Java desktop apps seem almost universally awful, but it doesn't seem like it has to be that way. I'd love to see some counter examples (IntelliJ's IDEs are honourable exceptions, but they're a bit of a special case).

The old LoadUI (load testing tool) was written in JavaFX, you can still see the old screenshots in the documentation: https://www.loadui.org/working-with-loadui/projects.html

Also, there's LoadFX (a logging viewer) which was part of the rage post against Electron last week: https://github.com/renatoathaydes/LogFX

And Gluon keeps a list of sample apps:

http://gluonhq.com/developers/samples/

Re: Show HN: Hacker News desktop application in Kotlin/Swing

#72
post #57

Ask HN on Show HN: Why is Swing UI still so Ugly ? 2 Decades since it's introduction in 1997 ( I remember being forced to use it in a trading OMS application in 2002), Swing UI looks frozen in time, ugly as ever.

Because most developers don't bother to read Sun tutorials and books like "Filthy Rich Clients".

I'm a big fan of FRC, but a lot of those techniques are about "special-case" UIs, the way you see them in Web UIs or "multimedia" applications, not pleasing form and widget layouts. That's a bit of an intermediate step between just spewing forth UI elements and constructing fluid animated, mirrored list displays. And sadly often neglected, especially if your tools don't take care of it automatically (layout engines, Interface Builder etc.). Java and Tcl didn't have to look that bad, but sadly they often do.

Or, well, one could just use JGoodies ;)

Re: Show HN: Hacker News desktop application in Kotlin/Swing

#73
post #56

Earlier quoted context omitted.

Because Sun made the boneheaded decision (and never admitted it was dumb) to go for emulated widget controls instead of native ones. What this means is that they have had to reimplement and imitate the behavior of native controls on all platforms (realistically, Windows only) every time Microsoft came up with a new version. In contrast, IBM took the native approach with SWT / JFace, and the interfaces written with th…

The toolkit based on native widgets existed before Swing. It was called AWT.

AWT wasn't native either - it just had one ugly appearance and couldn't be themed. I seem to recall it kind of resembled Sun's CDE (Common Desktop Environment) so it would have look sort of at home on Solaris.

Re: Show HN: Hacker News desktop application in Kotlin/Swing

#74
post #73
post #56

Earlier quoted context omitted.

The toolkit based on native widgets existed before Swing. It was called AWT.

AWT wasn't native either - it just had one ugly appearance and couldn't be themed. I seem to recall it kind of resembled Sun's CDE (Common Desktop Environment) so it would have look sort of at home on Solaris.

AWT uses native widgets.

Re: Show HN: Hacker News desktop application in Kotlin/Swing

#75
post #64

Ask HN on Show HN: Why is Swing UI still so Ugly ? 2 Decades since it's introduction in 1997 ( I remember being forced to use it in a trading OMS application in 2002), Swing UI looks frozen in time, ugly as ever.

intellij is swing and it looks decent. i think it's because most people don't spend any time on appearance.

IntelliJ is what a Swing app might look like after more than a decade of work and shipping (at times) with a custom-built JRE. It's not an effort most can and should spend to get to 'decent'.

Re: Show HN: Hacker News desktop application in Kotlin/Swing

#76
post #47
post #30

The other day there was a post recommending the use of JavaFX. I would really like to see a non-trivial app built on JavaFX in Kotlin, with the following properties: - Does not look ugly. - Is not composed of _merely_ OEM widgets. But includes custom elements, like one would normally see on websites (and by extension, Electron apps). - Is lightweight and response, not just in terms of CPU and RAM, but in terms of use…

I actually did with my company and anyway it was a bad decision. JavaFX and swing customization is really not easy and not well documented. JavaFX uses custom XML which make no sense to be honest when you want to do nice design. And it requires custom CSS too. Additionally, their design are bad(I mean their Java API). We spend a whole year making an app with it, at the end we decided move away from it, like the rest…

> JavaFX uses custom XML which make no sense to be honest when you want to do nice design.

I don't see why the custom XML should be a problem. Definitely you are not supposed to edit the .fxml files by hand, especially when you have apps like Scene Builder that allow you to design everything from a GUI.

> And it requires custom CSS too.

That's true only for a few JavaFX-specific properties. The CSS syntax doesn't change very much. Also, it's not a surprising feature: QT, the C++ GUI framework, also uses custom CSS.

Re: Show HN: Hacker News desktop application in Kotlin/Swing

#78
post #34

Earlier quoted context omitted.

Bitwig, an excellent commercial cross-platform DAW, has a UI that is written with Java.

Thanks, looks interesting. Scriptable in javascript too. I always note with irony that professionals expect to pay decent money (Bitwig is $400) for software relevant to their trade; the one exception being software pros.

Programmers have a deep Stockholm Syndrome for infinitely customizable software. They’ll disparage IDEa while installing enough plugins to turn vim into an incredibly poor one. Also, there’s the typical Real Programmer BS that asserts dev tools peaked in the 70s.

Re: Show HN: Hacker News desktop application in Kotlin/Swing

#79
post #72
post #57

Earlier quoted context omitted.

Because most developers don't bother to read Sun tutorials and books like "Filthy Rich Clients".

I'm a big fan of FRC, but a lot of those techniques are about "special-case" UIs, the way you see them in Web UIs or "multimedia" applications, not pleasing form and widget layouts. That's a bit of an intermediate step between just spewing forth UI elements and constructing fluid animated, mirrored list displays. And sadly often neglected, especially if your tools don't take care of it automatically (layout engines,…

I agree with you.

Still it is a kind of first step.

Tooling was the major problem. Swing could be made to look as nice as WinForms, but defaults matter when developers are lazy.

Android is another example where if one wants to make cool Material design applications, some UI programming skill is needed.

Re: Show HN: Hacker News desktop application in Kotlin/Swing

#80
post #69

Earlier quoted context omitted.

Thanks, looks interesting. Scriptable in javascript too. I always note with irony that professionals expect to pay decent money (Bitwig is $400) for software relevant to their trade; the one exception being software pros.

Visual Studio Enterprise is $2999/year, Pro is $539. Might as well add anywhere from $400 to $1500 for the IncrediBuild license.

It's really the expectations I was commenting on more than the pricing. I have heard devs on 100k plus whinge about $80 for a professional programmers editor, and rule out IntelliJ IDEs from their consideration because they're not 'free'.
Post reply on HN