Creating a Linux Desktop App with Ruby
iridakos.com
iridakos.com
https://github.com/mherrmann/fbs
Discussion: https://news.ycombinator.com/item?id=16318677
> This project is licensed under the GPL. In simple terms, this means you can use it for free in open source projects that are also licensed under the GPL. If on the other hand you want to use the project for a proprietary app where you don't want to open source the code, then you need a commercial license. The price for one developer is EUR 79 if you purchase before Feb 11, 2018, EUR 99 after. One year of updates is included. To obtain a license, click here.
If I understand what you are saying, you say that to use the output of your program one needs to GPL everything, which is not usually how GPL is interpreted.
For example I can use GIMP to create graphics that I can use without any form of restrictions. The GPL applies to GIMP itself, not its outputs.
However, since your product builds executables then if the resulting installer file was built from GPLed code then you are partially correct IMO -- users would be required to distribute the installer source in compliance with GPL. However, while I have not looked into how the build process works for your product I have a hard time imagining that the GPL would require users to GPL the installation target source, since those are a separate set of files.
IANAL
- Highly variable window load and startup times
- Random slowdowns
- WebkitGTK has some serious memory leaks
Otherwise I'd consider GTK to be fantastic :/
Edit: Huh. The Shoes 3 development blog is actually really active! https://walkabout.mvmanila.com/
That said JavaFX controls feel very nice. Like a foreign GUI, but a nice one
As for slow startup, just be careful with library selection.
I think these tradeoffs are okay for backend services, but I agree that they don't belong in user-facing applications if it can be avoided.
I think you're thinking for SWT (the toolkit used by Eclipse) which will use native components for each OS.
SWT is kinda difficult to use and last time I checked, all the Scala bindings/wrappers were crap or non-existant, making it a non-starter for me.
JEP 283: Enable GTK 3 on Linux
http://openjdk.java.net/jeps/283
Opening paragraph "Java on Linux currently uses GTK 2. This raises several issues:"
The problem are the ones too lazy to call,
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/...When it was introduced they didn't want to break the L&F of AWT applications, then they also added multiple ways of enabling it.
So a good application should respect the system wide or user specific settings if available, instead of just blindly use whatever L&F it feels like.
Also although many complain about how Swing looks like, the API is actually quite powerfull and skinnable, even if it requires some graphic programming skills to achieve it, for example see JGoodies or UltraMixer DJ.
https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/...
---------------------------------------------------------
|Platform | Look and Feel |
---------------------------------------------------------
|Solaris, Linux with GTK+ 2.2 or later | GTK+ |
|Other Solaris, Linux | Motif |
|IBM UNIX | IBM* |
|HP UX | HP* |
|Classic Windows | Windows |
|Windows XP | Windows XP |
|Windows Vista | Windows Vista |
|Macintosh | Macintosh* |
---------------------------------------------------------
Apparently not many bother to learn how to take advantage of Swing APIs.And saying all applications should set it to SystemLookAndFeel would be wrong, as they should respect the user's settings if they exist.
_JAVA_OPTIONS='-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'> Apparently not many bother to learn how to take advantage of Swing APIs.
> saying all applications should set it to SystemLookAndFeel would be wrong
Still, you get a lot of benefit from Ruby's flexibility.
The only non-trivial Ruby based GUI I've built has ended up with a custom toolkit as a result of trying to avoid these sorts of API barriers. The building a new toolkit without the API barrier does result in some lost functionality, some NIH syndrome, but it does provide a bunch of extra flexibility.
GTK applications look very outdated/out-of-place anywhere outside linux, and especially on OS X.
While electron has its issues (large bundle size, memory footprint), it is a really flexible solution for cross platform desktop applications. It will still not have native appearance, but a modern L&F is quite easy to arrive at using CSS and libraries like react-desktop.
Relying on the browser runtime ensures that most of the form widget interactions work as users would expect them to on their own platform.
Opal[3] is a really good ruby to javascript compiler which can be used to target electron. This is particularly promising given that the hyperloop [2] ecosystem has significantly matured. Hyperloop provides a full fledged component oriented client-side development framework powered by best of breed frontend technologies/patterns like virtual DOM (through react integration [4]) and flux stores.
---
[2] https://github.com/ruby-hyperloop
Also, excessive transpilation is something people should really look down upon. Learn to work with the framework that runs, don't go and come up with CoffeeScript or w/e
GTK doesn't look dated, it just looks simple
I get the ease of development argument, but it always feels like garbage even when done "well" like Slack. VS Code is about the only thing that pulls things off OK, but even that is notably slower than alternatives and I blame nobody for sticking with Sublime.
For example:
- Pressing enter submits a form. - Clicking on a label focusses the input box. - In OS X readline style shortcuts are available in all input boxes, eg. Ctrl+a takes you to beginning to line, Ctrl+e takes you to the end etc.
When these things don't behave the way you expect them to, it really destroys the user experience. Building on browser runtime gives a lot of these platform specific accessibility features to you for free - which may not be very trivial to arrive at through cross platform native gui libraries.
https://stackoverflow.com/questions/48337401/unable-to-test-...
Not to mention electron apps are massive (Slack is 90M+ for a fucking chat client. Audium/Pidgin anyone?)
Electron is a huge step backwards really. I don't see why people praise it so much.
https://github.com/shoes/furoshiki
I'm just wondering since it says it is alpha and only supports Shoes.