Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

Why?

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

“Library”?

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

File Management

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

This is a bad idea.

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

Git Submodules

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Git Subtree I don’t even.

Slide 20

Slide 20 text

Git Subtree

Slide 21

Slide 21 text

CocoaPods

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

CocoaPods is to Objective-C as RubyGems is to Ruby

Slide 24

Slide 24 text

What is a CocoaPod

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

How does this work?

Slide 27

Slide 27 text

GitHub

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

Getting Started

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

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

Slide 41

Slide 41 text

Demo

Slide 42

Slide 42 text

Creating a Library

Slide 43

Slide 43 text

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

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

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

Slide 48

Slide 48 text

Ash Furrow @ashfurrow Thanks!