Show HN: Sierra, a DSL for building Java Swing applications
11–20 of 34 posts
Re: Show HN: Sierra, a DSL for building Java Swing applications
#12JavaFX started out as a Java library on top of Swing but the lack of object literals and lambdas led to the creation of the F3 language (code-named foo for "funcional object-oriented").
Despite Java's progress since then its syntax still feels somewhat rigid. Sierra looks very nice indeed. It could benefit from a more fluid, less syntax-encumbered DSL laid on top of it in Kotlin or Scala.
Re: Show HN: Sierra, a DSL for building Java Swing applications
#13This is reminiscent of JavaFX's original F3 formulation (aka JavaFX Script): object literals reflecting the GUI visual structure. JavaFX started out as a Java library on top of Swing but the lack of object literals and lambdas led to the creation of the F3 language (code-named foo for "funcional object-oriented"). Despite Java's progress since then its syntax still feels somewhat rigid. Sierra looks very nice indeed.…
Re: Show HN: Sierra, a DSL for building Java Swing applications
#14This looks nice, finally a good attempt at a java Swift UI, will try it out.
Re: Show HN: Sierra, a DSL for building Java Swing applications
#15This is reminiscent of JavaFX's original F3 formulation (aka JavaFX Script): object literals reflecting the GUI visual structure. JavaFX started out as a Java library on top of Swing but the lack of object literals and lambdas led to the creation of the F3 language (code-named foo for "funcional object-oriented"). Despite Java's progress since then its syntax still feels somewhat rigid. Sierra looks very nice indeed.…
Thanks for the feedback. I did consider using Kotlin but wanted to make sure it worked at least minimally in Java first.
Laying out a Kotlin DSL on top of it could be an excellent opt-in feature to leverage the core in a more declarative way
Re: Show HN: Sierra, a DSL for building Java Swing applications
#16Re: Show HN: Sierra, a DSL for building Java Swing applications
#17This looks really cool. Applying a thin layer over parts of the standard library is a very good idea IMO. Reduces the dependency tree but a lot. One question (my Swing knowledge is at least 15 years old!): what's the simplest way to handle events using this? Eg taking the FormTest [1] example, how might one simply bind a model object to the UI elements? [1] https://github.com/HTTP-RPC/Sierra/blob/master/sierra-test/s…
https://github.com/HTTP-RPC/Sierra/blob/master/sierra-test/s...
I'm not sure it's exactly what you were looking for, but hopefully it is similar enough.
Re: Show HN: Sierra, a DSL for building Java Swing applications
#18Earlier quoted context omitted.
The only real problem with Swing is that there was never a version 2. If it had been separated from AWT, updated some of the APIs and given a modern look-and-feel, it would still be relevant today. JavaFX is nice, but it broke too many conventions. And, of course, Oracle or OpenJDK (or someone) needed to invest in a browser port of the JVM, which is totally possible these days.
Take a look at FlatLAF: https://github.com/JFormDesigner/FlatLaf They have done a great job bringing a modern appearance to the Swing components.
As I understand it, IDEA has done a lot of "Swing Work". I don't know if it's just augmenting existing or creating a bunch of new controls or if they delved deeper. It's just my understanding that IDEA is Swing, but not as we know it. I could be wrong.
NetBeans is pretty much pure Swing.
Re: Show HN: Sierra, a DSL for building Java Swing applications
#19This is slightly off-topic, but this post makes me feel sincerely nostalgic for building games in Eclipse and Swing back in the day. Growing up, Notch's live streams[1] where he would code up a game in Java Swing for Ludum Dare were one of my first exposures to programming, and reasons for eventually studying CS. I wish there were some modern alternative to Swing that would be as simple as Swing, but would allow you…
JavaFX is sorta the spiritual successor to swing. On linux, you can actually run it straight from the framebuffer! (No 'desktop' needed!)
There was also this discussion a long while back: https://news.ycombinator.com/item?id=25121705 The project is actively maintained and sees commits quite a bit! Might be what you're looking for.
Re: Show HN: Sierra, a DSL for building Java Swing applications
#20This looks really cool. Applying a thin layer over parts of the standard library is a very good idea IMO. Reduces the dependency tree but a lot. One question (my Swing knowledge is at least 15 years old!): what's the simplest way to handle events using this? Eg taking the FormTest [1] example, how might one simply bind a model object to the UI elements? [1] https://github.com/HTTP-RPC/Sierra/blob/master/sierra-test/s…
Added an example demonstrating how to add an action listener to a button: https://github.com/HTTP-RPC/Sierra/blob/master/sierra-test/s... I'm not sure it's exactly what you were looking for, but hopefully it is similar enough.
But that fits in very nicely with how your library works using with().