Live data from Hacker News

Your First iOS App – 100% Programmatically

blog.austinlouden.com

51–60 of 111 posts

Re: Your First iOS App – 100% Programmatically

#51
post #46
post #42

Earlier quoted context omitted.

I'd love one of these for Android. I am also anti-nibs: Examples — NIB caching; Managing UI in two places (class & IB); Nightmare managing versioning and diffs (same from @SeoxyS), especially in a team environment; "Having classes that may be instantiated both from code or from NIB deserialization adds a layer of complexity and messiness to your app" (Repost from @SeoxyS); Want a custom UI implementation? Forget abou…

Also a fun fact: Stanford University in their CS 193p classes teaches how to utilize Storyboards. And Auto Layout. And everything else that Apple provides for the devs.

There is a huge difference between academia and real world products shipped by teams w/real world experience w/academic backgrounds.

Stanford academic guidelines endorsed and supported by Apple, Inc.

I wonder what approach Evan Doll uses at Flipboard...hmmm?

Re: Your First iOS App – 100% Programmatically

#52
post #27

Earlier quoted context omitted.

I've been a Cocoa developer for close to a decade now, and I've gone back and forth on this many times, but by now I've settled 100% in the nibs-are-evil camps. There are several reasons for that: - Nibs are a nightmare when working with version control and merge tools. Now, at least, they are XML instead of a proprietary binary format, but it's still a joke… - Auto-layout in IB is provably the worst GUI I have ever…

Not any of those points is justified, "a nightmare", "the worst". You need to provide something to support all those affirmations.

It's called an opinion. This isn't a peer reviewed paper we're talking about. And his opinion is that merging Nibs is a nightmare. Does he need to document how he did it, when, where, and what the room temp was at the time to "justify" an opinion? Hardly.

Re: Your First iOS App – 100% Programmatically

#53
XIBs are great for user interfaces that use components that are not table views. XIBs are completely unnecessary and actually a hindrance for view controllers whose primary UI element is a UITableView or UICollectionView.

Most apps, most of the time on iOS make heavy use of these two classes. Even if you're building a data entry form, you're likely to place the text fields inside of a UITableView.

For subclasses of UITableViewController, you actually have to do more work to use a XIB than not.

Re: Your First iOS App – 100% Programmatically

#54
post #30

This article, although still great for beginners to get started, is using dated techniques that should be avoided. In the past, developers would have resorted to starting with interface builder to do their designs. As they continued the development process, theyd notice that more and more of their views had to be done in code because Interface Builder wasn't powerful enough to do what they wanted. It could then be un…

http://en.wikipedia.org/wiki/Irregardless

Re: Your First iOS App – 100% Programmatically

#55
post #36
post #32

Earlier quoted context omitted.

If you say "provably" you really do need to... prove it. What studies are you citing when you say IB auto-layout is "provably the worst GUI?"

He might have meant "probably".

This is one of those quintessentially Hacker News exchanges that I have begun calling "Hacker News moments".

Re: Your First iOS App – 100% Programmatically

#56
post #42

So, a word of advice to new folks trying out iOS land: Interface Builder is most emphatically your friend. The compile/debug cycle in iOS is sufficiently lengthy that laying out views programmatically gets very tedious very fast. Besides realtime previewing of exactly how your view is going to look , IB also helps you understand how your layout is affected by rotations to landscape and differences in view height betw…

I'd love one of these for Android. I am also anti-nibs: Examples — NIB caching; Managing UI in two places (class & IB); Nightmare managing versioning and diffs (same from @SeoxyS), especially in a team environment; "Having classes that may be instantiated both from code or from NIB deserialization adds a layer of complexity and messiness to your app" (Repost from @SeoxyS); Want a custom UI implementation? Forget abou…

+1 for this. Also, I18n with nib files is a pain, the CLI tool that xcode provide for translating nib files is a joke really... Also, if you have custom UI or a custom font, you're nib file will look like shit anyway...

Re: Your First iOS App – 100% Programmatically

#57
post #27

Earlier quoted context omitted.

I've been a Cocoa developer for close to a decade now, and I've gone back and forth on this many times, but by now I've settled 100% in the nibs-are-evil camps. There are several reasons for that: - Nibs are a nightmare when working with version control and merge tools. Now, at least, they are XML instead of a proprietary binary format, but it's still a joke… - Auto-layout in IB is provably the worst GUI I have ever…

Not any of those points is justified, "a nightmare", "the worst". You need to provide something to support all those affirmations.

Try merging a .nib. You'll see first-hand how hard it is.

Re: Your First iOS App – 100% Programmatically

#59
I don't understand all the anti-IB sentiment. I feel like it speeds up my workflow tremendously compared to manual code, especially now w/ autolayout. I put off learning it for years and feel like an idiot for not learning it sooner. It's elegantly designed to not hide anything from the programmer (a common mistake with visual tools like it), it essentially is just a way to design an object hierarchy and pass it into code.

Re: Your First iOS App – 100% Programmatically

#60
post #3

So, a word of advice to new folks trying out iOS land: Interface Builder is most emphatically your friend. The compile/debug cycle in iOS is sufficiently lengthy that laying out views programmatically gets very tedious very fast. Besides realtime previewing of exactly how your view is going to look , IB also helps you understand how your layout is affected by rotations to landscape and differences in view height betw…

I agree with pretty much everything you say (especially now Apple will be pushing auto-layout for newcomers to the platform), but the one thing that's really bothered me with the "Your First iOS App" tutorial is that as some point it switched from NIBs over to a full Storyboard. And Storyboards are certainly in principle a cool idea, but I've never seen a production app that has actually used them (please do correct…

> And Storyboards are certainly in principle a cool idea, but I've never seen a production app that has actually used them

Fly Delta app uses them all over the place (first-hand experience) - they're fantastic for static cell table views. Admittedly, merging them can be a HUGE pain, though.

> As far as I know, Apple aren't dog-fooding them in their own apps either.

From what I've heard from an Apple engineer, Apple doesn't dog-food a lot of this stuff because the tools either don't exist yet by the time they need to ship or aren't stable. A lot (most?) of their apps end up being done programatically.

Post reply on HN