Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We recently converted our project from IB to doing everything programmatically and could not be happier with the result.

As the app has evolved over time and grown in complexity, we felt we reached a tipping point where using IB was slowing us down more than it was helping. Same for auto-layout.

Part of this was because the app simply has a lot more functionality today than it did three years ago, which means there were a lot more nibs to manage than before. Part of it is because we started developing more custom views that did not map to any existing IB components and thus had to be done by hand anyway. Part of it is because we found we had to switch to drawing certain things programmatically for performance reasons. Either way, I'm quite glad we made the conversion.

That said, I agree that most apps should start with IB and only move onto the more complex stuff once/if the need arises. IB helps a lot out of the gate (and also makes learning the platform a lot easier since you can visually see what you're setting up). Once it gets to be a hindrance, you'll know, and you can then make the decision to switch later on. And if your app goes nowhere, then you'll have wasted less of your time.

I also strongly agree that explicit is better than implicit, and configuring a view programmatically allows you to fully specify what its behavior should be, rather than what it happens to be. When you revisit a nib several months later after originally configuring it, sometimes you forget whether the configuration option you selected in the dropdown was intentional, or was it the default, or was it merely accidentally changed at some point?



Do you run into any issues with having to maintain the additional lines of code?


Not really. I think the overhead comes more from having to create the views programmatically in the first place.

But once everything is up and running, the maintainability is not very different compared to working with nibs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: