3 ms·
Very interesting to use a redux (re-frame) like programming model for building native desktop UI's. I have done some basic stuff with it and it sure seems power
by vikeri 7y ago
Very interesting to use a redux (re-frame) like programming model for building native desktop UI's. I have done some basic stuff with it and it sure seems powerful.
For anyone interested there will be a virtual meetup 16:th of April 6PM CEST: https://www.meetup.com/sthlm-clj/events/269204900 https://www.meetup.com/sthlm-clj/events/269204900
- rubber_duck 7y agoNot really native - it's JavaFX. I love clojure but personally flutter seems way more viable for the use cases I could imagine using this.
- brabel 7y agoAs someone who used to like JavaFX and maintain a few desktop apps that use JavaFX, I have to say you're totally right. Google seems to be putting huge amounts of effort on Flutter, and it can already run on the desktop (still early stages and in alpha I believe)... JavaFX is mostly orphan right now. Oracle seems to have no interest in it... so it seems to be currently being mostly advanced by Gluon[1], which honestly, does not have the muscle to pull out something competitive with Flutter or Electron. JavaFX still has fundamental pieces missing... like setting an icon for the app or opening some URL in the system browser[2] (without using horrible hacks, which is what I've been doing - which get you lots of warnings since the module system was introduced, and may stop working soon). Not to mention no support for auto-updates, the fact that jpackage is still in "incubator" stage[3] and intentionally does not have JavaFX-specific features at all (it's just barely usable with JavaFX), the SceneBuilder, which could be such a great tool to develop UIs, similar to Lazarus, but it's nowhere as good, being in about the same unfinished state it was in around 2014, terrible documentation and lack of adoption (most examples you find online are from circa 2015, when JavaFX got a little traction)... These things all make JavaFX a very hard sell for non-developers apps (if you're a developer who does not mind installing the appropriate JVM version to run the app, JavaFX works quite well - a 1MB jar can give you A LOT of features - one of my apps, my favourite and really useful, is only a 340KB single jar and works on any JVM 8+ - and looks as modern as any Electron app). It's sad but the best way to get professional apps developed and distributed nowadays seems to be, by far, Electron (because of JS, and its stupid browser-based architecture)... but I am hoping Flutter will break Electron's hegemony soon as I have great experience developing Flutter apps on mobile and the web... Just try the online pad[4] to get a taste of what it looks like! It's amazing. [1] https://gluonhq.com/products/javafx/ https://gluonhq.com/products/javafx/ [2] https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8091107 https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8091107 [3] https://openjdk.java.net/jeps/343 https://openjdk.java.net/jeps/343 [4] https://dartpad.dartlang.org/ecb28c29c646b7f38139b1e7f44129b7 https://dartpad.dartlang.org/ecb28c29c646b7f38139b1e7f44129b...
- tosser678 7y agoHow does TornadoFX compare? it seems more focused on enterprise apps though
- brabel 7y agoTornadoFX is just a Kotlin wrapper around JavaFX. It makes writing apps much nicer, but has considerable cost in terms of even more memory usage and, obviously, due to the Kotlin runtime and lots of Kotlin wrappers for most JavaFX classes, app size.
- pjmlp 7y agoIn that regard I think React Native has much better future than Dart/Flutter, specially with Microsoft backing it now, unless Fuchsia actually gets released.
- hopia 7y agoWhy is that? You mean that you're worried about Google calling quits on Flutter sometime soon?
- pjmlp 7y agoFlutter is all about being the last opportunity to sell Dart, and I doubt that Chrome (PWAs) and Android (JetPack Composer) teams are that happy about its existence, given the political answers when questioned about Flutter on their own Q&A sessions.
- hopia 7y agoI don't think purely about Dart, originally it seemed to be aimed as a technically more robust cross-platform competitor to React Native. Its implementation has good merit in that regard. That said, it may well not survive nearly as long as RN will, time will tell.
- sdegutis 7y ago
- phronmophobic 7y agoIf you're interested in desktop alternatives for clojure, check out https://github.com/phronmophobic/membrane https://github.com/phronmophobic/membrane. It's different from javafx in that all the event handling code is pure clojure. For graphics, it uses skia, https://skia.org/ https://skia.org/.
- capableweb 7y agoLove the example with the spacer, guess we're back to building UIs with tables soon as well! (defn counter [num] (horizontal-layout (on :mouse-down (fn [[mouse-x mouse-y]] (swap! counter-state inc) nil) (button "more!")) (spacer 5 0) (label num (ui/font nil 19)))) Otherwise, haven't heard about Skia before, so thanks for sharing that, looks really nifty.
- phronmophobic 7y agoThanks! More complicated layout strategies are easy to integrate, but spacer works really well for examples since most people can intuit what the result will look like. Skia has worked well so far. Since it's used by Chrome, Android, and Firefox under the hood, it means that I can reach a lot of platforms "for free".