Sunday, January 21, 2007 [Tweets] [Favorites]

Apple and Java

Jens Alfke:

I’m another of those Apple Java engineers who dropped out. I spent five years as a raving Java fanboy, but I gave up after optimizing AWT, implementing drag and drop, and trying to make 1,200 pages of crappy APIs do the right thing on the Mac. Then I took a one-week Cocoa training course, and wrote the first prototype of iChat.

I mostly agree, but I still wish Cocoa had layout managers. It’s great to be able to plunk everything down in Interface Builder and not have to deal with generated code. But taking advantage of that shouldn’t mean that I have to lay everything out by hand and manage all the sizes and spacings in different localizations.


Layout managers: gotta save /something/ for 10.6 :-)

Check out for a taste today.

I personally don't think computers should do user interface layout for humans. :)

Scott: I'm not saying that computers should choose the design/layout, just that there's a lot of tedious stuff that could be automated. Interface Builder has guides and such, but there's no intelligence to it; once you set down an object it remembers the origin and size, but not that it's supposed to be a certain distance from a neighboring object or that it's centered with respect to some other group of objects. So when you adjust the layout manually, IB can't provide much help. And when you move/resize views at runtime, the framework can't provide much help--you end up having to write uglier interface maintenance code than in Java.

Java has "pixel-perfect" layouts, too. It even has visual layout designers, although none are as nice as Interface Builder. I don't really understand the criticism - Java provides Layout Managers in addition to hand-crafted layouts, not to replace them.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment