Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Practical iOS application modularity

Practical iOS application modularity

Slides from Yahoo’s NYC Mobile Developer Conference (http://ymdcnyc.tumblr.com) on 8/26/2015.

Bryan Irace

August 28, 2015
Tweet

More Decks by Bryan Irace

Other Decks in Technology

Transcript

  1. Mobile Developer Conference N Y C 8 26 15 Practical

    iOS application modularity Bryan Irace
  2. M D C N Y C Limit which parts of

    the codebase know about which other parts.
  3. M D C N Y C When concerns are well-separated,

    individual sections can be reused, as well as developed and updated independently. -Wikipedia
  4. M D C N Y C One big codebase Small

    Isolated Knowable Components Many Easily or
  5. M D C N Y C Modularity = • Easier

    to build separate applications • New products • iOS or OS X • iOS extensions • watchOS applications
  6. M D C N Y C Modularity = • Additional

    overhead • More repositories, READMEs to update, version numbers to increment • Tooling complexity • CocoaPods, Carthage, Gradle, etc.
  7. M D C N Y C { "name": "ComposeUI", "summary":

    “Tumblr’s composition UI for iOS.", "platforms": { "ios": "8.0" }, "requires_arc": true, "frameworks": [ "Foundation", "UIKit", ], "source_files": "Classes/**/*.{h,m}", "resources": "Resources/*", "dependencies": { "SharedUI": [], } } { "name": "SharedUI", "summary": "UI components shared across Tumblr’s apps and extension", "platforms": { "ios": "8.0" }, "requires_arc": true, "frameworks": [ "Foundation", "UIKit" ], "source_files": "Classes/**/*.{h,m}", "resources": "Resources/*" }
  8. M D C N Y C pod 'Reachability', '3.2' pod

    'MTMigration', '0.0.3' pod 'HockeySDK', '3.7.1' pod '1PasswordExtension', '1.1.0'
  9. M D C N Y C Development pods • No

    need to version • Can be anywhere on disk, e.g. in the app’s repository • Easy to make one pull request against multiple modules
  10. M D C N Y C pod 'ComposeUI', :path =>

    ‘Components/ComposeUI' pod 'ExploreUI', :path => 'Components/ExploreUI' pod 'SharedUI', :path => 'Components/SharedUI' pod 'CoreTumblr', :path => 'Components/CoreTumblr' pod 'CoreExplore', :path => 'Components/CoreExplore' pod 'Logger', :path => 'Components/Logger'
  11. M D C N Y C Compose UI Core Tumblr

    Tumblr SDK Explore UI Core Explore Network Abstractions Shared UI Logger Video Player Audio Share extension Today widget App
  12. M D C N Y C Compose UI Core Tumblr

    Tumblr SDK Explore UI Core Explore Network Abstractions Shared UI Logger Video Player Audio
  13. M D C N Y C Flexibility • Can always

    turn dev. pods into “real pods” • Xcode project only knows about .framework files • Could always move away from CocoaPods
  14. M D C N Y C Summary • Modular codebases

    facilitate rapid product development • “Development pods” provide many benefits of modularity without too much overhead