Tuesday, May 15, 2018

Storyboards/Interface Builder Vs. Programmatical Development/Direct in .swift

This week I studied some of the merits of creating the iOS in storyboard, using XCode's interface builder, versus a programatic development directly through the swift file (also in XCode).  The former strategy is best for the single developer or small team because storyboarding and its NIB files don't work with GIT distributed content management.  Secondly, the former is simply the greatest direct visual illustration or representation of what is being produced, rather than coding through what one imagines will be the result, which is fine, too; certainly that is what one does with HTML5/CSS3 front end.  In this way, it's simply the sheer brilliance of Apple to make it seem too easy.  But the latter makes more sense when the size, scale and/or dynamism of the app are either too unwieldy or complicated for a storyboard layout.  With respect to the size, are the so many scenes that you'd have to time-consumingly populate each one with material that could better be sent over programmatically, which would turn out to be a more efficient method?  With respect to dynamism, in other words, does the user swipe through a static stack of pages or do they affect the direction/the flow and change the page that is called based on their input?  Programmatic development is superior when one wants to dynamically call upon a diverse variety of data that may be inserted into its place on the page, based on the user's input.  A good example of this, which one of the tutorials I watched is doing, is the "Choose Your Own Adventure" app.  For my app, however, the on-boarding of the client is linear, so I'm using storyboards.  Frankly, it's also easier given the six-week timeframe of the course -- this is yet another merit of the storyboard, at least for someone of my entry-level skill level.  It's been much faster than I anticipated.

I particularly liked this discussion of the subject by Antonio Bello: https://www.toptal.com/ios/ios-user-interfaces-storyboards-vs-nibs-vs-custom-code

No comments:

Post a Comment