While i love tornadoFx i still find designing the ...
# tornadofx
g
While i love tornadoFx i still find designing the UI as a painstaking task. I would love to know what is your preferred method/tools for creating UI ?
c
pen&paper/whiteboard prototype, then tfx builders (I'm still a beginner though)
There is also a possibility to use the standard javafx gui designer, which spews out fxml files and then import those into tfx
g
Thanks @Czar , i also have been using Scene builder but somehow feels like there gotta be a better way to do this 🙂 Can you please share the doc links for tfx builders ?
c
https://edvin.gitbooks.io/tornadofx-guide/part1/3.%20Components.html By TFX builders I mean the Layout/Component API of TornadoFX.
👍 1
c
At this point, after coding desktop apps in Java since 2000, I prefer code. For every bit of productivity you gain with a WYSIWYG layout editor, I think you lose twice that in the maintenance effort. I still use Scene Builder but that never had the integrated feel of XCode's Storyboard. Scene Builder produces a bunch of fragmented screens that you still have to wire up in app code; it lacks navigation and screenflow. What I liked about Storyboard however, may only be relevant for simpler mobile apps.
I've used PowerBuilder and also XDesigner in non-Java UIs before that. This lead to a real segmentation between code and UI constructs.
This morning, I'm working with web stuff. I have a hot reload server so I can make my Bootstrap UI edits and my CSS style changes reflected right away. Coupled with the debugging tools that show the box model, I think this is pretty effective.
g
@carlw thanks for sharing your expirience. I also feel that using WYSIWYG framework does make it very hard for future maintainence. Does tfx builder uses declaritive approach?
c
yes, that's what is referred to as "Type Safe Builders"...this was once a part of JavaFX proper, but was taken out for maintenance reasons and probably because Scene Builder was the preferred way of building UIs
You'll see static methods in older JavaFX documentation
g
Oh interesting
c
Those builders (JavaFX, not TornadoFX) were auto-generated and the authors felt underutilized. So, they deprecated them
a
They weren't removed because of under-utilization. They had some major bugs, some related to performance.
c
agreed. i meant that the builder performance problems weren't worth fixing because the authors were expecting FXML and lambdas to fill the gap in ease of use http://mail.openjdk.java.net/pipermail/openjfx-dev/2013-March/006725.html
s
Pen paper sketches -> design doc layout -> Sketch for mockups & app flow / basic animations (Sketch is amazing) -> illustrator for assets -> then finally code 😛
😲 1
c
balsamiq too!
l
I also prototype directly in the code. When UI looks good, then I start adding functionality.
s
I also don't add styling until after all the code functionality is working correctly, saves a lot of re-writing
h
I'm a huge proponent of doing it in code, no SceneBuilder for me. I do like to use MigLayout for complex panes, you can do it w/o it though.
We used to use a borland WYSIWG UI editor years and years ago that was part of some commercial borland product. Eclipse came around for free and they didnt want to license it any more, stuck with these godawful borland generated UI classes.
Vowed to never be burnt like that again. JavaFX and SceneBuilder came out, I said not a chance. Oracle dropped SceneBuilder, made me laugh (though yes Gluon picked it up).
r
I'll occasionally spin up SceneBuilder to prototype some ideas, but I still always code the final product by hand. I don't really have a good reason for it, I think I just grew to mistrust WYSIWYG editors over the years.
👍 1
c
scenebuilder has been cool from a compatibility standpoint. i used jdeveloper generated classes. the FXML i wrote in 2012 is still maintainable by even Scenebuilder 1.0
i was really impressed working on an XCode app at how integrated it was. the whole app was rendered in the WYSIWYG. they had a concept of Segues that linked screens. but that seems suitable for a mobile app which isn't nearly as complex in terms of number of screens compared to what i usually work on
lol. just got a slack from a client. (fires Scene Builder up)
😆 1