{"id":19319,"date":"2017-10-23T16:02:23","date_gmt":"2017-10-23T20:02:23","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=19319"},"modified":"2017-10-27T14:28:23","modified_gmt":"2017-10-27T18:28:23","slug":"why-work-without-a-nib","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/10\/23\/why-work-without-a-nib\/","title":{"rendered":"Why Work Without a Nib?"},"content":{"rendered":"<p><a href=\"http:\/\/lapcatsoftware.com\/articles\/working-without-a-nib-part-11.html\">Jeff Johnson<\/a>:<\/p>\n<blockquote cite=\"http:\/\/lapcatsoftware.com\/articles\/working-without-a-nib-part-11.html\"><p>You can&rsquo;t merge changes to nib files on different version control branches.<\/p><p>[&#8230;]<\/p><p>Unlike source code, nibs have no place for comments written by the developer.<\/p><p>[&#8230;]<\/p><p>A couple years ago I was working on an app that was itself around 10 years old. I wanted to fix a bug, and that required a change in a nib file, but when I made the change, that somehow caused another problem even worse than the one I was trying to fix. It was a total mystery. Ultimately, we just had to declare that nib file off-limits, untouchable, in order to avoid the problem caused by modifying the file. This is a terrible position to be in as a developer.<\/p><p>No matter how outdated the source file, no matter how many deprecations and build errors, you can always at least read the old source code and try to refactor it to work again. The same is not true of nibs. Old nibs can become completely unrecoverable, and you just have to trash them and start over from scratch. You may not even be able to use them as a model for the new UI. Remember Interface Builder 3 Plugins? Any nib with an IBPlugin dependency is now garbage.<\/p><\/blockquote>\n\n<p>Previously: <a href=\"https:\/\/mjtsai.com\/blog\/2016\/10\/18\/working-without-a-nib\/\">Working Without a Nib<\/a>, <a href=\"https:\/\/mjtsai.com\/blog\/2015\/11\/12\/decoding-old-nibs\/\">Decoding Old Nibs: a Sad Tale of Vendor Lock-in and Abandonment<\/a>.<\/p>\n\n<p>Update (2017-10-24): <a href=\"https:\/\/twitter.com\/arekholko\/status\/922570674933137413\">Arek Holko<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/arekholko\/status\/922570674933137413\">\n<p>XIBs\/storyboards are kinda technical debt. Quick and easy to create, hard to maintain.<\/p>\n<\/blockquote>\n\n<p>Update (2017-10-25): <a href=\"https:\/\/mdhughes.tech\/2017\/10\/25\/the-future-of-programming-is-text\/\">Mark Damon Hughes<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mdhughes.tech\/2017\/10\/25\/the-future-of-programming-is-text\/\">\n<p>These NIB files &ldquo;work&rdquo;, in that they deserialize into objects, but there&rsquo;s no way to edit them. Where possible, I now do most UI work in code; this isn&rsquo;t great fun, I end up with a ton of builder functions to avoid repetitive code blocks, but it&rsquo;ll still compile and work in 10 years.<\/p>\n<\/blockquote>\n\n<p>Update (2017-10-27): <a href=\"https:\/\/twitter.com\/jamesshore\/status\/923674590433259520\">James Shore<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/jamesshore\/status\/923674590433259520\">\n<p>You say, &ldquo;no coding necessary!&rdquo;\nI hear, &ldquo;we built a crappy DSL accessed via point-and-click with no version control or testing API.&rdquo;<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Jeff Johnson: You can&rsquo;t merge changes to nib files on different version control branches.[&#8230;]Unlike source code, nibs have no place for comments written by the developer.[&#8230;]A couple years ago I was working on an app that was itself around 10 years old. I wanted to fix a bug, and that required a change in a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[69,370,31,1472,30,1529,71,376,226],"class_list":["post-19319","post","type-post","status-publish","format-standard","hentry","category-technology","tag-cocoa","tag-interfacebuilder","tag-ios","tag-ios-11","tag-mac","tag-macos-10-13","tag-programming","tag-versioncontrol","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=19319"}],"version-history":[{"count":4,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19319\/revisions"}],"predecessor-version":[{"id":19368,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19319\/revisions\/19368"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=19319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=19319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=19319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}