Thursday, October 15, 2009

Don't Fear the Interface Builder Redux

Last week, when I advised readers not to fear Interface Builder, I left out one very important piece of information. I am far from the only one who says that using Interface Builder isn't really optional. Apple's documentation says exactly the same thing, in no uncertain terms. The relevant portion is as follows:
Note: Although you can create an Objective-C application without using nib files, doing so is very rare and not recommended. Depending on your application, avoiding the use of nib files can involve overriding large amounts of framework behavior to achieve the same results you would get using a nib file.
I don't think Apple could be much clearer on this point. Apple and NeXT developers have been using Interface Builder for twenty-one years, longer than many programmers have been programming. I think, at this point, they've got a pretty good handle on how it works and when it should be used. It boggles my mind that there's even a debate on this issue. There's really no excuse for creating your user interface in code in the vast majority of situations. Using Interface Builder is faster and much easier to maintain.

Don't fight the design, work with it.

Thanks to Saurabh Garg for pointing this out.



3 comments:

Sloth said...

In my day job, I'm forced to use a Motif GUI builder called BX. Amy developer that fears Interface Builder should try BX. It is a true horror show. Interface Builder is a dream application in comparison!

stcnx said...

I think you're missing the point Jeff. IB is just a tool.

Teachingwise, I start with IB to help people make something simple quickly.

Then I show how one would do it in code, so that they understand exactly how everything fits together.

Then I explain how IB works, and its limitations. For instance, more complex interfaces don't scale well in IB. IB is a box. Code is more flexible.

So for 95% of uses, IB is indeed helpful. For the other cases, knowing how to do it in code is helpful.

My book, Teach yourself Cocoa Touch in 24 hours, explains all of this in quite some detail.

h4ns said...

What youre saying is completely true. I know that everybody must say the same thing, but I just think that you put it in a way that everyone can understand. I also love the images you put in here. They fit so well with what youre trying to say. Im sure youll reach so many people with what youve got to say.

Arsenal vs Huddersfield Town live streaming
Arsenal vs Huddersfield Town live streaming
Wolverhampton Wanderers vs Stoke City Live Streaming
Wolverhampton Wanderers vs Stoke City Live Streaming
Notts County vs Manchester City Live Streaming
Notts County vs Manchester City Live Streaming
Bologna vs AS Roma Live Streaming
Bologna vs AS Roma Live Streaming
Juventus vs Udinese Live Streaming
Juventus vs Udinese Live Streaming
Napoli vs Sampdoria Live Streaming
Napoli vs Sampdoria Live Streaming
Fulham vs Tottenham Hotspur Live Streaming
Fulham vs Tottenham Hotspur Live Streaming
AS Monaco vs Marseille Live Streaming
AS Monaco vs Marseille Live Streaming
Alajuelense vs Perez Zeledon Live Streaming
Alajuelense vs Perez Zeledon Live Streaming
Technology News | News Today | Live Streaming TV Channels