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

Effective Use of Open Source Software

Ash Furrow
September 10, 2013

Effective Use of Open Source Software

Ash Furrow

September 10, 2013
Tweet

More Decks by Ash Furrow

Other Decks in Programming

Transcript

  1. Effective Use of
    Open Source Software
    Ash Furrow, Teehan+Lax
    @ashfurrow

    View full-size slide

  2. Agenda
    1. How to Choose a Library
    2. Traditional library management sucks
    3. CocoaPods is the new hotness
    4. Getting started is easy
    3

    View full-size slide

  3. Premise: using open source is good
    (more like “promise” amirite)

    View full-size slide

  4. Why?
    • Build applications faster
    • Write less code
    • Build better applications
    • Expose yourself to other devs’ code
    6

    View full-size slide

  5. “Library”?

    View full-size slide

  6. File Management

    View full-size slide

  7. This is a bad idea.

    View full-size slide

  8. A Bad Idea
    • Dependency management Hell
    • Lack of separation of code
    • No versioning of libraries
    • Per-file compiler flags
    14

    View full-size slide

  9. Git Submodules

    View full-size slide

  10. Git Submodules
    • A submodule is like a pointer to another repo
    • Another repo at a specific point in its history
    • Checks out code into your directory
    • Submodule interface is not mature
    • Still have to specify per-file flags
    • Requires command-line interface
    16

    View full-size slide

  11. Git Subtree
    I don’t even.

    View full-size slide

  12. CocoaPods
    • Manages versions and dependencies
    • Solves a lot of problems with file-management
    • Easy to use
    22

    View full-size slide

  13. CocoaPods is to Objective-C as
    RubyGems is to Ruby

    View full-size slide

  14. What is a CocoaPod

    View full-size slide

  15. CocoaPods
    • A CocoaPod is a file that specifies a library
    • Name, dependencies, version, etc
    • CocoaPods is a tool to manage these specs
    25

    View full-size slide

  16. How does this work?

    View full-size slide

  17. Getting Started

    View full-size slide

  18. Best Practices
    • Don’t check in your Pods directory
    • Use .gitignore
    • Specify explicit version numbers
    • Inhibit pod warnings
    40

    View full-size slide

  19. Creating a Library

    View full-size slide

  20. Creating a Library
    • Specify a license
    • Write a good README
    • Include screenshots
    • Include sample library usage
    • Keep files organized
    43

    View full-size slide

  21. Agenda
    1. How to Choose a Library
    2. Traditional library management sucks
    3. CocoaPods is the new hotness, submodules
    are OK too
    4. Getting started is easy
    47

    View full-size slide

  22. Ash Furrow
    @ashfurrow
    Thanks!

    View full-size slide