Monday, March 7, 2011

Design Then Code

Mike Rundle just put up a really nice beginner's tutorial on program iOS SDK applications from scratch. Although I disagree with him pretty violently about whether you should use Interface Builder (no, really, you should use it), it's otherwise a brilliant introduction; one of the best I've seen on the web for beginners.


James said...

You know its so funny, i used to be insanely against IB. I think its mainly because i didn't want to take the tie mand actually understand how good and how efficient it is to use it.

Grumpy Grandma said...

I agree re:IB. After taking the time to learn it, it's definitely a speed boost for simple pages.

However, UIKit absolutely sux for dynamic layout and flow. I've written copious amounts of layout code for many apps. It's pretty poor that UIKit doesn't have flows or anything.
Unless of course UIKit has something I don't know about.. which is totally possible.

adamwillsss said...

Nice post. Thanks for sharing it.

ricardo said...

Now i kinda disagree and agree with you on this Jeff. Interface builder is a great tool, and removes dozens lines of code for you. BUT, when are starting off with UIKit i do think its best to know how all the magic happens, to know the ins and outs of each UIElement. and the best way to know it on top of your head is to read it and write allot times.
I found that and common sense was one of the best ways to recreate and learn why some things behaved the way they did.
My advice is learn UIKit WELL, then when you know it start using interface builder, and everything will make allot more sense.

Michael said...

I have to agree. If I can do it in IB, I do it. Why waste time coding these elements otherwise.

But I agree with Ricardo; best to know how UKIt works too…

Abe said...

When learning iOS programming, I think it would be distracting to learn something that you don't have to. Sure, it's great to know what the magic is doing, but I would wait until after being familiar with the language, frameworks, and tools.

The same arguments could be made about whether Java developers need to understand the Java VM and bytecode. It's great to know these things and they may make you a better programmer, but it doesn't need to be a hurdle for the beginner.

Bram said...

I'm with Mike here. I instinctively distrust GUI tools. Mostly because of repeatability. If I click and drag a bunch of stuff now, I will likely have a hard time repeating the workflow 3 months later.

With code: it's easy... I just refer to the 3 month old code and immediately see what was going on. Also, IB does not have the equivalent of 'temporarily commenting out stuff', or having two alternative versions of the interface. No #ifdef LITE, no ipad/iphone paths, no #ifdef TESTING, etc.

My advice: stick with code, it may be more laborious for some tasks, but in the long run it is a more precise and dependable method of engineering.

ScottYelich said...

Hey, I'll throw in my $0.02 before inflation/flaming makes it worthless (and I won't even fake a comment just to drop in a url to promote my own site).

I'll start off by saying that I like IB. With that said, there are arguments for and against it. I think it's critical to learn all the parts of UIKit, etc., but it this needed from day one? If IB allows someone to get a hello world code up faster -- I see this as a huge win for the platform. People can get introduced to iOS dev via small programs and minimal IB use. If they continue and take development seriously, they will naturally learn how to do via the code. If they don't learn how to do it via code, they're not taking development seriously.

My only comment is try not to combine IB with code. Either do a widget entirely with and in IB or do it entirely in code... do not do 1/2 in IB and 1/2 in code. This path leads to the dark side.


Brandon said...

As a newbie programmer, of any language, I find IB indispensable, but I do know that I'm missing out on knowing how Uikit works and I run up against issues where its caused me problems.

But for me it worth that kind of limitation because i'm aware of it, and it gets my little hobby fun apps up and running much faster.

I can focus on the logic of the app not the UI. But again I think its okay to use crutches when you understand the limitations and what you are missing out on.

especially for my level of programming and the availability of documentation on how to use IB in this case.