• Subscribe  

JavaBuilder Shows the Struggling of Java RIA

Posted by Charles | September 12, 2008 .

Java has been struggling in coming back to the web UI side (or RIA space) as a major player. Sun tried with JavaFX but I don’t see it will go anywhere near where Sun expected to be. From within the vast among of opensource Java projects, there are quite a few good attempts. JavaBuilder for Swing is one of them, which was released as version 0.2 recently. Considering it’s only 0.2, the amount of works and features are very impressive. I’d say it somewhat does a better job than JavaFX. However, by looking into how JavaBuilder works, I’m still not convinced that Java dudes have gotten it.

In a nut shell, what JavaBuilder does is using YAML file to layout UI. Each Swing UI component has a YAML tag to define it. A piece of UI code would looks like this:

JFrame(title=frame.title, state=max, defaultCloseOperation=exitOnClose, iconImage=images/system-lock-screen.png):
    - JMenuBar:
        - JMenu(name=fileMenu,text=menu.file):
            - JMenuItem(name=newMenu,, icon=images/document-new.png, onAction=onFileNew)
            - JMenuItem(name=openMenu,, icon=images/document-open.png, onAction=onFileOpen)            
            - JSeparator()
            - JMenuItem(name=exitMenu, text=menu.file.exit, icon=images/process-stop.png, onAction=exit)
        - JMenu(name=optionsMenu, text=menu.options):
            - JRadioButtonMenuItem(name=radio1Menu, text=menu.option1, onAction=option1)
            - JRadioButtonMenuItem(name=radio2Menu, text=menu.option2)
            - JRadioButtonMenuItem(name=radio3Menu, text=menu.option3)
            - ButtonGroup: [radio1Menu, radio2Menu, radio3Menu]
            - JSeparator()
            - JCheckBoxMenuItem(text=menu.option1, onAction=option1)
            - JCheckBoxMenuItem(text=menu.option2)
            - JCheckBoxMenuItem(text=menu.option3)
        - JMenu(name=helpMenu,
            - JMenuItem(name=helpAboutMenu,,onAction=onHelpAbout)
    - JTabbedPane(name=tabs):
         - JPanel(name=frameYamlSource,tabTitle=tab.frameYamlSource):
             - JScrollPane(name=scroll1): JTextArea(name=frameSourceArea,editable=false,font=Monospaced)
             - MigLayout: |
                 scroll1  [grow]

I’m sure it does what it does but do you really want to programming in YAML? Sun tried its odd JavaFX Script with a big failure (in my opinion), but then YAML will do better? I don’t think so.

For this matter I’d give credits to Microsoft. Mr. MS picks up whatever works and move on to be dominating there. I’ve got a feeling Java guys have too much of ego going on. Yes indeed, Java opened a new exciting technical world. Even Microsoft copied Java to create C#.  Therefor Java should do it again and again in the language space or where ever it wants to be. That must be what they were thinking when came up with JavaFX Script, while Microsoft copied again, from Flex’s MXML to Silverlight’s markup (I know XAML is not just for it.) But what’s up with YAML!

I would think, with this big strong developer base in place, Java can come back in RIA by just tabbing into what works plus some innovation that Java dudes are not lack of. But first, get rid of the ego.

(I’m kinda hearing some Java dudes are yelling from distance: “To go as low as those Microsoft copycats? no way!”) 

Leave a Comment

If you would like to make a comment, please fill out the form below.




To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Related Posts

2 Comments so far
  1. Jacek Furmankiewicz  December 16, 2008 8:19 am

    Hi, thanks for noticing my little project :-)

    Actually, you are NOT programming in YAML (I am very keen to highlight that). YAML is just a declarative UI format (instead of XML like XAML or Flex for that matter).

    All the “real” code is pure 100% Java. The closest you get to coding is that you register an event handler like this in YAML (look at onAction):

    – JMenuItem(name=openMenu,, icon=images/document-open.png, onAction=onFileOpen)

    which will automatically call the corresponding method in the Java class:

    private void onFileOpen() {
    //some Java code here

    So 100% of actual code is in Java. YAML is no different than XAML or MXML, just without those pesky ending tags (which JavaFX suffers from as well with its JSON-style nested syntax).

  2. Jacek Furmankiewicz  December 16, 2008 8:23 am

    Forgot about one thing: the Javabuilder for Swing includes an internal DSL for complex layout management (using MigLayout under the hood) that IMHO makes complex layouts much easier than in anything else:

    (see the complex layout at the bottom, we implement it in 9 lines of YAML, it would take you way more in any other technology…traditional Java, Flex, C# or whatever)


Direct TV Offers - usdirect has the best directtv deals