Interface Builder rocks
by Kevin Dangoor
If you’ve never developed on a Mac (or NeXT), check this out: Cocoa: Developing Cocoa Objective-C Applications: A Tutorial. See how you just draw a line from the GUI component to the object and select the “outlet” or the “action” that’s appropriate? Why can’t Swing be like that?
And why did the Mono team work on cloning .NET when they could have worked on sprucing up OpenStep and cloned IB?
The world may never know.
(By the way, there is Wotonomy for Swing which is based on the same concepts. The JDNC package also does data binding in a less heinous way than out-of-the-box Swing.)
If Apple would get IB to produce Java I’d never use anything else.
> If Apple would get IB to produce Java I’d never use anything else.
Hmmm, then you should have a look at the “Introduction to Developing Cocoa Java Applications”…
http://developer.apple.com/documentation/Cocoa/Conceptual/JavaTutorial/index.html
>…Introduction to Developing Cocoa Java Applications
OK, I guess I should be more specific.
If they would get it to produce Swing or even AWT code I’d never use anything else.
You may have a look at nib4j:
http://www.nib4j.com
nib4j looks spiffy, but part of the coolness of IB is how you wire up your objects to the GUI. I didn’t get a sense for whether nib4j supports that or if it’s really just for “drawing” the GUI.
All the event handling stuff is just plain Java Swing. Just get the Swing components from your nib object and add the actions:
okButton = (JButton) nib.getComponentByName(“okButton”);
okButton.addActionListener(yourAction);
Ahh… That makes sense. Interface Builder is a decent GUI drawing tool, certainly, but part of what makes Cocoa nifty is the way you wire up your GUI and your model objects.
Yes, I know. But there exists several approaches to connect the application logic to a Swing GUI and many developers want to decide by themselves which way to go. I think that’s one of the differences to Cocoa.