npr api: create once publish everywhere

87
NPR’s API: Create Once Publish Everywhere Zach Brand @zbrand Sr. Director Technology & Strategy NPR, Digital Media #nprapi

Upload: zachbrand

Post on 01-Nov-2014

35.286 views

Category:

Technology


1 download

DESCRIPTION

From SXSW. NPR's API: Create Once Publish Everywhere. Discover how and why NPR's API works.

TRANSCRIPT

Page 1: NPR API: Create Once Publish Everywhere

NPR’s API: Create Once Publish Everywhere

Zach Brand @zbrandSr. Director Technology & StrategyNPR, Digital Media

#nprapi

Page 2: NPR API: Create Once Publish Everywhere

“From NPR News in Washington..” –Jack Speer et al

Page 3: NPR API: Create Once Publish Everywhere

“From NPR News in Washington..” –Jack Speer et al

X 35M / Week

X 784

Page 4: NPR API: Create Once Publish Everywhere

NPR Digital Media

Page 5: NPR API: Create Once Publish Everywhere

Today

Why You Should Care About COPE Our Digital Media History & Philosophy How COPE works Ten lessons we’ve learned

… including what we did wrong What’s New and Coming Soon in the NPR API

Page 6: NPR API: Create Once Publish Everywhere

But First, Some Definitions…

API: Application Programming Interface COPE (Create Once Publish Everywhere) Flexible Content CrossMedia TransMedia

Page 7: NPR API: Create Once Publish Everywhere

So Why Should YOU Care about Flexible Content?

Three Reasons…

Page 8: NPR API: Create Once Publish Everywhere

1) It’s Worked Well For Us…

NPR News iPhone app

NPR News Android app

Relaunched NPRmobile site

NPRiPad app

NPR MusiciPhone app

API launchedin 2008

NPR MusicRemix

NPR BlogsMade API Friendly

Facebook Integration

Player 2.0

Homepage Improvements

Story PageImprovements

Page 9: NPR API: Create Once Publish Everywhere

0 - 50

> 1,000,000,000

> 800,000

#2) Getting Found is Getting Harder..

Page 10: NPR API: Create Once Publish Everywhere

… and Thousands More

#3) …and Everybody Else Is Doing It.

Page 11: NPR API: Create Once Publish Everywhere

Our Principles…

Don’t Attempt to Build the ‘One System’

COPE (Create Once Publish Everywhere)- COPE drives all other architectural decisions

- Realized at NPR with the NPR News API

Content Management Tools & Presentation Layers

Understand Your Atom- Story is the Atom for NPR

- Stories contain ‘Assets’ (ie. text, audio, video, images, etc.)

- Stories belong to ‘Lists’

It is better to be incomplete than inaccurate

Page 12: NPR API: Create Once Publish Everywhere

Good ToolsGood People

…Flexible Content

Page 13: NPR API: Create Once Publish Everywhere

1997(No CMS)

Page 14: NPR API: Create Once Publish Everywhere
Page 15: NPR API: Create Once Publish Everywhere

2003(CMS)

Page 16: NPR API: Create Once Publish Everywhere
Page 17: NPR API: Create Once Publish Everywhere

2005(CMS)

Page 18: NPR API: Create Once Publish Everywhere
Page 19: NPR API: Create Once Publish Everywhere

2008(API)

Page 20: NPR API: Create Once Publish Everywhere

NPR’s Target Audiences for the API Ourselves

- Supports the entire infrastructure of our new site

- Improvements to CMS to enable custom feeds by Editorial and Design

Stations

- Enables us to serve content to our member stations more easily

- Enables our stations to serve their communities better

Partners

- Creates new opportunities because - easy to implement with very little integration cost

- Makes existing opportunities easier to maintain and grow

Public

- Engages the community – part of NPR’s Public Service Mission

- Lots of great widgets, tools, sites built using the API

Launch Expectations:Improve development efficiencies for NPR.org

Some sophisticated stations will use the API

Partner integration will be easier

The public will do amazing things with the API

Page 21: NPR API: Create Once Publish Everywhere

The Life of a (FLEXIBLE) Story at NPR

CMS API PresentationLayers

1 2

3 4

Page 22: NPR API: Create Once Publish Everywhere

1: NPR CMS

Page 23: NPR API: Create Once Publish Everywhere

2: NPR API

Page 24: NPR API: Create Once Publish Everywhere

3: API Presentation Layers (or other Apps)

Page 25: NPR API: Create Once Publish Everywhere

4: Examples of Presentation Layers

Page 26: NPR API: Create Once Publish Everywhere

iPhone App Android AppMobile Site

Page 27: NPR API: Create Once Publish Everywhere

NPR.org Audio Player

Page 28: NPR API: Create Once Publish Everywhere

Google Chrome Extension

Page 29: NPR API: Create Once Publish Everywhere

The Life of a (FLEXIBLE) Story at NPR

CMS API PresentationLayers

1 2

3 4

Page 30: NPR API: Create Once Publish Everywhere

System Architecture Supporting COPE (2008)

Page 31: NPR API: Create Once Publish Everywhere

System Architecture Supporting COPE

Page 32: NPR API: Create Once Publish Everywhere

System Architecture Supporting COPE

JavaJSP

Struts

Page 33: NPR API: Create Once Publish Everywhere

System Architecture Supporting COPE

R / WMySQL

Page 34: NPR API: Create Once Publish Everywhere

System Architecture Supporting COPE

R / OMySQLCluster

NoSQL-likeXML

Repository

Page 35: NPR API: Create Once Publish Everywhere

System Architecture Supporting COPE

PHP5

SimpleXML

PHP5

Page 36: NPR API: Create Once Publish Everywhere
Page 37: NPR API: Create Once Publish Everywhere

WBUR.org

Page 38: NPR API: Create Once Publish Everywhere

Connecticut Public Broadcasting

Photos Courtesy Derik Elis, CBTV

NPR API

CPTV’s Drupal Based CMS

Website

Page 39: NPR API: Create Once Publish Everywhere

So What did We Learn….

Page 40: NPR API: Create Once Publish Everywhere

#1 Flexible Content is Design Agnostic

Home Page Design Pre-API Launch Home Page Design Post-API Launch

Page 41: NPR API: Create Once Publish Everywhere

And Good Design Requires Flexibility Too…

You Still Have to Make the Presentation Compelling

Page 42: NPR API: Create Once Publish Everywhere

“From Washington DC… this is NPR”

Page 43: NPR API: Create Once Publish Everywhere
Page 44: NPR API: Create Once Publish Everywhere
Page 45: NPR API: Create Once Publish Everywhere

#2 Content & Technology Are Inextricably Linked

Good ToolsGood People

…Flexible Content

Page 46: NPR API: Create Once Publish Everywhere
Page 47: NPR API: Create Once Publish Everywhere
Page 48: NPR API: Create Once Publish Everywhere
Page 49: NPR API: Create Once Publish Everywhere
Page 50: NPR API: Create Once Publish Everywhere

A thousand words of COPE

Page 51: NPR API: Create Once Publish Everywhere
Page 52: NPR API: Create Once Publish Everywhere
Page 53: NPR API: Create Once Publish Everywhere
Page 54: NPR API: Create Once Publish Everywhere
Page 55: NPR API: Create Once Publish Everywhere
Page 56: NPR API: Create Once Publish Everywhere
Page 57: NPR API: Create Once Publish Everywhere

#3 Team structure based on Tech/Content link

Page 58: NPR API: Create Once Publish Everywhere

#3 Team structure should recognize Tech/Content link

Good ToolsGood People

…Flexible Content

Page 59: NPR API: Create Once Publish Everywhere
Page 60: NPR API: Create Once Publish Everywhere

“I had to actually purchase a book to learn the API and write the client.” Shawn Fanning of Napster Fame on MS API

#4 …. Its an investment

Page 61: NPR API: Create Once Publish Everywhere

#4 Its an investment …

Figuring it out…

US Election RelatedTraffic Bumps

Page 62: NPR API: Create Once Publish Everywhere

… Not Magic, but Does Allow Cool Things

Page 63: NPR API: Create Once Publish Everywhere

HTML5 Version of NPR.org (npr.org/tablet)

Page 64: NPR API: Create Once Publish Everywhere

#5 It Does Drive the Business Forward

Launch Expectations:Improvements to development efficiencies for NPR.org

Some sophisticated stations will use the API

Partner integration will be easier

The public will do amazing things with the API

Actual Results:NPR dramatically improved development efficiencies

NPR’s mobile strategy took off

Some sophisticated stations have used the API

Partner integration has been easier

API has facilitated business development opportunities

The public has done some interesting things

Page 65: NPR API: Create Once Publish Everywhere

NPR Addict iPhone App

Page 66: NPR API: Create Once Publish Everywhere

#5 It Does Drive the Business Forward

Launch Expectations:Improvements to development efficiencies for NPR.org

Some sophisticated stations will use the API

Partner integration will be easier

The public will do amazing things with the API

Actual Results:NPR dramatically improved development efficiencies

NPR’s mobile strategy took off

Some sophisticated stations have used the API

Partner integration has been easier

API has facilitated business development opportunities

The public has done some interesting things

Actual Results:NPR dramatically improved development efficiencies

NPR’s mobile strategy took off

Some sophisticated stations have used the API

Partner integration has been easier

API has facilitated business development opportunities

The public has done some interesting things

We’ve been able to do amazing things with the public

Page 67: NPR API: Create Once Publish Everywhere

Paid Dev Public Dev

$$$

Page 68: NPR API: Create Once Publish Everywhere

#5 It Does Drive the Business Forward

Feb 2011: Over 2 Billion Stories Served by API

Page 69: NPR API: Create Once Publish Everywhere

#7 People are interested in Examples more than Documentation

Page 70: NPR API: Create Once Publish Everywhere

#8 You will eat your own dog food

Page 71: NPR API: Create Once Publish Everywhere

#9 Our Architecture (2008) Struggled with Change

Page 72: NPR API: Create Once Publish Everywhere

The New Architecture of COPE

Page 73: NPR API: Create Once Publish Everywhere

The New Architecture of COPE

Page 74: NPR API: Create Once Publish Everywhere

The New Architecture of COPE

Page 75: NPR API: Create Once Publish Everywhere

The New Architecture of COPE

Page 76: NPR API: Create Once Publish Everywhere

The New Architecture of COPE

Page 77: NPR API: Create Once Publish Everywhere

The New Architecture of COPE

Page 78: NPR API: Create Once Publish Everywhere

The New Architecture of COPE

Page 79: NPR API: Create Once Publish Everywhere

Results of New Architecture

- Response time is 22% faster (0.45 -> 0.35s)- Eliminated many (slightly) inaccurate returns- Faster Development on the API- Cleaner Separation of Output formats- No more use of Xpath Queries- Easier Ramp up for New Developers

Page 80: NPR API: Create Once Publish Everywhere

#10 There are Lots of Lame Excuses Why Not

People Can Steal Your Content Leadership Doesn’t understand what an API is / Benefits It Building an API Doesn’t Result in new Product for your Customers You’ll have to Replace CMS You Don’t Have the Time/Money/Resources Your Data is Structured for it Today The Benefit is intangible It’s Too Risky Requires Too Much Investment Too Many Other Priorities

Page 81: NPR API: Create Once Publish Everywhere

What’s New and What’s Coming Collections

<collection><title> New Mix: Bright Eyese, G-Side, And More</title><member id="132652688"> <image refId="132652709" crop="square" num="1"/> <title num="2"><![CDATA[Nat Geo]]</title> <audio refId="132652704" num="3"/> <song refId="132649319" num="4"/> <memberText num="5"><![CDATA [<p><em><strong>Advisory: </strong> This song contains explicit language not suitable for all audiences.</em></p>]] </memberText> <link refId="132652740" num="6"/></member>

Page 82: NPR API: Create Once Publish Everywhere

What’s New and What’s Coming Collections

Image Crops

<image id="133849355" type="primary" width="200" src="http://media.npr.org/img/a.jpg" hasBorder="false">

<crop type="square" src="http://media.npr.org/img/a.jpg" height="440" width="440"/>

<crop type=”wide" src="http://media.npr.org/img/a.jpg" height="400" width=”225"/>

</image>

Page 83: NPR API: Create Once Publish Everywhere

What’s New and What’s Coming Collections

Image Crops

- standard: 4:3

- square: 1:1

- wide: 16:9

- brick: 300:138

- alt promo: 4:3

- vertical: 3:4

New Output Types are Easier

- Plists (Binary)

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>Story_ID</key> <integer>12321312</integer> <key>Photo_ID</key> <integer>234523452345</integer>

<key>Category</key> <string>Politics</string> </dict></plist>

Page 84: NPR API: Create Once Publish Everywhere

What’s New and What’s Coming Collections

Image Crops

- standard: 4:3

- square: 1:1

- wide: 16:9

- brick: 300:138

- alt promo: 4:3

- vertical: 3:4

New Output Types are Easier

- Plists (Binary)

Page 85: NPR API: Create Once Publish Everywhere

What’s New and What’s Coming Collections

Image Crops

- standard: 4:3

- square: 1:1

- wide: 16:9

- brick: 300:138

- alt promo: 4:3

- vertical: 3:4

New Output Types are Easier

- Plists (Binary)

More Ingest Partners… and a Public Media Platform

Page 86: NPR API: Create Once Publish Everywhere

To Recap

Content & Technology Are Inextricably Linked Team Structure and Process Should Recognize this

To Be ‘Findable’ Your Content Should Be Flexible.

Flexible Content (i.e. Embraces COPE):

Requires An Investment x2

Improves Editorial Efficiency

Will Help Drive Growth / Relevancy

Revolutionizes Your Biz Dev

Creates Opportunities with Public

Accelerates Your Tech Development

Page 87: NPR API: Create Once Publish Everywhere

Questions?

Email: [email protected] Twitter: @zbrand API : www.npr.org/api Blog http://www.npr.org/blogs/inside

PS Rate me on SXSW Mobile App or Website

PPS: We’re Hiring

SW Architect SW Programmers Designers UX Specialist