Slashdot Mirror


Resource-Based GUIs Vs. Code Generators In Java

Java Fan writes, "There is a good debate about GUI generation tools for Java going on at theserverside.com: 'Almost every platform has a visual designer that serializes the GUI to resources (some XML, some proprietary binaries) and then attaches it to the controller at runtime. Apple has had this for years with Interface Builder, Vista has a similar philosophy now as well. Java developers though are left with either hand coding of GUIs or potentially messy and brittle code generators. Neither of which promote good MVC separation. In fact they tend to encourage violations unless you are a very disciplined coder.' Personally, I am partial to BuoyBuilder as a great solution to this issue."

164 comments

  1. Gee, what a deal! by JanusFury · · Score: 4, Informative

    300 bucks for a crappy UI builder that adds multiple layers of abstraction on top of Swing! That sure is cheaper than Visual C# Express, Interface Builder, SharpDevelop, wxWindows, Visual Basic, or any of the GUI builders available for Eclipse!

    Wait, no, sorry. It's not.

    Nice slashvertisement.

    --
    using namespace slashdot;
    troll::post();
    1. Re:Gee, what a deal! by Anonymous Coward · · Score: 0

      Cost is irrelevant. Quality is the only measure.

      Of course, I have no idea what the quality is, so w/e.

    2. Re:Gee, what a deal! by Mongoose+Disciple · · Score: 3, Insightful

      Cost is irrelevant. Quality is the only measure.

      That's the ivory tower answer, and from a certain perspective it's true and from a certain perspective it's not.

      The last Java shop I worked in wouldn't pay for any development tools. Good tools that were free (as in beer) or close to it were at a premium.

    3. Re:Gee, what a deal! by 94west · · Score: 1

      It is also available as Open Source, where it's free as in software.

    4. Re:Gee, what a deal! by WWWWolf · · Score: 1
      300 bucks for a crappy UI builder that adds multiple layers of abstraction on top of Swing!

      Uh... the page says the program is under OSL licence.

      id Software licences their crappy, outdated Quake 1 3D engine for bazillion dollorz. Are they evil too?

      (Granted, the licence appears a bit problematic. You generally can't claim copyright on the output of your program, if the stuff it generates is based on the user input... Otherwise, pencil makers would be really rich. And limiting the field of use is (AFAIK) against Open Source Definition as well.)

    5. Re:Gee, what a deal! by Nataku564 · · Score: 1

      Actually, if you check the website, id sells Quake 1 for $10,000 per title - flat rate. Thats actually a pretty good deal when you consider all the crap you wont have to do, even if you have to improve the rendering engine. Its also GPL'd if you want to use it for your own private purposes.

    6. Re:Gee, what a deal! by lenroc · · Score: 1

      It is also available as Open Source, where it's free as in software.

      "free as in software"? Well, that's as clear as mud!

      I think someone needs to brush up on Free vs free. For the sake of those that read your comments!

      (And, no, not all "Open Source" software is free (gratis), though it is all Free (libre) for varying definitions of Free. Unfortunately, even saying "Open Source" isn't enough to imply that software is really "Free", which is why there are terms like FOSS and FLOSS.)

  2. The Difference Between Theory and Practice by anomalous+cohort · · Score: 4, Insightful

    In theory, I'm not against the use of a GUI builder as long as it provides a way to use all of the layout managers that are available. I've just never seen one that could scale in complexity to the needs of a real world application. Sooner or later, the functionality requirements drive GUI elements to be created based on configuration settings and/or business rules. That is where you hit the wall with the GUI builder.

    1. Re:The Difference Between Theory and Practice by zhiwenchong · · Score: 1, Insightful

      In theory, there is no difference between theory and practice. But, in practice, there is. - Jan L.A. van de Snepscheut

      Sorry couldn't resist.

    2. Re:The Difference Between Theory and Practice by fitten · · Score: 1

      Yes, but that's mostly only when you use the GUI builder tool. The concept of using a 'GUI renderer' (one that takes, say, XML and renders the GUI from that XML description) is very powerful. For some advanced things, you may have to generate your GUI programatically at runtime by building the XML (or portions of it) at runtime, which is a bit more work than just click-click-click on a GUI builder tool and shipping that XML description as a part of the deliverable (static and unchanging).

    3. Re:The Difference Between Theory and Practice by misleb · · Score: 1

      I don't know about other interface builders, but Apple's allows you to create as many GUI elements programatically as you want. It is can be a pain specifying and later changing the parameters for said elements, but you can do it.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    4. Re:The Difference Between Theory and Practice by Anonymous Coward · · Score: 2, Informative

      A good GUI builder will allow you to mix and match between resource-based controls and code-built controls. Interface Builder on the Mac is a great example of this. I can use it to build extremely nice and functional windows, but when I run up against the wall of what it can do then I am free to mix in code for whatever is necessary. Normally the code I have to write is small, and put together the whole thing is vastly simpler than laying out everything in code just so I can get a little more power.

    5. Re:The Difference Between Theory and Practice by TheRaven64 · · Score: 1

      It's worth noting that Interface Builder is a really bad name for Apple's tool. It actually allows you to create serialised object graphs, which you can then restore later. This means that you can insert an instance of various controller classes in the same graph as the views. For document driven applications, it is typical to insert an entire model-controller-view graph into a single file, and restore a copy of it at runtime when the user creates a new window. This is a particularly useful way of working at times, as you can use it to implement the factory pattern for entire collections of objects very easily.

      --
      I am TheRaven on Soylent News
  3. XMLEncoder/XMLDecoder by AKAImBatman · · Score: 5, Informative
    Almost every platform has a visual designer that serializes the GUI to resources (some XML, some proprietary binaries) and then attaches it to the controller at runtime.

    Anyone who's interested in this issue should look into the java.bean.XMLEncoder and java.bean.XMLDecoder classes. These classes are able to serialize and deserialize complete GUIs. In the past, I've used the Netbeans GUI Builder to develop throw-away GUI frontends, then serialized them to a file rather than using them directly. I then built a framework that used the little-known "Name" property on AWT/Swing components to attach actions.

    The results were quite good. Not only was the GUI decoupled from the code, but development was actually accelerated as minor GUI hiccups had no effect on the rest of the codebase. The downside was that the XML occasionally had to be tweaked to perfection as the XMLEncoder class was not 100% perfect in serializing some of the finer details.

    A few years ago I spoke with one of the Netbeans developers about making the XMLEncoder format the standard for Netbeans. The idea was met with some resistence, seemingly because there was no actual Java-standard framework to target. The JVM base libraries have the Encoder/Decoder routines, but all the rest of the work must be done by the programmer. (Such as attaching the actions to the components.)

    Neither of which promote good MVC separation. In fact they tend to encourage violations unless you are a very disciplined coder.

    Train yourself to use Swing Actions. It seems like you're creating hundreds of little objects, but what you're really doing is encapsulating actual actions in the system away from their physcial controls on screen. So if you have a button, a menu item, and a toolbar item that all do the same thing, a single action can control all three widgets. This helps smooth out issues like keyboard shortcuts, which can get quite confusing when coding a Swing application.
    1. Re:XMLEncoder/XMLDecoder by WinterSolstice · · Score: 1

      That's a pretty good point.
      I've run into issues like that with NetBeans in the past, and it was a serious headache - I never tried the technique you mention.

      My biggest issue with Java GUI development, however, is that there is no common codebase for it - if I write a project with Borland JBuilder or whatever, I have to totally redo the GUI in NetBeans or Eclipse. At least, this has been true in my experience with Borland (which was short and negative). Xcode also has this issue.

      Can we get something more like GTK or something with a nice cross-platform *standard* GUI toolkit?

      -WS

      --
      An operating system should be like a light switch... simple, effective, easy to use, and designed for everyone.
    2. Re:XMLEncoder/XMLDecoder by AKAImBatman · · Score: 4, Informative
      Can we get something more like GTK or something with a nice cross-platform *standard* GUI toolkit?

      The problem isn't the toolkit. It's the lack of a standard serialized form. In the Windows world, the standard format is known as a "resource file". Since all GUI editors target this resource format, there is no compatibility issues across IDEs. Similarly, GTK+ standardizes on GladeXML from the Glade Interface Designer. So there's no question about what format an IDE should support when adding a GUI Designer.

      Swing is one of the few GUI technologies that doesn't have a standard serialized format. The XMLEncoder technology took a step toward solving this, but didn't follow through. The result was that we had a format, but no library to actually wire up a deserialized GUI! (e.g. GladeXML is decoded by libglade) This oversight was rather massive, but ended up being ignored as the focus continued to shift toward server-size J2EE development.
    3. Re:XMLEncoder/XMLDecoder by Curt+Cox · · Score: 1

      That is all good solid advice, but currently way beyond anyone new to Swing. I really hope that JSR-296 will make this the easiest path to follow.

    4. Re:XMLEncoder/XMLDecoder by WinterSolstice · · Score: 1

      So basically there is a format to use, but you're on your own to create the actual document? Like writing XML by hand, kind of thing?

      -WS

      --
      An operating system should be like a light switch... simple, effective, easy to use, and designed for everyone.
    5. Re:XMLEncoder/XMLDecoder by AKAImBatman · · Score: 1
      So basically there is a format to use, but you're on your own to create the actual document?

      Sort of. In my case, I serialized a running GUI to get the file. I could have hand coded it, but that would have been a pain. Instead, I created it in Netbeans, and ran the class through java.bean.XMLEncoder.

      Again, the REAL problem is attaching the actions. (i.e. events, keymappings, etc.) If you think about it, you can't attach an event listener inside an XML file, because the XML file is decoupled from your code. So you need a way to identify the correct component after loading the file, to add the necessary event handlers to. My method was a framework that worked a bit like the HTML DOM APIs. I would request a component by name, and the framework would walk the GUI tree looking for that component.

      Thus I was able to do something like this:
      JFrame frame = framework.load(new FileInputStream("mygui.xml"));
      ...
      framework.get Component("fileopen", frame).setAction(new FileOpenAction());
    6. Re:XMLEncoder/XMLDecoder by 94west · · Score: 2, Informative

      BuoyBuilder uses XMLEncoder/XMLDecoder. And it also lets you persist actions, so you don't need the glue code to set up actions after loading the UI. You can do this in one of two ways: (1) you can actually include the object that is the target of the action in the XML file (by making your class available to BuoyBuilder) or (2) you can provide a proxy to the object that will be the target, and provide the instance when loading the UI (or more properly the persisted object graph).

    7. Re:XMLEncoder/XMLDecoder by TheRaven64 · · Score: 1

      Xcode also has this issueNot entirely true. The (relatively) new XML NIB format is supported by GORM, and so can be used for cross-platform development.

      --
      I am TheRaven on Soylent News
    8. Re:XMLEncoder/XMLDecoder by Anonymous Coward · · Score: 0

      So, to sum up, it's the same story that has dogged Java for years: Java sucks for GUI programming. It's ass-slow, pisses away RAM like water and on top of that... there isn't even a standard for GUI resource storage.

    9. Re:XMLEncoder/XMLDecoder by curunir · · Score: 1

      Another option for creating XML-based GUIs in java is XSWT. I've found that it makes laying out a GUI no harder than laying out an HTML document (or it would be no harder if they'd improve their docs...grr), yet it still gives you the ability to manage all behvavior in Java.

      However, it's not Swing, which may be a problem for some (I personally like SWT better than Swing, but understand that some believe the opposite).

      --
      "Don't blame me, I voted for Kodos!"
  4. Jaxx v F3? by Anonymous Coward · · Score: 0, Interesting

    Who can smell the coffee?

  5. Uaaaaaaahhh... by Anonymous Coward · · Score: 0

    "Every developer who requires a GUI to develop another GUI would write code that has the potential to give other developers cancer."

  6. GINAC by lieven_dekeyser · · Score: 4, Interesting

    We started a project along the lines of Interface Builder with a Java Swing implementation for our master's thesis in 2005. It's called GINAC, as in GUI Is Not Application Code.

    As I really hate designing GUI's in code, I've started working on it again lately, currently implementing something along the lines of cocoa bindings. If anybody is interested in helping out, let me know!

    1. Re:GINAC by Anonymous Coward · · Score: 0

      Oh yes please please PLEASE let's reinvent the wheel AGAIN can we please can we please huh huh huh???

      And because we wrote it ourselves it will be the best wheel EVAR>!!! and it will NEVAR have to be reinvented again!!

      Ha-ha my vword: THUMBED

    2. Re:GINAC by fireboy1919 · · Score: 2, Informative

      Okay! Here's some help.

      You've joined the ranks of Mozilla Firebird, and Jetty, the Tads Virtual Machine by trying to make a new project with exactly the same name as an already existing, extremely popular project.

      How about you rename it to something that isn't taken?

      GINAC=>GINAC is not a computer algebra system

      Step #1 of picking a name for any OSS is looking for it on Google.

      --
      Mod me down and I will become more powerful than you can possibly imagine!
    3. Re:GINAC by lieven_dekeyser · · Score: 1

      We looked at what was availiable back then and nothing was satisfying. A bicycle wheel doesn't fit on a 10 ton truck... not reinventing the wheel, just creating one according to our needs.

    4. Re:GINAC by lieven_dekeyser · · Score: 1

      Yep we should have googled.. Oh well, we had to come up with a name fast, and an acronym sounded like fun :-)

    5. Re:GINAC by computational+super · · Score: 4, Funny

      You should just go the extra few feet and call it "Visually Activated GUI Is Not Application Code".

      --
      Proud neuron in the Slashdot hivemind since 2002.
    6. Re:GINAC by julesh · · Score: 1

      Step #1 of picking a name for any OSS is looking for it on Google.

      Step #1 of naming *anything* is looking it up on Google.

    7. Re:GINAC by bar-agent · · Score: 1
      "Visually Activated GUI Is Not Application Code"

      VAGINA-Code?
      --
      i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
    8. Re:GINAC by chochos · · Score: 1

      I thought about this a few years ago. It is technically feasible and if I'm not mistaken, someone at Sun was working on this when Swing first came out, but it never materialized for some reason. I was discouraged from doing anything like this because of that big ugly disclaimer in Swing:

      Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing.

      They added a comment about XMLEncoder on version 1.4 but I was working on 1.3 when I thought about doing something like InterfaceBuilder.

      Anyway, is this project something you have registered on SourceForge or somewhere else? Are you going to make it open source? under what license? I may be interested in helping out with some coding.

  7. code-generators by Anonymous Coward · · Score: 0, Interesting

    I've never been a big fan of run-time loaded UIs, always preferred the code-generators instead. It just feels better if you can see the code that's going to run, and if you're using a lot of custom components it's more flexible.

    Juce and its "Jucer" UI builder is my favourite for this stuff - it generates c++ code with comment-tags for squeezing custom code into the generated sections. A particularly cute feature is that a Jucer document is just a compilable cpp file, with all of its UI metadata stored discreetly at the end in a commented-out block of XML.

    1. Re:code-generators by Anonymous Coward · · Score: 0

      You have never developed an application that needs to be internationalized, obviously.

      Different cultures and different languages need items positioned differently. Some languages are read left to right, others right to left, others top to bottom. Some phrases are much longer in some languages than others. All this makes impossible to have an universal layout.

      Having different code for each language increases the testing and debugging cost, and thus is better avoided if at all possible.

    2. Re:code-generators by TheRaven64 · · Score: 1

      The other poster mentioned internationalisation; this is important when you have HCI experts for each locale designing custom UIs. I really don't understand what you mean when you say:if you're using a lot of custom components it's more flexible.The system used by NeXT (and now Apple and GNUstep) in the first RAD tool, was very simple. You create an object graph, and serialise it. In your code, you can create instances of this object graph. This seems to me to be a lot more flexible than having to hard-code the connections.

      --
      I am TheRaven on Soylent News
    3. Re:code-generators by VGR · · Score: 1
      You have never developed an application that needs to be internationalized, obviously.

      Different cultures and different languages need items positioned differently. Some languages are read left to right, others right to left, others top to bottom. Some phrases are much longer in some languages than others. All this makes impossible to have an universal layout.

      And yet, nearly all Java layouts seem to do exactly that. If you don't believe it, arrange some components into a GridBagLayout with at least two columns and look at the results. Then add a call to applyComponentOrientation( ComponentOrientation.RIGHT_TO_LEFT ) on the window (after all components have been added to it), recompile and look at the results again.

      --
      The Internet is full. Go away.
    4. Re:code-generators by Randolpho · · Score: 1

      Amazingly enough, .NET/Win.Forms does too.

      --
      "Times have not become more violent. They have just become more televised."
      -Marilyn Manson
  8. Huge oversight on Sun's part by xtal · · Score: 3, Insightful

    I'm not sure how they released without some sort of GUI building tool. I haven't used Java in awhile, but I remember coming up with Shakespearean-esque curses to describe what I thought of GridLayout and their buddies.

    Is there an accepted good builder now? The article seems to imply this is far from a solved problem. (10 years later!)

    --
    ..don't panic
    1. Re:Huge oversight on Sun's part by _xeno_ · · Score: 1

      There's Netbeans which has a GUI builder. (Which, IMHO, sucks. Or at least did the last time I used it.)

      Eclipse also has plugins (the Visual Editor) to allow creating GUIs graphically. (Which is, IMHO, worse than Netbeans's.)

      So, there are GUI building tools. They just suck. (IMHO, of course.)

      Personally I'd like to see something like XUL where the GUI is specified using a markup language. Which is why I started writing one and then never released it.

      --
      You are in a maze of twisty little relative jumps, all alike.
    2. Re:Huge oversight on Sun's part by Anonymous Coward · · Score: 1, Insightful

      Netbeans has had a GUI builder for quite some time. It is a Sun product, and can downloaded as a bundle with the JDK: http://java.sun.com/j2se/1.5.0/download-netbeans.h tml

      Whoever modded your post "Interesting" clearly has a sense of humor.

    3. Re:Huge oversight on Sun's part by chroma · · Score: 2, Informative

      Take a look at the videos that demonstrate Netbeans 'Matisse' GUI builder. I use it all the time, and find it quite handy:
      http://www.netbeans.org/kb/articles/matisse.html

      --

      Your design to a real part online: Big Blue Saw
    4. Re:Huge oversight on Sun's part by eric2hill · · Score: 1

      Is there an accepted good builder now? The article seems to imply this is far from a solved problem. (10 years later!) Yes

      It supports many layout models including the JGoodies FormLayout, which is far superior to the old GridLayout system.

      I've been using it for the last few years and it works marvelously.

      --
      LOAD "SIG",8,1
      LOADING...
      READY.
      RUN
    5. Re:Huge oversight on Sun's part by DimGeo · · Score: 1

      Strange, I thought GridBagLayout was teh roxorz. Anyway, it's probably just me, and I don't do Java anymore here in the northwest.

    6. Re:Huge oversight on Sun's part by VGR · · Score: 4, Interesting
      I haven't used Java in awhile, but I remember coming up with Shakespearean-esque curses to describe what I thought of GridLayout and their buddies.

      I'm guessing you really mean GridBagLayout, since GridLayout is a different and very very simple layout.

      I realize GridBagLayout is hard to learn, but over the years I've learned that you cannot avoid it.

      Sun has tried three times to make a "simple" replacement for GridBagLayout. Each attempt utterly fails as a replacement (but each is useful for some other rare types of layout needs).

      I've tried to make my own "simplified" version of GridBagLayout too. In fact, I suspect nearly every intermediate Java GUI programmer tries this at some point; it's almost a rite of passage. And it's always a failure. The reason is that UI layout simply is that complicated, and there's no way around it. If you think it's simpler, then you probably aren't aware of all the issues involved.

      A UI builder won't make it any simpler. It will just make it easier for you to ignore the issues. The usual result of such "freedom" is that the resulting UI looks acceptable, but doesn't have acceptable behavior. For instance, to pick a simple case, a scrolling list doesn't resize when the window containing it resizes.

      --
      The Internet is full. Go away.
    7. Re:Huge oversight on Sun's part by Anonymous Coward · · Score: 0
      Personally I'd like to see something like XUL where the GUI is specified using a markup language.
      You mean like this or any of the projects listed here?
    8. Re:Huge oversight on Sun's part by Synonymous+Cowherd · · Score: 1

      I have been using JFormDesigner for about a year now, on both Mac and Windows. It really speeds up the usage of complex powerful layouts like FormLayout, or GridBagLayout, if you must use that.

      The ability to switch the look and feel in the design mode is also a nice feature.

    9. Re:Huge oversight on Sun's part by autophile · · Score: 1
      JGoodies Forms. It's what GridBagLayout should have been.

      --Rob

      --
      Towards the Singularity.
    10. Re: Huge oversight on Sun's part by gidds · · Score: 1
      Well said.

      In fact, my First Rule of Java GUI Development is that any given layout, whether it starts off using a BorderLayout, FlowLayout, or whatever, will eventually get rewritten to use a GridBagLayout. None of the other LMs is sufficiently flexible or powerful, and you always end up hitting one of their limits.

      People bemoan the complexity of GBL, but as you say, it's irreducible complexity. (With the possible exception of internal padding, which I never use.)

      If there's a problem, it's with Sun's implementation of GBL. It's generally pretty good, but has a few unfortunate features, for example:

      • It only allows 512 children. (I believe this has been fixed in later JDK versions.)
      • It takes 12KB of memory regardless of how few components it's holding, and temporarily allocates a further 12KB each time it gets laid out or has its size calculated. (Ditto.)
      • If it can't lay out everything at its preferred size, it completely ignores preferred sizes and lays everything out based on their minimum sizes. This sounds logical, but means that layouts suddenly 'jump' when resized below the preferred size, and can look very strange at small sizes. Instead, it should scale components down smoothly from their preferred to minimum size, taking both into account.
      • It does very stupid things if it can't even give everything its minimum size (e.g. giving some components negative size in order to give others positive size). It should be much more intelligent about this.
      • Its alignment options should include one for text baseline as well as for component top and bottom.
      If these were fixed, there'd be very very little GBL wouldn't be suited for. One of these days I'll try to write a drop-in replacement for GBL which fixes these things; it's been on my to-do list for ages, but I haven't found the time. (Understanding Sun'd implementation is also very hard.) Anyone tried it?

      --

      Ceterum censeo subscriptionem esse delendam.

    11. Re:Huge oversight on Sun's part by nodrogluap · · Score: 2, Informative

      Speaking of GridBagLayout, this is the funniest animation I have ever seen...

      http://madbean.com/anim/totallygridbag

    12. Re: Huge oversight on Sun's part by VGR · · Score: 1
      • If it can't lay out everything at its preferred size, it completely ignores preferred sizes and lays everything out based on their minimum sizes. This sounds logical, but means that layouts suddenly 'jump' when resized below the preferred size, and can look very strange at small sizes. Instead, it should scale components down smoothly from their preferred to minimum size, taking both into account.
      • It does very stupid things if it can't even give everything its minimum size (e.g. giving some components negative size in order to give others positive size). It should be much more intelligent about this.

      I agree wholeheartedly. The problem can be ameliorated by setting components' minimum sizes to their preferred sizes (especially JTextFields), but it's still a pretty brain-dead "throw your hands up in the air" behavior.

      • Its alignment options should include one for text baseline as well as for component top and bottom.

      Yes, that one was overdue. It's now in 1.6.

      --
      The Internet is full. Go away.
    13. Re:Huge oversight on Sun's part by phaggood · · Score: 1

      That made me laugh out loud, the part when he resized the window and the two textboxes disappeared, the kind of laughter that only comes from remembering a truly painful experience.

  9. Faces in the Crowd by Doc+Ruby · · Score: 3, Interesting

    Possibly Java's greatest strategic feature is the classloader that can dynamically retrieve classes across the network at runtime and safely instantiate them. If Java had a standard API and data format for de/serializing UIs that accommodated their remote contexts, applets could become much smaller and dynamically bound to the UI facilities of their arbitrary runtime platforms. If these mobile UIs were componentized with a consistent internal API, applets could share UI elements among themselves on the same host. That architecture would not only reduce distribution size and increase flexibility, but it would promote reuse of the same UI components across applets, increasing user productivity with fewer learning curves.

    If those APIs don't already exist, reusing an existing one, especially Flash, would offer possibilities for reusing existing components or patterns already populating the Net.

    Java could increase its stature among distributed architectures. And make our lives easier.

    --

    --
    make install -not war

    1. Re:Faces in the Crowd by tcopeland · · Score: 1

      > Possibly Java's greatest strategic feature is the classloader
      > that can dynamically retrieve classes across the network
      > at runtime and safely instantiate them.

      It's kind of interesting how this feature conflicts with Java's static typing system. I mean, if you're receiving a bytestream across the network you need to have some sort of way to unmarshal it into objects, and doing that in Java involves a fair bit of casting and exception catching. You see the same sort of issues with XML to object mappers, ORMs, and so forth.

      Static typing has its advantages, but it seems to get in the way more and more when you're doing interesting things.

    2. Re:Faces in the Crowd by Anonymous Coward · · Score: 0

      I believe Sun JINI already does what you say.

    3. Re:Faces in the Crowd by Doc+Ruby · · Score: 1

      Typing the incoming class doesn't seem to be a big problem. Maintaining consistent namespaces can be a problem, but that's a reason the classes have a single namespace ensuring global uniqueness and identity, .. Why cast to a type, when you can just use the original type, called by name to the classloader?

      --

      --
      make install -not war

    4. Re:Faces in the Crowd by tcopeland · · Score: 1

      Right, but aren't there a flurry of ClassNotFound exceptions and whatnot to catch? Also, I guess what I'm thinking about are things like:

      person = readFromNetworkSocket(); # reads in a Person
      puts person.age; # yay, we're calling methods

      where you don't have a predefined Person type; instead, the data gets read from the stream and a new type is defined at runtime.

    5. Re:Faces in the Crowd by Doc+Ruby · · Score: 1

      There will be ClassNotFound exceptions when the loaded class is instantiated without classes to which it refers not being either preinstalled or downloaded at runtime. Both design flaws by the applet programmer, not the language. What's the alternative? Other than resolving symbols across the network, which is a job for a future runtime platform, and a future network with much less latency (like a quantum entangled one ;).

      I'm not sure how you declare the Person class before you instantiate it from the class loaded by the network. But I'm sure the classloader has that facility, or else it's totally useless. And since there are many programs using the classloader, it's apparently useful.

      --

      --
      make install -not war

    6. Re:Faces in the Crowd by tcopeland · · Score: 1

      > I'm not sure how you declare the Person class before
      > you instantiate it from the class loaded by the network.

      Right, exactly - since Java is statically typed, the type needs to be declared somewhere - probably via an existing interface or base class or some such. That's kind of the beauty of dynamic typing - types don't need to be declared in advance.

    7. Re:Faces in the Crowd by Doc+Ruby · · Score: 1

      Yes, but I'm just claiming ignorance. That doesn't mean there is no facility for declaration, against which (among other specs) the classloader (or the VM) validates the class on instantiation. Since the classloader would be useless without such a facility, it must exist, because it's used enough to indicate usability. Someone else must know, even though I don't.

      QED, pronounced "talking the talk, not walking the walk".

      --

      --
      make install -not war

    8. Re:Faces in the Crowd by tcopeland · · Score: 1

      > QED, pronounced "talking the talk, not walking the walk".

      Hehe, so true, I feel that way so often! Well, back to reading the Rails 1.2 upgrade notes...

  10. Well, when they fix all the bugs in BuoyBuilder... by Anonymous Coward · · Score: 0

    It's a nice try, and GEE, they got themselves a nice slashvertisement.

    But MAN OH MAN, you're not supposed to be able to find numerous bugs (in code and documentation) in the first hour you use ANY project, open source or payware. They've got a long way to go.

  11. Proprietary UI Builder by codepunk · · Score: 0, Troll

    No thank you, what happens when they sell a couple of copies then go under. I am then stuck with some libraries I cannot modify or upgrade and a application that will have to then be redone from scratch. I don't care how fancy your wiz bang cool ui generator is, if I do not have the code it is definitely not going into my app.

    --


    Got Code?
    1. Re:Proprietary UI Builder by Timesprout · · Score: 0, Flamebait
      I am then stuck with some libraries I cannot modify or upgrade and a application that will have to then be redone from scratch
      If your application has to be redone from scratch because you want to make some UI changes then you probably need to reconsider your career choice or invest some time in learning about patterns and tiered design.
      --
      Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
      What truth?
      There is no dupe
    2. Re:Proprietary UI Builder by Anonymous Coward · · Score: 0

      Uh, it is open source.

    3. Re:Proprietary UI Builder by 94west · · Score: 1

      That's why its release as open source as well, so you can have all the source yourself should something happen to it. Or the community at large could keep it going.

    4. Re:Proprietary UI Builder by nacturation · · Score: 2, Informative

      No thank you, what happens when they sell a couple of copies then go under. I am then stuck with some libraries I cannot modify or upgrade and a application that will have to then be redone from scratch. I don't care how fancy your wiz bang cool ui generator is, if I do not have the code it is definitely not going into my app.Right on their home page:

      "BuoyBuilder(TM) is released as Open Source under the OSL license. Royalty-free, commercial licenses are available for purchase."

      http://buoybuilder.com/DownloadData/BuoyBuilder-sr c-1.1.zip

      --
      Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
  12. Never heard of Matisse eh ? by Anonymous Coward · · Score: 5, Informative

    Java developers though are left with either hand coding of GUIs or potentially messy and brittle code generators.

    Whenever it comes to Java it always amazes me how many people have very outspoken opinions about it while its almost immediatly obvious that they hardly know what they're talking about. Then again, when reading the article its becoming obvious that when he's talking about GUI's (since when do you code in a GUI? I use an IDE for that) he actually means to say Eclipse. Don't get me wrong: I'm not dissing Eclipse here, but do question his bias.

    When it comes to building GUI's Java really allows itself to be used by code generators IMO simply because Java is very modulair build. The only problem you might face here are the somewhat limited layout managers. For the non-Java people amongst us: these basicly define the "interface" between the GUI you're building and the way it behaves. For example; when it comes to resizing or placing of the objects then you're dealing with a layout manager.

    Now... When it comes to Java IDE's two names immediatly spring out: NetBeans (my personal favorite) and Eclipse. Now that he has commented on the latter let me comment on the first. From NetBeans 5.0 and up it comes with a fancy GUI builder codenamed "Project Matisse". Its official name is now NetBeans Swing GUI builder. After taking a closer look at that I wonder if he still thinks that there are no decent GUI builders available for Java.

    The real problem here isn't so much the GUI builder but the underlying layout manager which needs to keep things in check. I think that also explains why there isn't much of this available as it looks to me as if there aren't many people about who manage to come up with decent Java coded tools which can be used and adopted by many other coders. NetBeans has solved all this by introducing a layout manager of their own, the so called Absolute Layout. Pro's are its extreme extensiveness, the con's are that if you wish to use it you'll have to ship it with your software because its not part of the standard Java Runtime Environment (JRE).

    If you wish to see a demo of Matisse in action then check out the NetBeans flash demos, especially the first part of "Why NetBeans?". Personally I'd recommend another approach, namely simply downloading NetBeans and trying it out for yourself. Its available for Linux, Solaris, Windows and I think even OS X.

    1. Re:Never heard of Matisse eh ? by Anonymous Coward · · Score: 0

      Matisse is certainly a fine GUI tool. It at least provides a nice, flexible, and intuitive layout manager. But it is still a code-generator, which I think was the main point of the original article. The layout manager issue is completely orthogonal to the issue of code generation vs. serialized UI.

    2. Re:Never heard of Matisse eh ? by mark-t · · Score: 1

      Uhmm.... Matisse sucks. I like netbeans... but I really do hate their GUI builder.

      The GroupLayout that they have bundled with it seems to crap out all the time, as previously placed components suddenly go zooming off to one side. or sometimes even out of the bounds of the component entirely, when all I did was add one more component to the parent. The number of headaches this has caused me in the past is enough to make me not even _try_ using it anymore... I now almost always use either gridbaglayout or even (gasp) absolutelayout. At least those ones work.

      Frankly, however, the thing that annoys me the most about it is that it doesn't handle custom layout managers... It really would be nice if there were a standard that the gui builder could communicate with a custom layout manager and know where things are supposed to be.

      Suffice to say that I code almost all my java guis by hand.

    3. Re:Never heard of Matisse eh ? by anomalous+cohort · · Score: 1

      Absolute layout considered harmful because the resulting GUI looks very unprofessional when the containing window is resized. It is difficult and very challenging to create a GUI builder that does not rely on absolute layout, however, it is not impossible.

      What I find interesting is the psychology in perceiving different types of GUIs. We don't expect the contents of a web page to resize when we resize the browser window because we view the browser window as a window on the web page document and not the page itself. This is not true for your typical business software windowing application. I wonder why?

    4. Re:Never heard of Matisse eh ? by Anonymous Coward · · Score: 0

      " NetBeans has solved all this by introducing a layout manager of their own, the so called Absolute Layout. Pro's are its extreme extensiveness, the con's are that if you wish to use it you'll have to ship it with your software because its not part of the standard Java Runtime Environment (JRE)."

      The layout manager they created is now called GroupLayout and it is a part of Java SE 6, as javax.swing.GroupLayout. No additional libraries are neccessary. It's solved all my layout problems, I now use it for almost any form.

      http://java.sun.com/javase/6/docs/api/javax/swing/ GroupLayout.html

  13. Interface Builder by David+Off · · Score: 2, Interesting

    > Apple has had this for years with Interface Builder

    Presumably NeXT has had it for even longer, a couple of decades or there abouts. IB was written by a brilliant French coder as I recall... he was a friend of a colleague. Short of firing up my NeXTBox does anyone remember more of the history?

    1. Re:Interface Builder by SumoRoti · · Score: 0

      I remember my NeXTcube is still alive (and even running sometimes). IB development started in 1986, so this technology exists for 20 years.

    2. Re:Interface Builder by 0racle · · Score: 2, Informative
      No, but like many things, you only need to know where to look:

      Interface Builder first made its appearance in 1988 as part of NeXTSTEP 0.8. It was one of the first commercial applications that allowed interface elements (such as widgets and menus) to be placed in an interface using a mouse.
      --
      "I use a Mac because I'm just better than you are."
    3. Re:Interface Builder by Anonymous Coward · · Score: 0

      I'm a bit curious about the comment about Vista as well, since I know at least Visual Studio 6 had a GUI dialog editor. Not as old as NeXT perhaps, but still been around for quite a while.

    4. Re:Interface Builder by David+Off · · Score: 1

      > I know at least Visual Studio 6 had a GUI dialog editor.

      It did. IB was a steeper learning curve but built nicer looking (at the time)and more robust interfaces. The Visual Studio GUI builder produced some really messy code as I recall - but I haven't used it since 1993.

    5. Re:Interface Builder by David+Off · · Score: 1

      Yes but they don't say who the author(s) is.

      Anyway I was right about the French connection Jean-Marie Hullot and Bertrand Serlet are the authors. Bertrand worked at Inria in the offices next to mine when I was an engineer at the OSF. It is interesting that Simon Patience is director of Engineering at Apple and also worked in the same office block in downtown Grenoble city. I believe their are others too.

    6. Re:Interface Builder by Anonymous Coward · · Score: 0

      Timeline: 1987: Steve Jobs invites Jean-Marie Hullot, author of SOS Interface [a LeLisp-based interface builder for Mac OS written in 1984 during his tenure at INRIA], to Redwood City to demonstrate his program. Jobs buys the rights to the program and takes on Hullot, who goes on to create [the NeXTstep] Interface Builder.

    7. Re:Interface Builder by Anonymous Coward · · Score: 0

      And wiki is wrong...

      Interface Builder first ran on the MacOS in 1987.

      It was originally written in Lisp using a MacOS Lisp development systems called ExperCommon Lisp.

    8. Re:Interface Builder by David+Off · · Score: 1

      Thanks for the extra info, I'm wondering now if it was Jean-Marie who worked in the neighbouring office block to mine...

      Exciting times and Jobs seems very able to spot winners, a talent the Sculley sorely lacked.

    9. Re:Interface Builder by sgraesser · · Score: 1

      > Apple has had this for years with Interface Builder

      Apple has had many interface builders over the years. The MacApp framework (originally created for Lisa application development) has used a binary view format since 1986. There have been at least three view editors used for editing MacApp view resources; ViewEdit, AdLib and IcePick. ViewEdit was released with MacApp 2.0 in 1986. IcePick was first released in Nov 1991. AdLib was first released in Nov 1992 .

      --
      Author of IcePick

  14. Hybrid approach for fast dev - good code by another_drone · · Score: 1

    I find that the code generators/visual dev environments never create truly maintainable code that adheres to good coding conventions/standards when working with a reasonably complex user interface design.

    My approach is to use the GUI designers to quickly prototype the UI and for fast proof of concept. Once I am pretty close to the requirements, it is time to refactor to good coding standards.

    With regard to Java, the only approach that I have seen that is flexible and maintainable is to provide the correct getters/setters for Introspection (e.g. a JavaBean) so that your GUI Widget can be manipulated by a Visual designer for future use in other UI's and for maintenance.

  15. ...Or you can download NetBeans for free by Anonymous Coward · · Score: 0

    NetBeans (available as a Free download) has a very nice built-in GUI builder.

    1. Re:...Or you can download NetBeans for free by Anonymous Coward · · Score: 0

      but it is a code generator ...

  16. Mods by Anonymous Coward · · Score: 0

    If you don't understand a comment, don't mod it overrated. Here's a clue: F3 & Jaxx

  17. None ! by Anonymous Coward · · Score: 0

    Swing is cool, but we should not code Swing UI manually. By the way, XUL is not an alternative either. Only XMLSchema + SVG has good potential as fundations. Anyway, UI should be more objec model driven than today "hammer party" ...

  18. "some XML, some proprietary binaries" by Anonymous Coward · · Score: 0

    Try "some proprietary XML, some proprietary binaries". XML is not some magical pixie dust that makes anything encoded with it suddenly open and non-proprietary. A proprietary XML format that happens to be somewhat easier to read than a proprietary binary format is no less proprietary.

    1. Re:"some XML, some proprietary binaries" by Doctor+Faustus · · Score: 1

      A proprietary XML format that happens to be somewhat easier to read than a proprietary binary format is no less proprietary.
      Perhaps not in a legal sense, but it's a hell of a lot easier to reverse engineer.

    2. Re:"some XML, some proprietary binaries" by iluvcapra · · Score: 1
      A proprietary XML format that happens to be somewhat easier to read than a proprietary binary format is no less proprietary.
      Perhaps not in a legal sense, but it's a hell of a lot easier to reverse engineer.

      Also, you can check an XML GUI source into an SCM, and then have a chance of merging and diff'ing it, which is impossible with the binary formats (my one serious gripe over interface builder).

      --
      Don't blame me, I voted for Baltar.
    3. Re:"some XML, some proprietary binaries" by chochos · · Score: 2, Informative

      Subversion can diff binaries, so it's not impossible. Also, as a sidenote, I remember a CLI tool that could read a NIB file and spit out a text file describing all its contents. This text file could be used to generate another nib file, so it was very useful when upgrading between incompatible versions of IB, and maybe it could be used to store release versions of NIB files in CVS.

  19. Just Use Swing by mrcparker · · Score: 2, Insightful

    XML-based Swing GUI tools are really a dime a dozen, and always seem to add an extra layer of complexity to Swing-based apps. Swing is a really nice component system, and pretty much every object is easily extendable. Personally, I have tried a good deal of the XML-based systems, and really using Swing as it was intended is the way to go. Build your own components, extend them, combine them. I know that there is this idea that you hand over the frontend to a designer, but we all know that most of the time it is the developer hacking on the frontend.

    I can understand why people think they need XML-based systems. So much Swing-based code sucks ass. Putting all of your buttons and frames in a big-ass method is nasty and hard to maintain. Well-thought-out componentized Swing code is easy to maintain and nice to look at. Plus, once you are finished with your project, you can re-use any components you built. Swing is a great library - more people need to just learn it.

  20. Serialized junk by Anonymous Coward · · Score: 0

    I hate java applications.

    Developers constantly make excuses and try and blame something else for the poor performance. But the end user experience is pretty much always lacking.

    I grew up using X windows in the 80's.. I watched applications and UI's get faster and faster... It all seemed to go downhill with java. Systems can't get fast enough to overcome the serialization and the bloat (BTW, Hi Firefox!).

    1. Re:Serialized junk by Anonymous Coward · · Score: 0

      Swing never felt quite right. Normally I open up menus and close them by clicking on the title bar in fullscreen apps. Works in everything, just not Swing. Drag around the columns in a table doesn't feel native. The imitation file chooser in windows is garbage.

      Initial class load/compile times are still pretty hard to ignore, especially when the files are uncached, and especially on older hardware.

      The solution, of course, is to just buy faster hardware, you cheap bum, and have all your users buy faster hardware too. So simple!

    2. Re:Serialized junk by Anonymous Coward · · Score: 0

      Faster hardware doesn't do much when the problem is serialization in the GUI/toolkit..

      Fact is, the time to open a new xterm on a Sun 3 with a 60mhz 68020 and 32MB of ram is pretty similar to my amd64 3200 with a 6800gt graphics card... 60 mhz!

      And let me just digress and say a lot of multi-threaded apps leak memory. I'm tired of that too ;-)

  21. Re:Well, when they fix all the bugs in BuoyBuilder by 94west · · Score: 1

    If you report some bugs maybe they would get fixed AC. We are quite willing to fix anything that has been reported, but as of yet, nothing has been reported.

  22. or... by Anonymous Coward · · Score: 0

    just don't use Java. Problem solved. Java's a great technology, but for end user applications that require GUIs? Not so much.

  23. Check out Sun's wrongdoing! by Anonymous Coward · · Score: 0

    Right over here! http://malfy.org/

  24. IBM's AUIML by Anonymous Coward · · Score: 1, Interesting

    I find IBM's AUIML to be an amazingly good solution. You can design the GUI with a visual tool and write code that runs in Swing as well as in a web server (as a web or portal application). Here's a link to AUIML page on AlphaWorks: http://www.alphaworks.ibm.com/tech/auiml Download seems to be outdated at this time. Look for version 6.x if you want to give it a try.

  25. Apache Velocity by Roy+van+Rijn · · Score: 1

    I've been developing a lot of applications lately with J2EE (thus Webbased). There are some cool things happening there, for example good integration with JSF and Dreamweaver. This lets designers use Dreamweaver while the programmers are programming the back-end.

    Also one thing that might be worth looking into is Apache's Velocity, templating at a whole new level.

  26. Glade by RichiP · · Score: 3, Interesting

    The Java-Gnome Project uses Glade to build a serializable (to XML) GUI.

  27. Hand coding GUIs by hey! · · Score: 1

    I see nothing wrong with this.

    Hand coding may not promote a clean separation of concerns, but it does nothing to preclude it. Interface generation does not ensure a clean separation of concerns. In fact I doubt that it does anything significant to promote it.

    The problem is that the controller tier is still a user interface component, which many engineers don't seem to understand. The achilles heel in most MVC programs are bloated, unmaintainable controllers. You still end up with important assumptions being spread hither in yon in user interface code. The fact that it is non-visual interface code makes no difference at all. What you end up is not, fundamentally, different from the typical VB program, but often minus the convenience of tying UI elements to event handlers in the IDE.

    There's nothing wrong with the MVC pattern, but there is cargo cult that has grown up around it, spurred by the impedance mismatch between browser presentations and server side processing.

    You can't force people to do good design by making what the produce resemble a good design.

    With respect to XML and other data representations of views, I've dabbled in them, and have not been that impressed. Consider isomorphic view represenations, one in Java and one in XML. Once you've gone through the effort of separating out your contol logic, there isn't much to choose between them. Sure, the XMl is probably language independent. But the Java is trivial, which helps make your code independent of the framework.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    1. Re:Hand coding GUIs by Anonymous Coward · · Score: 0

      Sure, with hand-coding Swing UIs you can certainly properly separate your concerns. I don't think that is the issue. What if you don't want to hand-code your UI? What are your choices then? Most of the existing tools generate code, and that generated code puts a lot of "controller" logic in the "view" code. It is the code generation that precludes good separation of controller and view--or if not precludes, at least guides you in the wrong direction. But if there is no view code, it is hard to put your controller logic there. That's why I would prefer a solution that does not store the view representation as Java source code.

    2. Re:Hand coding GUIs by hey! · · Score: 1
      I can sympathise with what you're saying.

      I think part of my point is view/controller integration, while not ideal, is not that huge a problem, because they are both user interface elements. What's a big problem is the failure to abstract business domain logic. Whether or not you put it in a "model" tier is mere quibbling. It doesn't matter, as long as its not in the UI. Compared to that the gains of decoupling the view and controller are modest.


      That's why I would prefer a solution that does not store the view representation as Java source code.


      It is not possible to do a fully general purpose view object in something that has no code in it -- at least not and reap the kind of benefits you are talking about. For example, consider the problem of trying to represent something like your typical color picker wheel dialog as XML. Once you desire to create a sufficiently powerful general purpose view tier, you pretty much end up having to either create a very tightly coupled controller that knows about the internal details of the view, or you end up embedding scripting capabiities in your view engine. If your controller is tightly coupled to the view's internals, in effect they have to be considered one unit of software, whether or not they are in separate files. If your view engine has scripting capabilities, you've reopened Pandora's box.

      What you can do in a pure view with no scripting capabilities is so trivial, you might as well do it with a property file and a simple view generator. I've taken this approach in systems that generate views on the fly out of flat metadata records. In fact, this is a kind of sweet spot between elaborate MVC frameworks and just banging out code coupled to the UI, because it discourages creating a lot of redundant controller objects. That could be said to be a big fault of most MVC designs, so much of the controller code is redundant. Instead, special cases can be handled by introspection, kind of IOC style.

      In my view, dealing with one-size-fits-all approaches to user interfaces lends itself to mediocrity.

      It's not easy deciding on tradeoffs betwen framework complexity and abstraction. For example application naviation is a UI aspect that is sometimes abstracted from the controller. It's a plausible idea, but not a one-size-fits-all best-practice-in-every-case thing. 95% of the time it just makes development and maintenance more tedious. Every so often it's a huge win.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    3. Re:Hand coding GUIs by mrcparker · · Score: 1

      You know, your view can be in the same langauge as the rest of the code. Plus, not all gui apps need to be strict mvc applications.

  28. SVG + XBL by Anonymous Coward · · Score: 0

    Scalable Vector Graphics (http://svg.startpagina.nl) with a bit of XUL maybe
    and eXtensible Binding Language are what i'm eyeing

  29. Ivory Tower? by shaneh0 · · Score: 1

    If it were $3000 that would be an "ivory tower response." But $300? That's basically one days salary for a developer.

    1. Re:Ivory Tower? by Randolpho · · Score: 1

      Wow. I wish every developer made 78k annually. And by that I mean I wish *I* made 78k annually.

      --
      "Times have not become more violent. They have just become more televised."
      -Marilyn Manson
    2. Re:Ivory Tower? by sottitron · · Score: 1

      Yeah, but it costs a company more than $300 a day to pay for a $78k a year developer.

    3. Re:Ivory Tower? by johnfink · · Score: 1

      $300/day does not make $78k annually. Ok, it does, but we're not talking about apples and apples. It depends on the type of business, the way it's run, and a million other factors, but overhead for an in-house employee is between 50-70% of the cost to maintain that employee, the rest being salary/wage. That means, if you cost your employer $300/day, that means you get between $35k and $50k per year on your pay stub, or around there.

  30. GUI One of biggest Flaws in java by Anonymous Coward · · Score: 0

    Java applications never became a hit in desktop environment because of two reason imh
    JVM Speed issues which will go away over the time may be
    GUI and stupid layouts.
    Why cant we have one generic layout Manager where we can place our GUI items without layers etc and define its position from boundaries in terms of ratios/percentages. so even if some one maximizes/scales the window nothing goes out of the place and the programmers dont have to juggle with layers and transparent layers and containers and panes .......

  31. IntelliJ by sproketboy · · Score: 2, Informative

    IntelliJ's designer does exactly that. I saves the UI code in XML files and you only need to code the specific business logic in a seperate class. The designer itself is quite nice as well.

  32. TrollTech's Jambi does this quite nicely by yerM)M · · Score: 2, Informative
    It can be used opensource (GPL) as well as commercially. Here is the link to the tech preview.

    I have to say, I'm pretty impressed so far.

  33. Who builds GUI's anymore.... by tomq123 · · Score: 1

    Every single application I build these days, either for business or for personal use are based on a web UI. Java has incredible MVC frameworks for building web based applications from Struts, Spring, Tapestry, etc... Honestly, if someone is building a Swing based GUI, I'd have to ask: WHY?

    1. Re:Who builds GUI's anymore.... by twehrle · · Score: 2

      Anyone writing internal applications that want a rich user interface. Not everyone writes blogging/email/im/forum/newsfeed software.

    2. Re:Who builds GUI's anymore.... by tomq123 · · Score: 1

      Granted, initial web based UI's were very limited to just some form filds on a page. But with todays technologies (specificially Ajax libaries) and other open source tools you can build some incredibily rich and interactive web based UI's. Also, using a framework like Spring really allows you to build your applications with true seperation of your business, persistance, and presentation layers.

    3. Re:Who builds GUI's anymore.... by Anonymous Coward · · Score: 0

      Ha, the web is so obsolete. First came the native GUI then the web based application and the next evolutionary stage is the postal GUI. We have our beta framework working via electronic mail and hope to have the print and post system up and running soon. This revolutionary system will mail the user a printout of a GUI and they use ink to indicate what action they want to perform and then mail the printout back to us. After AJAX, it's the next evolutionary stage in interaction design.

      Otherwise, yeah. Native, reponsive GUI's; who the fuck would want to use those in this day and age?

    4. Re:Who builds GUI's anymore.... by VGR · · Score: 2

      Maybe I'd like my application to have a menu bar which can be navigated with the keyboard.

      Maybe I'd like drag-and-drop of files or images or custom data.

      Maybe I don't care for the cardinal UI sin of having scrolling areas inside other scrolling areas.

      Maybe I want a context menu.

      Maybe I want something HTML doesn't provide, like a table with selectable rows.

      Maybe I don't want to worry about disabling the "Back" button.

      Maybe I don't want to worry about a user double-clicking a form submit button.

      If UI libraries were motor vehicles, HTML would be a skateboard. It's absurdly primitive, because, well, it was never meant to be a UI framework. It's for documents.

      There's a reason "Web 2.0" is a laughingstock among those of us who care about UI design.

      --
      The Internet is full. Go away.
    5. Re:Who builds GUI's anymore.... by tomq123 · · Score: 1

      Ah...there was a time when people could have a thoughtful, argumentative, and meaningful discussion about technology issues. Good times!!!

    6. Re:Who builds GUI's anymore.... by Anonymous Coward · · Score: 0
      Sarcasm often presents itself as a more interesting way to make the point and claims of AJAX supplanting the traditional GUI appeal to absurdism.

      What else did you expect?

    7. Re:Who builds GUI's anymore.... by Myopic · · Score: 1

      are you suggesting that webpages have the same level of functionality as real GUIs? i imagine you aren't, because that would be absurd.

      even so, i am impressed with how much can be done with a modern browser.

  34. Serializing GUIs is difficult? by bill_kress · · Score: 1

    I've always wondered why simply serializing a GUI wasn't used more in Java. Perhaps because Swing is so easy to use. Most java programmers I've known in the past shunned any type of GUI development tool in favor of hand-coding swing because it's so much more straight forward.

    Also, it's difficult to get reuse out of a GUI editing tool, but very easy to get it by hand-coding. I generally write factory-type code that handles generating menus, buttons and linked Actions together, in a GUI tool you will often end up having to deal with each of these separately.

    Much of the GUI code I've had to deal with is in the form of Properties sheets (large number of controls in predictable patterns). You absolutely should never generate this kind of GUI--or hand code the gui itself for that matter. The entire GUI should be generated from data files.

    So in the past, RAD tools for swing were used by more amateur less professional users, and the amateur users are going to feel much more comfortable with generated code. Now that the tools are coming up to the point where professionals are starting to use them, I think we'll see a lot more cases of "Serialize out a finished screen at design time" and "Serialize it back in at runtime". (This was in some of SUN's original Java tools if I remember correctly).

    1. Re:Serializing GUIs is difficult? by Midnight+Thunder · · Score: 1

      I would rather deal with Mac's interface builder any day, than deal with complexities of some of Java's Layout Managers. Sure it could be down to my incompentance, but dealing with things like GridBagLayout is a nightmare.

      --
      Jumpstart the tartan drive.
    2. Re:Serializing GUIs is difficult? by bill_kress · · Score: 1

      GridBagLayout is intended for use by GUI builders only. Not understanding that fact emphasizes your point about a lack of experience (competence is a little much).

      Every java programmer I've known nests BorderLayout and other common layouts that fit the need.

      But I understand the Mac interface builder is pretty good. So is the VB one by the way. When either works for all platforms and allows the GUI to be manipulated by code as easily as with java, I may re-evaluate it. (For instance, I used to use VB and to create a new control with code at runtime was a terrible mess of hidden control arrays... I hope it got better)

      Java's slower development of toolkits is akin to complaining that jet liners don't have parachutes. Sure it might help to add them, but rarely and not much--so we just don't. I really would, in fact, avoid airlines that thought they were a good idea.

  35. ResEdit by johnrpenner · · Score: 1

    it was in 1984 that we already had ResEdit which abstracted the whole GUI from the code -- it did such a good job, that end users could open a shipping application executable, and go in and change bitmaps, menu keyboard shortcuts, dialogue texts, and sounds -- so long as they kept the same resource ID, the app would keep on working.

    this system was eminently useful in getting mac applications translated into languages other than english, as any user could open the shipping application with resedit, start translating strings, save a copy of the resource, and start shipping a translated version. if the translated text was longer, and wouldn't fit in the dialogue box -- no problem, you could alter the window dimensions right there, and since the ID of the dialogue box was still the same, everything still worked.

    brilliant, that's how good it was in 1984... then came windows, and we lost all that. some of it survived in the NeXT OS, which carried over the 'Interface Builder' paradigm to unix. this is ultimately the source of application frameworks, and the nested folder structure of an .app in OSX, and its a really nice system once you work with it -- it also lets people responsible for layout to do so without having to bug the programmers. abstracting the GUI from the code like this lets the programmers concentrate on coding, and helps the GUI guys get the tools to make things right from the user perspective.

    best regards,
    j.

  36. XStream by MikkoApo · · Score: 2, Insightful

    I use XStream which is very nice xml serialization utility library. XStream has very nice aliasing abilities, so you can trim the xml to very close to absolute minimum ( 2 minute tutorial).

    Currently I'm planning on externalizing website validation objects as xml so they can be updated more easily and dynamically. It's basically the same thing you describe and I can easily see how it would help with GUI programming. To get around the "attaching actions to the components" problem you can use the MVC design pattern. Set the gui elements to return an event id and use a central controller class to send the event flow to the proper commands.

    The XML-serialization has a few problems though:

    • Versioning, what if the classes change and what if the data model changes really radically.
    • XML data doesn't get refactored when you refactor your classes.
    • XML data might not stay in synch with your codebase.
    • The XML becomes easily convoluted and at worst you'll be coding in XML without the help of a friendly IDE.

    Anyways, XSLT can be used to convert older XML formats to new format and XStream's aliasing functions helps, but you still have to be careful when making changes.

    1. Re:XStream by AKAImBatman · · Score: 2, Informative
      I use XStream which is very nice xml serialization utility library.

      I have played with XStream a bit. It's nice, but it has the disadvantage of (at least when I tried it) not being able to correctly serialize a Swing GUI. The Java Bean libraries are tweaked to understand Swing classes, so they correctly serialize the GUI in nearly all cases. (Minus a few of the fine details I was mentioning.) Deserialization is a minor issue in comparison.

      he XML-serialization has a few problems though:
      * Versioning, what if the classes change and what if the data model changes really radically.

      I presume you mean the Swing classes? This can't happen with Java. The system stays backward compatible at all times, so it's practically guaranteed that your XML won't change from under you. The only time this is a concern is if you mix in third party components. In that case, you're sort of screwed whether you serialize to XML or not.

      * XML data doesn't get refactored when you refactor your classes.

      This is true, but it's again not a problem with Swing serialization. Unless Sun decides to reboot the Java platform. the Swing classes will remain compatible.

      * The XML becomes easily convoluted and at worst you'll be coding in XML without the help of a friendly IDE.

      Again, not a problem with my approach. Since I did up the GUI in Netbeans, I could always modify the GUI and regenerate an XML file. The worst case scenario was that I'd need to tweak a few points in the XML after regen. It was a rather painless process. :)

      * XML data might not stay in synch with your codebase.

      If you need to add widgets or what-not, then you can always modify the GUI, and regen the XML. The really great part about decoupling with XML, though, is that it becomes really easy to just redo your GUI from scratch. Usually, if a GUI starts to look like a Redneck Christmas Tree, the cost of redoing it is unacceptable. (i.e. All the code is mixed in with the GUI layout.) When the GUI is decoupled, you can create a new GUI in the GUI Builder, and then serialize a new XML file to replace your old one. As long as the hooks into the GUI are the same (I used the "name" property), your code should operate without change.

      If you're familiar with DHTML/AJAX, it's a bit like coding the HTML separate from the Javascript. Since the Javascript does a document.getElementByID(), you can recreate the HTML with a different look as long as the element ids remain the same. :)
  37. Don't use GUI builders by amightywind · · Score: 1

    GUI builders have been around for as long PHB's have wanted to insert themselves into the development process to speed up development. Don't use them. GUI builders relieve the programmer of the easiest, least demanding part of the development process - widget creation and layout. They add overhead and obscure GUI API's. They offer little to better organize interface callbacks into a nicely designed program. In fact the combination of generated and custom code will leave the next guy who has to maintain your program to wonder what you were thinking.

    --
    an ill wind that blows no good
    1. Re:Don't use GUI builders by Anonymous Coward · · Score: 0

      Maybe you mean "Don't use code-generating GUI builders"?

  38. Standard answer: XUL by mikelang · · Score: 1

    Why not to use Mozilla XUL instead? There are many proficient pure-Java implementations of XUL, including tiny Thinlet.

    1. Re:Standard answer: XUL by Anonymous Coward · · Score: 0

      Both use a "bad" license. GPL and LGPL (which is too fuzzy when it comes to java).

    2. Re:Standard answer: XUL by mikelang · · Score: 1

      No longer too fuzzy... It seems that Sun will go GPL :-)

  39. Nice by Silvah · · Score: 1, Insightful

    I'm not sure why Java GUI's being behind the curve and difficult to work with is news. Anyone who has actually used the word 'Gridbag' knows that Java GUI development is a process somewhat akin to Chinese water torture.

  40. having trouble digesting this... by geekschmoe · · Score: 3, Insightful

    Neither of which promote good MVC separation. In fact they tend to encourage violations unless you are a very disciplined coder.

    I don't mean to sound all high and mighty, but if you aren't a disciplined coder, then you're not very serious anyway. You can pre-plan the MVC design to your hearts content, but it takes discipline to stay within the boundaries of the original design. Especially since if you don't then you create one of the worst anti-patterns ever, making you wish you'd just written one monolithic chunk of procedural code because bugs/changes would be doable.

  41. Qt Designer is free by wealthychef · · Score: 1

    If you use Qt for your interface, their GUI builder is pretty good. And it's free. And it generates C++ that you can inspect, modify and understand.

    --
    Currently hooked on AMP
  42. What good resource based GUIs are there? by Midnight+Thunder · · Score: 1

    So what good resource based GUI builders are there for Java? This is the one thing I have been hunting for, after having developed for the Mac and Windows. I can't stand code generators, since the code is usually large and ugly, and usually require some hand tweaking because the code generation has limitations. I once saw a solution that was written to use XML for the resources, but it ended up almost being as large and monstrous as the Java code it was meant to be replacing.

    Maybe using Microsoft's GUI XML format could be a solution? Quite honestly I really think a JSR to make a standard Java GUI resource format would go a long way.

    --
    Jumpstart the tartan drive.
    1. Re:What good resource based GUIs are there? by Anonymous Coward · · Score: 0

      FOAM and BuoyBuilder. Seems like there a Ribs or something too, or nib4j or something, which may require you to actually use Apple's Interface Builder.

  43. Messy and brittle? What is he talking about? by Anonymous Coward · · Score: 1, Insightful

    Java already has external XML GUI description files. They are the .form files generated by Matisse. Matisse lets me drag and drop together a GUI just like any other drag and drop program. It's not brittle; it's rock-solid, fast, and it makes the best-looking forms I've ever seen. At this point I would prefer to build a Swing app over a Web app, because Matisse makes the Swing app so much easier to build and make it look good.

    The one problem with Swing is it is capable of doing too much, which makes some of the simple stuff more complicated than it should be. But I can do any kind of visual effect I want to do. Spend a week or two using Matisse and then decide what you think about Swing.

  44. cough HYPERCARD cough by SimHacker · · Score: 1

    HyperCard was originally released with System Software 6 in 1987.

    HyperCard was more advanced than NeXTStep in 1987, and in many important ways it is still is more advanced than Cocoa in 2006. In all the 18 years since the release of NeXTStep, it STILL does not let users edit their user interfaces the way HyperCard did. It has none of the user-customizable run-time flexibility, which was one of the most important features of HyperCard: it enabled anyone (even kids) to construct their own user interfaces.

    Even OpenDoc (from 1992) and Cyberdog (from 1996) let users edit their own interfacs at run-time.

    The technology behind Apple's Cocoa is old an outdated, and unimpressive and unimaginative compared to older but more advanced technologies that Apple dumped and forgot about.

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
    1. Re:cough HYPERCARD cough by EMB+Numbers · · Score: 1

      I am sorry, but HYPERCARD was and is a toy. It is fun and assesible to children, but it is not suitable for serious application development: particularly if more than one person is involved in the development.

      In contrast, most important (quite possibly all by now) Mac OS X applications including the iWork suite were developed with Interface Builder and in most cases Cocoa. The very first web browser was developed with the precursor to Cocoa and Interface Builder. http://www.w3.org/People/Berners-Lee/WorldWideWeb. html

      Tim Berners-Lee worte "I wrote the program using a NeXT computer. This had the advantage that there were some great tools available -it was a great computing environment in general. In fact, I could do in a couple of months what would take more like a year on other platforms, because on the NeXT, a lot of it was done for me already. There was an application builder to make all the menus as quickly as you could dream them up. there were all the software parts to make a wysiwyg (what you see is what you get - in other words direct manipulation of text on screen as on the printed - or browsed page) word processor. I just had to add hypertext, (by subclassing the Text object)"

      Lotus Improv, the original Doom level editor, the untire user interface of NeXTstep were developed with Interface Builder.

      What exactly was ever developed with HYPERCARD ?

    2. Re:cough HYPERCARD cough by SimHacker · · Score: 1

      What planet are you from? HyperCard has been used to develop many different applications, and has inspired a lot of other wonderful user-editable software, such as Wikipedia:

      HyperCard has been used for all sorts of hypertext and artistic purposes. Before the advent of PowerPoint, HyperCard was often used as a general-purpose presentation program. Examples of HyperCard applications include simple databases, "choose your own adventure"--type games, educational teaching aids, and the first (off-line) wiki. The wiki idea originates from Macintosh HyperCard, via Ward Cunningham [1].

      Due to its rapid application design facilities, HyperCard was also sometimes used for prototyping of applications, and sometimes even for version 1.0 implementations. Inside Apple, the QuickTime team was one of HyperCard's biggest customers. Beethoven's Ninth stack Enlarge Beethoven's Ninth stack A number of commercial software products were created in HyperCard, most notably the original version of the interactive game narrative Myst, the Voyager Company's Expanded Books, and multimedia CD-ROMs of Beethoven's Ninth Symphony CD-ROM, the Beatles' A Hard Day's Night, and the Voyager MacBeth.

      The prototype and demo of the popular game You Don't Know Jack was written in HyperCard.

      Activision, until that time primarily a game company, saw HyperCard as an entry point into the business market. Changing their name to Mediagenic, they published several major HyperCard based applications, most notably Danny Goodman's Focal Point, a personal information manager, and Reports For HyperCard, a program by Nine To Five Software that allowed users to treat HyperCard as a full-fledged database system with robust information viewing and printing features.

      The HyperCard-inspired SuperCard for a while included the "Roadster" plugin that allowed stacks to be placed inside Web pages and viewed by browsers with an appropriate browser plugin. There even was a Windows version of this plugin allowing computers other than Macintoshes to use the plugin.

      My point is, that NeXTStep / Cocoa is NOT among the wonderful user-editable software inspired by HyperCard. At this point, it's an old, obsolete architecture (just like HyperCard is now). It is limited to only developers editing the user interface. It does not support run-time scripting and user interface building and customization like HyperCard and OpenDoc did.

      -Don

      --
      Take a look and feel free: http://www.PieMenu.com
    3. Re:cough HYPERCARD cough by EMB+Numbers · · Score: 1

      I concede that HYPERCARD is/was an awesome user editable application development tool. Smalltalk is/was similar in the sense that every user of a Smalltalk application had the entire Smalltalk environment and the opportunity (if not skill) to change anything.

      You might enjoy http://www.fscript.org/ and its object browser and object injection capabilities. In fact, f-script plus Interface Builder should make any HYPERCARD programmer who wants to make serious (user editable)applications simply ecstatic.

      There are many interactive scripting environments today including Python, Ruby, Tcl, Perl, and more. You can even use Interface Builder with them. If user editable application logic is what you want, any of the scripting environments will suite you. http://pyobjc.sourceforge.net/ http://rubycocoa.sourceforge.net/doc/

      However, Interface Builder absolutely DOES enable end users to manipulate any aspect of the user interface. If you have a Mac, open any of the Next Interface Builder (NIB) files for Cocoa applications from Apple or third parties in Interface Builder and edit away. Add, remove, rearrange any GUI components. Change the menus and short cuts, add menus, add new windows, change what objects do, enlarge fonts, create your own localization,... You can even add your own custom objects that didn't exist when the application was compiled into the mix.

      In practice, people don't do this for three reasons:
      1) They don't know they can
      2) It is easy to break things or degrade the application's functionality (which was true of HYPERCARD as well)
      3) Apple and some third parties cleverly remove the data.classes file from within the nib (a nib is actually a directory of files). However, you can re-introduce a blank data.classes from any source, and Interface Builder will let you open and edit the nib. You need to open the nib "files" with "Show Package Contents" http://www.macosxhints.com/article.php?story=20060 720091325592

      References:
      Add custom objects as end user: http://www.lorax.com/FreeStuff/TextExtras.html
      Add localizations and changing nibs: http://developer.apple.com/documentation/MacOSX/Co nceptual/BPInternational/Articles/InternatSupport. html
      http://groups.google.com/group/comp.sys.next.advoc acy/browse_frm/thread/bb63e0fdbc1a6ad4/18a92b75f44 ecf64?lnk=st&q=&rnum=1#18a92b75f44ecf64
      http://groups.google.com/group/comp.sys.next.misc/ browse_frm/thread/a9961e36d73960c8/a60ebfdef5c355e b?lnk=st&q=&rnum=2#a60ebfdef5c355eb
      http://groups.google.com/group/comp.sys.next.progr ammer/browse_frm/thread/fa4dd3e06dddfaec/3ac62f070 2daf32e?lnk=st&q=&rnum=9#3ac62f0702daf32e

    4. Re:cough HYPERCARD cough by SimHacker · · Score: 1

      Can you edit the user interface of a Cocoa application WHILE it's running? Hypercard and OpenDoc were designed to do that. Simply editing a resource file while the program's not running is a different thing entirely. Can you add scripts to the resource files that modify the behavior of the program? Is the system designed to support that, or are you treading on thin ice?

      -Don

      --
      Take a look and feel free: http://www.PieMenu.com
    5. Re:cough HYPERCARD cough by EMB+Numbers · · Score: 1

      Can you edit the user interface of a Cocoa application WHILE it's running? YES, but not exactly the way you could with Hypercard.

      Please read the link provided, http://www.fscript.org/ and understand "F-Script can be dynamically injected into any Cocoa application. " I agree that Hypercard is a wonderful interactive tool as are traditional Smalltalk and modern scripting environments such as PyObjc with Interface Builder. Hypercard, to and even greater extent than REALBasic, is limited to low complexity interactive "script" environments. It just doesn't scale to full featured applications that must be developed by a team larger than 1 person. As already mentioned, many large key Apple and third party applications (in fact, pretty much all Mac applications these days) use Interface Builder.

      It is worth noting that Cocoa makes OpenDoc unnessasary and that in the past, standard object embedding has been available with Cocoa: "Open Object Embedding (OOE) is Lighthouse Design's compound document standard. OOE allows you to seamlessly create word processing documents that contain elements from other applications, for example drawings, spreadsheets, equations and tables."

      Jonathan Schwartz (Current President and CEO of Sun Microsystems) was co-founder of Lighthouse Design and sold Lighthouse Design to Sun in 1996.

    6. Re:cough HYPERCARD cough by SimHacker · · Score: 1

      I'm not arguing that anyone should be using HyperCard now, nor that it's a replacement for Cocoa. My point is that Apple had all that great stuff like HyperCard and OpenDoc in the past, and they took a big step backwards when they went to NeXTStep, whose architecture was designed 18 years ago, before the web, before XML, back when people were still arguing about Objective C -vs- C++. Third party extension and hacks aside, NeXTStep was designed a LONG time ago, and it wasn't designed to be user extensible like HyperCard (or Wikipedia, which was inspired by HyperCard).

      -Don

      --
      Take a look and feel free: http://www.PieMenu.com
    7. Re:cough HYPERCARD cough by EMB+Numbers · · Score: 1

      Point 1: Yes, Interface Builder and NeXTstep predate the web: The "web" was _created_ with Interface Builder and NeXTstep! Tim Berners-Lee says "

      The first web browser was implemented in NeXTstep and was also the first web editor. The World Wide Web application was a WYSIWYG editor with collaborative user editing features far beyind standard wiki today.

      pictures: http://info.cern.ch/NextBrowser.html

      "It has taken a long time for technology to catch up with Berners-Lee's original vision. The first ever web browser was also an editor, making the web an interactive medium, the problem was that it only ran on the NeXTStep operating system."

      Tim Berners-Lee worte "I wrote the program using a NeXT computer. This had the advantage that there were some great tools available -it was a great computing environment in general. In fact, I could do in a couple of months what would take more like a year on other platforms, because on the NeXT, a lot of it was done for me already. There was an application builder to make all the menus as quickly as you could dream them up. there were all the software parts to make a wysiwyg (what you see is what you get - in other words direct manipulation of text on screen as on the printed - or browsed page) word processor. I just had to add hypertext, (by subclassing the Text object)"
      http://www.w3.org/People/Berners-Lee/WorldWideWeb. html

      Note: He did not write the program on a Mac using Hypercard nore could he reasonably.

      12 November 1990 proposal: http://www.w3.org/Proposal.html "... we extend the application area by also allowing the users to add new material."
      http://public.web.cern.ch/Public/Content/Chapters/ AboutCERN/Achievements/WorldWideWeb/WebHistory/Web History-en.html
      http://en.wikipedia.org/wiki/Tim_Berners-Lee

      Point 2: NeXTstep predates XML: Prior to standard XML, NeXTstep used ASCII "Propert Lists" which are exactly the same concept with a different syntax and no user definable type qualification. When XML was standardized, NeXTstep transitioned to using it.

      Point 3: Very few people (possibly only you) would claim that dropping Hypercard and adopting NeXTstep was even a small step backward. You don't seem to understand what NeXTstep/Openstep/Cocoa is or what it enables or why it is still ahead of the crowd 18 years later.

      Point 4: How is Hypercard anything other than a tool to let users create quick and dirty applications also knows as "hacks" ? Don't be so quick to call things "Third party extension and hacks" particularly when they are full featured commecial tools used to build serious applications.

  45. If you haven't used Interface Builder by EMB+Numbers · · Score: 2, Informative

    If you haven't used Interface Builder (IB), then you are really missing out. Many people have a difficult time wrapping their brain around the concepts of Interface Builder, but I assure you it is across the board the best GUI builder paradigm yet invented. For a very brief introduction to its concepts, see Hold Me, Use Me, Free Me http://www.stepwise.com/Articles/Technical/HoldMe. html.

    In fact, IB should have been named "Object Connector" because it is not a "builder" at all. All IB does is let you instantiate objects, specify their initial state, and define connections or relationships between the objects. You should note that it is equally applicable to user interface objects and every other kind of object including your own custom classes. The configured objects are serialized to either a binary file or an XML file (your choice). The "Test" mode in IB just serializes and then de-serializes the object graph in memory to produce a fully functional system that you can test.

    Although Interface Builder has been available since 1988, it is actively developed by Apple and is in fact free along with the rest of Apple's development tools with Mac OS X. Recent additions to Interface Builder have included Key-Value Observing which eliminates al lot of "controller" code from a system and Data Modeler which automates a lot of "model" code.

    Steve Jobs used to state that it doesn't matter whether code is hand written or computer written, every line of code is a potential bug and a source for future maintenance. The only way to radically improve programmer and life-cycle productivity is to radically reduce the amount of new code needed to implement applications. IB is a stellar example of the wisdom oh his words. [This is also a huge win for cultural localization...)

    Given the extremely rich frameworks of objects (both GUI and non-GUI) that are available from Cocoa, IB's ability to instantiate objects and form connections and relationships between them without any code is a huge win. If you haven't used this technique, trust me: you don't know what you are missing. You will never want to go back!

    IB's down side has always been documenting (for posterity) all of the connections and relationships that are specified in IB. IB is improving on that front with XML file formats and data "entity-relationship" modeling built in. There have also been plug-in palettes that improve documentation generation.

    Just as a reminder, unlike most GUI builders, IB works equally well with your custom classes and the framework classes. You can build new "palettes" for you objects to provide slick graphical interaction, but the basic connections and relationships capabilities work with all objects with no special effort.

    Apple's IB description: http://developer.apple.com/tools/interfacebuilder. html
    There is an excellent but shallow Introduction to Interface Builder at http://developer.apple.com/documentation/Developer Tools/Conceptual/IBTips/IBTips.html

    1. Re:If you haven't used Interface Builder by EMB+Numbers · · Score: 1

      I am sorry, I posted the wrong link on Stepwise: You want Freeze Dried Objects
      http://www.stepwise.com/Articles/Technical/FreezeD riedObjects.html.

  46. Re:Messy and brittle? What is he talking about? by 94west · · Score: 1

    You should check out the Buoy project http://buoy.sf.net/, it aims to be the 10% of Swing that you need 90% of the time. Its got a great event model as well.

  47. Here's an example of how... by Anonymous Coward · · Score: 0
    I've finally come up with a GUI creation method I like.

    I use netbeans to create the GUI components with NO APP LOGIC IN THEM AT ALL. I never edit the files that the GUI builder creates. I set the flag so the components (JButtons, JTextArea's and such) are public, and give them human readable names. (i.e. viewTableButton, hostNameTextArea)

    Then in my application, I create an instance of the GUI panel wire up actionlisteners wrap it in a JFrame and I'm done. I can rearragne the GUI later, and since the widgets don't change names, it all still works.

    -- ac at work

  48. Before everybody called it "AJAX"... by SimHacker · · Score: 1

    OpenLaszlo is a great way to write "AJAXian" dynamically downloaded componentized data driven applications, that run in the Flash player and DHTML/JavaScript browsers (and eventually the J2ME Java VM).

    For many years, I've been building distributed data driven scriptable user interfaces, and evangelizing what's now called the "AJAX" architecture. Here are some old articles I wrote about X, NeWS and TCL in the 80's and 90's. Note that in this context "server" means window server (your desktop: once called the window server, now called the browser client), not web server (the remote system running the application: once called the application client, now called the web server).

    -Don

    From comp.windows.x, 1989 and xpert@athena, 1987:

    From: Don Hopkins (don@brillig.umd.edu)
    Date: Tues, Sep 19 1989 8:08 am
    Groups: comp.windows.x

    I think it's a pretty good idea to have the window manager, or some other process running close to the server, handle all the menus. Window managment and menu managment are separate functions, but it would be a real performance win for the window and the menu manager to reside in the same process. There should be options to deactivate either type of managment, so you could run, say, a motif window manager, and an open look menu manager at the same time. But I think that in most cases you'd want the uniform user interface, and the better performance, that you'd get by having both in one process.

    I think it would be possible to implement something like this with the NDE window manager in X11/NeWS. It's written in object oriented PostScript, based on the tNt toolkit, and runs as a light weight processes inside the NeWS server. This way, selecting from a menu that invokes a window managment function only involves one process (the xnews server), instead of three (the x server and the two "outboard" managers), with all the associated overhead of paging, ipc, and context switching.

    Here's a message on a related subject that I sent to xpert a couple years back (before I'd heard of the ICCCM). I never did get much response, except that one person pointed out that that was precisely the problem that NeWS was designed to solve. ;-)

    c(-; Once were done forging the menu manager standard, how about we do text editors, huh?)

    -Don

    Date: Mon, 23 Feb 87 18:31:00 EST
    From: Don Hopkins don@brillig.umd.edu
    To: ru...@ucbvax.berkeley.edu
    Cc: xpert@athena.mit.edu
    Subject: Uwm extensions, perhaps?

    Date: 23 Feb 87 19:44:43 GMT From: ru...@ucbvax.berkeley.edu (Rusty Wright)

    Marvin Solomon writes:

    What's the solution? I think it is to get rid of the idea of window manager as a separate process, and build "window-manager" functions into all windows.

    That scares me. Wouldn't we then have the problem that suntools has where the suntool binaries are huge? On my sun 3/50 the suntools program itself is 728 blocks and the various other tools that run under suntools are 952 blocks. Yuck.

    How about setting up some sort of standard? For example, all window managers must use control+shift when the mouse is in a window or an icon, and when it's in the background the control+shift is optional.

    rusty c. wright r...@weyl.berkeley.edu

    I see just the same problem with XToolKit. I would like to see the ToolKit as a client that you would normally run on the same machine as the server, for speed. Interactive widgets would be much more interactive, you wouldn't have to have a copy of the whole library in every client, and there would be just one client to con

    --
    Take a look and feel free: http://www.PieMenu.com
    1. Re:Before everybody called it "AJAX"... by Doc+Ruby · · Score: 1

      I've been watching OpenLaszlo for a couple of years. I almost attended one of their (paid) tutorial seminars, but the price was too steep without knowing the value of the dev platform.

      Can I really write a GUI app in OpenLaszlo that compiles cleanly to Java and Flash applets that run close to the same in respective VMs on PCs and mobiles/phones, as well as native apps? Or is it a meta version of Java's "Write Once, Test Everywhere", made intractable by the complexity of target platforms?

      Which IDE is best, that attaches to CVS/SVN, and (any) groupware? And what are the worst limitations/compromises in using OpenLaszlo, rather than the native languages/IDEs?

      --

      --
      make install -not war

    2. Re:Before everybody called it "AJAX"... by SimHacker · · Score: 1

      You can certainly learn the value of the platform without paying for a seminar. The development platform is free since it's open source, and it doesn't cost anything to read the online documentation, the wiki, and get involved with the community.

      Of course there are differences between the capabilities of different platforms. OpenLaszlo is most mature on Flash, which runs identically on all platform and browsers, and has great graphics and multimedia capabilities. The DHTML/JavaScript version of OpenLaszlo runtime relies on the Dojo Toolkit JavaScript AJAX library to achieve cross-browser compatibility. The J2ME version of OpenLaszlo uses the Rhino JavaScript interpreter, and its own graphics library, but it's only in the early development stages.

      There's an Eclipse based IDE for OpenLaszlo (developed by IBM), and some tools for Emacs as well.

      OpenLaszlo inherits the limitations of the delivery platform, so there are some limitations that apply to Flash and other limitations that apply to DHTML. But the API is purposefully designed to hide the differences between platforms, instead of exposing platform specific APIs directly (like the way Adobe's FLEX is designed to lock you into Flash).

      -Don

      --
      Take a look and feel free: http://www.PieMenu.com
  49. IBM's Rational Application Developer by grazier · · Score: 1

    First a disclaimer that I work for IBM. Similarly, my comments don't necessarily reflect that of my employer, etc, etc, etc...

    http://www-306.ibm.com/software/awdtools/developer /application/

    I use it for all the coding work I do. It has a GUI building tool that only generates Java code. Its much better than the old visual age line of products that required separate files to manage the GUI construction. You can even edit most of the generated code manually without fear of no longer being able to use the GUI builder. It uses (Eclipse) as its base platform so other eclipse plugins can be added to the tool. It includes extensive tools for other web related development as well (DB definitions, EJB work, XML, etc...)

    Granted, it's listed as ~$2k for 1 license, so its not for everyone, but you'd be hard pressed to find a java/web development function that it doesn't help you with.

    Dan

    --

    G

    "Plurality should not be posited without necessity." - William of Occam
  50. Foam uses XMLEncoder by gdp007 · · Score: 1

    Foam used XMLEncoder waaay back when Java 1.4 first came out. http://www.computersinmotion.com/ they have some example videos. It sure is nice to have your panels created in one line of code :-)

    1. Re:Foam uses XMLEncoder by 94west · · Score: 1

      At the risk of getting blasted for slashvertising, BuoyBuilder also loads UIs with a single line of code.

  51. The Qt Way by Brandybuck · · Score: 1

    I like the way Qt (v4) Designer does it. The output of Designer is an XML file, and during the build stage uic (ui compiler) generates a form class. This class is not a widget (as it was in v3), but a very minimal class that's only one step away from being a legitimate POD class or struct. All it essentially contains is the form's component widgets as public data members, aand setupUi() function to layout the form in the widget you pass it. It doesn't inherit from anything.

    This gives you a lot of flexibility. You can use the UI object directly, as a data member, or through multiple inheritance. You can even load the XML ui file at runtime if you wish, using the QtUiTools library. It also give you a clean OO design, as the UI itself is a stand-alone object.

    --
    Don't blame me, I didn't vote for either of them!
  52. OpenLaszlo's XML data binding approach by SimHacker · · Score: 1

    Using XML micro-formats is a more dynamic and flexible approach than persistent objects. Your data is much too important to tie it directly to the internal implementation of one particular version of one particular class.

    The approach that OpenLaszlo takes is XML data binding and declarative constraints. You design XML "micro formats" for your data, and then you can write many different views and editors of the same data, by binding different OpenLaszlo classes to the XML data with XPath constraints and JavaScript expressions. (As well as methods and event handlers written in JavaScript, declared in XML).

    That way you can have many different viewers and editors that are compatible with the same XML data, and you can use constraints and JavaScript to bind and tailor off-the-shelf and custom widgets together with the XML data. JavaScript constraints are automatically updated when the values they depend on are changed. The two-way XPath data binding between the XML and the OpenLaszlo objects automatically updates the XML and all other views bond to the same data.

    It's not just old-school cargo-cult MVC. OpenLaszlo uses a more powerful, general purpose, easier to use approach: data binding (XPath), declarative constraints (JavaScript), with a prototype based class system.

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  53. Jigloo is awsome by Anonymous Coward · · Score: 0

    Jigloo is a great and inexpensive way to write swing/swt guis. (its an exlipse plugin)
    The code it produces is simple and clean.

    It might not be good for really complex interfaces, but for everything else it rocks.

  54. wow... how amazingly ignorant... by AslanTheMentat · · Score: 1

    My point is, that NeXTStep / Cocoa is NOT among the wonderful user-editable software inspired by HyperCardCounter-examples of "wonderful user-editable software inspired by HyperCard"?

    At this point, it's an old, obsolete architecture [...]Did you miss your parent's mention that iWork and practically all the other Apple-blessed apps are built with Xcode using Cocoa? How exactly is a framework currently in wide use producing great software "obsolete"?

    It does not support run-time scripting and user interface building and customization like HyperCard and OpenDoc did.Just plain wrong... F-script. Allows run-time scripting of Cocoa apps.

    Methinks ya need to get off the HyperCard horse. It was a toy. A very neat, powerful, interesting, creative toy, but still a toy. How many programming languages could be used w/ HyperCard? Can you give me examples of HyperCard applications of any significant complexity? I thought not...
    Seriously, HyperCard isn't even in the same league as Cocoa w/ Xcode.... might as well come off it already... sheesh...