UI design options with Groovy / JRuby / Jython or other JVM languages?

There are several options for a developer in the Java ecosystem when it comes to user interface design. The most famous are:

  • Swing (recommended when used with Netbeans and its GUI creator)
  • Eclipse SWT (mostly preferred for Eclipse plugins)

Now, are there any frameworks or design alternatives that target JRuby / Groovy / Jython or other "dynamic" JVM languages?

Some user interface interfaces are layers above Swing or SWT, for example, the structure can read the screen description in XML and instantiate the corresponding Swing components.

If you know a framework similar to this, but that targets the “dynamic” JVM languages, I would also like to see them in the answers.

+3
source share
3 answers

Not really UI design, but you can try Griffon .

+7
source

Clojure has several GUI libraries / frameworks that look priomising:

seesaw wraps Swing in a very concise DSL, which can certainly be used to declaratively create GUI interfaces:

(defn -main [& args]
  (invoke-later 
    (-> (frame :title "Hello", 
           :content "Hello, Seesaw",
           :on-close :exit)
     pack!
     show!)))

Incanter (, JFreeChart). GUI, , :

;; show a histogram of 1000 samples from a normal distribution
(view (histogram (sample-normal 1000)))

JavaFX 2.0 Clojure - DSL:

(defn -start [app stage]
   (eval
     (fx Stage :visible true :width 300 :height 200 :title "hello world"
         :scene (fx Scene
                  (fx BorderPane :left (fx Text "hello")
                      :right (fx Text "Right")
                      :top (fx Text "top")
                      :bottom (fx Text "Bottom")
                      :center (fx Text "In the middle!"))))))
+2

, Jruby - Monkeybars (http://monkeybars.rubyforge.org/) Limelight (http://limelight.8thlight.com/).

Monkeybars is a complete Rubyesque MVC implementation that can be used in conjunction with the Swing GUI builder, while Limelight is suitable for a minimum code ratio / maximum effect such as Shoes.

0
source

Source: https://habr.com/ru/post/1697153/


All Articles