Re:Electron considered harmful
by wotstowaway on Thursday November 24, 2016 @12:37PM
(#13031540)
Getting started with Qt is pretty easy I'd say, at least when you use Python and not C++:
import sys
from PyQt4 import QtGui
def window():
app = QtGui.QApplication(sys.argv)
w = QtGui.QWidget()
b = QtGui.QLabel(w)
b.setText("Hello World!")
w.setGeometry(100,100,200,50)
b.move(50,20)
w.setWindowTitle(“PyQt”)
w.show()
sys.exit(app.exec_())
if __name__ == '__main__':
window()
In general I think Qt is one of the best-documented UI toolkits out there, and while it surely is complex it offers a lot of modern features and is able to produce pretty great UIs.
Re:Electron considered harmful
by witty_username on Thursday November 24, 2016 @12:49PM
(#13031621)
BTW, a nice PyQt feature is that you can set properties in the class initializer:
b = QtGui.QLabel(w)
b.setText("Hello World!")
can be replaced with b = QtGui.QLabel(w, text = "Hello World!")What's wrong with JavaFX? I don't ever see it recommended, but a lot of us can do Java, and from my experience, it's way better than swing or awt.
JavaFX is fairly decent, and I agree that it's more pleasant than Swing or AWT. It's a fairly good choice for places where you can mandate or ensure that Java will be present on the client (e.g. internal line-of-business apps), but also in places where you don't need to have some ancient version to support some ancient application instead -- which cuts down on the pool a bit.
Unfortunately, most users know Java from years ago and never understood the difference between an applet or desktop application, and in the minds of some users it's still falsely stereotyped as slow or insecure.
In most shops I know, Java is being extensively used on the back-end, but almost no custom Java apps with GUIs. Most shops (and people) who could do Java on the frontend have gone to learn Mono or WinForms or WPF instead, which gives you results that feel nicer to most users.
Purely out of interest, because I might have used one without even realising it, but could you link some desktop applications written in Java that haven't been sluggish as hell or a bit broken feeling?
JEdit? Any IDE by IntelliJ? These are not JavaFX (its fairly new), but you asked for Java.
IntelliJ is a good IDE, but it's UI is far from not-sluggish.
I don't know. I did a cursory google search and came up mostly empty-handed. LoadUI is supposedly JavaFX. It's such an outlier for UI/UX though.
I'd say nothing. If you're working on JVM, it's the best choice.
You need to write it in Java? Which is the considered one of the worst language of the new generation.
I write Java, and I enjoy it.
I'm sorry to hear that :)
Re:Electron considered harmful
by qwertyuiop924 on Thursday November 24, 2016 @12:51PM
(#13031626)
TTK. It's got bindings in pretty much every language (because it's TK), but unlike plain-old TK, it doesn't look like absolute garbage, and instead takes on a vaguely native appearance on each platform.
Re:Electron considered harmful
by ta_donk_gt on Thursday November 24, 2016 @12:57PM
(#13031663)
Links? Thanks.
Re:Electron considered harmful
by qwertyuiop924 on Thursday November 24, 2016 @01:09PM
(#13031743)
There are resources scattered around, but the best resource/tutorial I could find was tkdocs: http://www.tkdocs.com
Re:Electron considered harmful
by jasonthevillain on Thursday November 24, 2016 @12:40PM
(#13031553)
Someone should!
I ran into this when teaching myself Swift last year. Learning a new language is easy. Learning the ecosystem, architecture, and some initial best practices is a sisyphean task.
But what are the alternatives? Getting started with Qt/GTK isn't nearly as easy, for example.
Maybe someone should write an intro to native GUI programming for JS devs.