Posted by joconner
on May 4, 2006 at 12:28 PM PDT
I don't want to declare Java's code-based layout dead yet, but I think a new way of creating GUIs must be considered. This thing called "SwiXml" has potential for becoming the next, greatest GUI layout format for Java developers.
I don't want to declare Java's code based layout dead yet, but I think a new way of creating GUIs must be considered. One of the huge benefits of coding on the Microsoft platforms has been their great tools and support for creating user interfaces with a simple resource language. You remember .rc files right. You could edit them in any editor. Localization tools everywhere support this file format. Well, Java's traditional method for laying out a form just isn't very easy to localize. Sure, you can stick text in a ResourceBundle, but that doesn't do anything for the layout.
"But layouts are handled by Layout Managers," you argue. "We don't need any stinking resource language to describe our layouts. They resize automagically, blah, blah, blah."
Yes, we do need something different. Things are changingâ€¦fast. Peopleâ€¦engineersâ€¦are tired of creating UIs in Java code, tying views with controllers. Localization vendors don't like dealing with java source code files to localize a UI. They can handle the text resource bundles, but give me a break with the form or window itself coded in Java! There must be something better. And there is!
I'm just discovering this myself, so I still have lots to learn. However, this thing called "SwiXml" has potential for becoming the GUI layout tool for Java developers. As the name suggests, SwiXml is an XML document. It can describe standard Java UI components in XML. Although you still have to understand Java layout managers, you donâ€™t have to understand the Java language to understand what the UI will look like. And that's perfect for localization people who just want to translate and localize the UI.
You have to read more about this. Hopefully we'll see some localization tools that can read and display these files visually, showing immediately and exactly how the localization engineer chooses to translate and localize the layout.
I'm convinced that a declarative XML file will be the standard for Java GUI design and layout in the future. It's gonna happen, so better start looking at this now. Thisâ€¦or something very similarâ€¦will be the standard for creating Java user interfaces.
Study up now. Hereâ€™s a little appetizer from Joshua Marinacci, a Swing engineer at Sun: Building GUIs with SwiXml .
Then when you're ready for more, head on over to the web site: SwiXml.org