zsmith.co

Interface Builder Pro and Con

Revision 7
© 2014-2019 by Zack Smith. All rights reserved.

Should you really be using Interface Builder?

Pros

  • For a one-off app, the UI of which is not complex, Interface Builder may be a quick and sufficient solution.

Cons

  • Interface Builder prevents you from documenting the GUI in the XIB file, e.g. putting a comment like This VC corresponds to UX screen 12c, which reduces maintainability and can create confusion.
  • In actual use in many projects, XIB files and storyboards ended up looking like a disorganized mess.
  • If the question arises, which view controllers did a programmer use for a set of screens, it can be tedious to undercover this information using IB.
  • Many people waste time wondering how to modify some detail in a XIB in IB, that that same detail is easy to change in code.
  • If the GUI will be not be totally static, you will end up laying out UI elements in code anyway.
  • XIB files' contents change every time they are viewed, instead of when they are edited. This increases the number of check-ins in GIT but they are not meaningful check-ins.
  • Inability to safely edit XIB files in a text editor means the chance of a mess when someone attempts it, especially if the file was from an older version of Xcode.
  • Changes to a XIB that end up altering just one or two lines the meaning of which is difficult or impossible to ascertain results in undermined code reviews.
  • Attempting to use a Interface Builder to position and size UI elements especially using a mouse often results elements that are not correctly sized.
  • It is tedious to make changes in Interface Builder to fine details e.g. colors and fonts, whereas in code these changes are easy to make.
  • Any application developed over the long-term will eventually have to construct the UI in code anyway; IB merely delays this but leaves you with technical debt in the form of storyboards and XIB files.
  • Interface Builder enthusiasts often use different XIBs for different sized screens and different orientations and this adds to technical debt and decreases UI responsiveness.
  • There have certainly been bugs in Interface Builder over the years and eliminating this unnecessary tool can help reduce bugs.

Conclusion

GUI builders are not a new invention by any means. They existed at least 20 years ago. Since their first appearance they have justifiably been met with skepticism. They encourage laziness and represent a false promise.

There's nothing new under the sun. Interface design programs will always be insufficient for any challenging UI and consumers will always prefer apps that have interesting UIs over simplistic ones, to maximize personal delight.

There is no free lunch. Programming requires work and interesting UIs will ultimately have to be coded by hand. Use of Interface Builder delays the inevitable and incurs technical debt.