Hello, Fred Swartz who teaches at the University of Maryland has created more than 300 pages of Java Notes including a special note titled "Java GUI Alternatives" that introduces the XUL philosophy.
Fred writes: It isn't all that hard to build a Graphical User Interface (GUI) in Java, but it is hard to get something that is easy to work on as the program gets larger. Many styles of GUI programming simply don't scale well. Some GUI programming alternatives --------------------------------- 1. Code the GUI in Java with the logic and interface mixed. This is a typical style for small student programs. The code to perform the action of a button is in the button's action lietener. This does NOT scale well as programs get bigger. 2. Code the GUI in Java, but separate the logic. As programs grow larger, it's essential to separate the GUI interface processing from the logic. This is easy to do by putting the interface and logic in separate classes. The GUI generators below are another way to accomplish this. 3. Use Drag and Drop GUI editors. Many IDEs (NetBeans, Eclipse (only SWT), JBuilder, ...) have GUI editors and there are also numerous standalone products. They don't always enforce separation of interface and logic, but it's usually easy to do. 4. Use Flash or JavaScript+HTML for the GUI. Why should your interface be in Java? You can use existing GUI technologies like Flash or JavaScript+HTML (check out Sun's LiveConnect, which should already be installed with your version of Java) to interact with your Java program. 5. Describe the GUI in some other language (eg, XML). This approach is described below in the XUL (XML User interface Language) philosophy. The XUL philosophy ------------------ Everyone says that interfaces should be separated from the logic of the program, and one of the most promising approaches is to represent the GUI in a markup language (think HTML forms with a full set of widgets). The Mozilla XUL group (check out XML User Interface Language (XUL) Links has been one of the most active in proposals in this area, altho the actual offerings don't seem quite ready for prime time (eg, Luxor). I've tried SwiXML and Thinlet, both of which read an XML file to build the GUI at execution time. On small test programs I really liked them. They're not quite mature yet (eg, weak documentation), and are both reportedly coming out with new versions soon. I'm looking forward to seriously trying SwixML when version 2 with better layout support appears. Microsoft has announced XAML, an XML description of user interfaces (and much more) for the upcoming "Avalon" system (see below). It looks like Microsoft may take the lead in this area; and I wouldn't be surprised if their work sets the future direction. Full story @ http://leepoint.net/notes-java/30GUI/95misc/80gui-generator.html - Gerald PS: Let us know your experience with Java toolkits that use the XUL philosohpy. I invite you to post your war stories from the trenches to the xul-talk mailinglist. ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ xul-announce mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xul-announce