Hi John, JavaFX /without/ Scene Builder would be far less interesting to me. SB shields me from having to learn the FXML semantics, plus I think I'm just drawn to a more visual editing approach (which is why I want a great Cayenne Modeler over putting annotations/etc on POJOs).
With something like SwiftUI, you have to know all the classes/attributes and how to lay them out, even if there is a quick preview of the UI. With SB, that is largely presented to you in the UI, which lessens the cognitive load, IMO. You'd still have to learn the UI patterns, though. I stumbled upon this over the weekend: http://griffon-framework.org/ "Griffon supports 4 different UI toolkits: Swing, JavaFX, Apache Pivot, and Lanterna. Griffon encourages the use of the MVC pattern but it's not limited to a single interpretation, you can for example apply standard MVC, MVP, MVVM, PMVC and others. Griffon also follows in the spirit of the Swing Application Framework (JSR 296), it defines a simple yet powerful application life cycle and event publishing mechanism regardless of the UI toolkit of choice." I haven't explored it yet, though. mrg On Mon, Dec 20, 2021 at 11:41 AM John Huss <johnth...@gmail.com> wrote: > Thanks Michael! I was able to run the JFX version on Java 11 and open the > sample model at "src/test/resources/cayenne-analytic.xml". > > For JFX, the existence of a visual editor like Scene Builder is a huge > feature in my opinion. Being able to directly edit the UI in a visual > manner makes it much easier for a developer to just jump in and change > something. > > I also looked at the kotlin compose-mpp library Andrus mentioned. The > approach it takes with a reactive, declarative UI is definitely the current > trend. It is very much like SwiftUI, which I have used a bit. It says you > can "preview" layouts in the IDE. If that actually works, then that makes a > big difference. Without it, I would be hesitant to use this. Here's some > sample code for a screen: > > https://github.com/JetBrains/compose-jb/blob/master/examples/issues/common/src/jvmAndAndroidMain/kotlin/androidx/ui/examples/jetissues/view/JetIssuesView.kt > > I like Kotlin and don't find it to be a big jump from Java. > > I think both of these are viable paths. It really depends on finding a > person who is excited to champion the project. As long as a developer is > passionate about doing this either approach should be fine. However, if the > goal is to incorporate a larger developer community into the maintenance, I > suspect the JFX route is easier for onboarding. > > > On Sun, Dec 19, 2021 at 2:17 PM Michael Gentry <blackn...@gmail.com> > wrote: > > > Hi John (and anyone else who is curious), > > > > I think I've got it running again. Pull the changes. > > > > Haven't really updated the docs, so to run: > > > > From Terminal: mvn clean javafx:run > > From Eclipse/IDE: Set up a Maven build with the "clean javafx:run" goal. > > > > You'll most likely need to load the included Cayenne Project (since > > upgrading versions/etc isn't supported yet): > > > > src/test/resources/cayenne-analytic.xml > > > > A good starting point to look at code/UI is the splash page since it is > > pretty simple. If you don't have Scene Builder installed, grab it from > > here: > > > > https://gluonhq.com/products/scene-builder/ > > > > Then open the splash page in Scene Builder: > > > > src/main/resources/layouts/SplashLayout.fxml > > > > And open the Java code in Eclipse/IDE: > > > > src/main/java/org/apache/cayenne/modeler/layout/SplashLayout.java > > > > Keep in mind this is just a demo/proof-of-concept and not fully > functional. > > Also, there are many other FXMLs you can open up in Scene Builder. The > > approach I was going for was to have lots of components/views I could > swap > > in/out as navigation was triggered in the UI. > > > > Let me know if you have questions or can't run it. > > > > Note: If on macOS you might have to give Eclipse/Terminal permissions in > > System Preferences. Also, if on Monterey, it likes to hide newly opened > > windows behind current windows. I don't have an app icon yet, so it shows > > up as a folder icon if you Command+Tab. > > > > mrg > > > > > > On Thu, Dec 16, 2021 at 11:17 AM John Huss <johnth...@gmail.com> wrote: > > > > > If we want to move off Swing I'd say this JavaFX project you started is > > the > > > best way to go. > > > > > > I can't get it to run out of the box. Any chance you could get it > running > > > again? > > > > > > On Tue, Dec 14, 2021 at 6:49 PM Michael Gentry <blackn...@gmail.com> > > > wrote: > > > > > > > I've considered an Electron app in the past. One negative is you lose > > > > access to existing Java code, but perhaps there is a way around this > > I've > > > > not seen. > > > > > > > > Examples: > > > > - Existing code to read model XML files. > > > > - JDBC drivers. > > > > - Velocity (assuming we want to continue using Velocity templates). > > > > > > > > For anyone curious, I thought JavaFX was looking good before I lost > > > > momentum: > > > > > > > > https://github.com/apache/cayenne-modeler > > > > > > > > If you look carefully, you'll see some of the extra features in the > > > > screenshots I was planning on adding, plus multiple windows (same > > project > > > > or different projects) in the video. > > > > > > > > > > > > On Tue, Dec 14, 2021 at 6:58 PM Lon Varscsak <lon.varsc...@gmail.com > > > > > > wrote: > > > > > > > > > What about an Electron app? 😬 > > > > > > > > > > On Tue, Dec 14, 2021 at 3:59 PM John Huss <johnth...@gmail.com> > > wrote: > > > > > > > > > > > My 2 cents is that Java desktop UI is effectively dead. So > > switching > > > to > > > > > > another UI library that is either already dead or is dying isn't > a > > > > great > > > > > > use of time. So I would try to change it as little as possible. > > > > > > > > > > > > For the tables with editable cells problem, my recommendation > would > > > be > > > > to > > > > > > move editing into a separate "inspector" area that is laid out > as a > > > > > > vertical form. Then the table can be read-only. > > > > > > > > > > > > For layout, I liked MigLayout when I did Swing apps back in the > > day. > > > > But > > > > > > that doesn't solve the problem with the existing usage of > JGoodies. > > > > > > > > > > > > > > > > > > On Tue, Dec 14, 2021 at 12:37 AM Andrus Adamchik < > > > aadamc...@gmail.com> > > > > > > wrote: > > > > > > > > > > > > > I see a couple of problems with the current UI (beside it being > > > > > > > subjectively old) : > > > > > > > > > > > > > > * We are effectively blocked from any significant evolution of > > the > > > > > > > Modeler. Any time we want to do anything fancy (e.g. improve > > > > usability > > > > > of > > > > > > > tables with editable cells, etc.), we quickly run into the wall > > > with > > > > > > Swing > > > > > > > capabilities. > > > > > > > * JGoodies library that we depend heavily upon for layouts is > no > > > > longer > > > > > > > free/open source [1], creating risks for JVM upgrades. > > > > > > > > > > > > > > So modernization of the Modeler is a practical matter. > > > > > > > > > > > > > > Looks like Fleet is not using Compose [2], but a lesser known > > > > JetBrains > > > > > > > Toolbox does [3]. And everyone admits it is still raw. > > > > > > > > > > > > > > Andrus > > > > > > > > > > > > > > [1] https://www.jgoodies.com/downloads/libraries/ > > > > > > > [2] https://twitter.com/jetbrains/status/1465245360973131777 < > > > > > > > https://twitter.com/jetbrains/status/1465245360973131777> > > > > > > > [3] > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://blog.jetbrains.com/kotlin/2021/08/compose-multiplatform-goes-alpha/#toolbox > > > > > > > < > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://blog.jetbrains.com/kotlin/2021/08/compose-multiplatform-goes-alpha/#toolbox > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Dec 14, 2021, at 12:48 AM, John Huss <johnth...@gmail.com > > > > > > wrote: > > > > > > > > > > > > > > > > I believe that compose UI library is used to build the new > > > upcoming > > > > > IDE > > > > > > > > from JetBrains called Fleet. So I expect it will continue to > be > > > > > > supported > > > > > > > > unless that product completely flops. > > > > > > > > > > > > > > > > I don't mind the current modeler UI. It's good enough for me. > > > > > > > > > > > > > > > > https://www.jetbrains.com/fleet/ > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Dec 11, 2021 at 2:15 AM Andrus Adamchik < > > > > aadamc...@gmail.com > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > >> A datapoint to our perennial discussion of technology to use > > for > > > > the > > > > > > > >> future CayenneModeler... With Swing being old and crusty, > and > > > > JavaFX > > > > > > no > > > > > > > >> longer supported by Oracle, perhaps we should be looking for > > > > > something > > > > > > > >> fresh. I just came across a new "Compose Multiplatform" > > desktop > > > UI > > > > > > > >> framework by JetBrains [1]. It is programmed in Kotlin and > is > > > > based > > > > > on > > > > > > > >> Google toolkit for Android. Their GitHub examples [2] are > not > > > that > > > > > > > visually > > > > > > > >> impressive, but I would imagine it is a matter of styling. A > > > > > million $ > > > > > > > >> question is whether it will be around and open source in > 10-15 > > > > > years. > > > > > > > >> > > > > > > > >> Anyone knows anything about it? > > > > > > > >> > > > > > > > >> Andrus > > > > > > > >> > > > > > > > >> [1] https://www.jetbrains.com/lp/compose-mpp/ > > > > > > > >> [2] > > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://github.com/JetBrains/compose-jb/blob/master/artwork/readme/apps.png > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >