• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Building Apis That Rock
 

Building Apis That Rock

on

  • 10,326 views

 

Statistics

Views

Total Views
10,326
Views on SlideShare
10,282
Embed Views
44

Actions

Likes
18
Downloads
216
Comments
3

10 Embeds 44

http://www.slideshare.net 18
http://labs.friendsinteraction.com 5
http://www.killerblog.com 4
https://twitter.com 4
http://drupalgapps.techbracket.net 4
http://www.scoop.it 3
http://www.omaraviles.com 2
http://pomer.posterous.com 2
https://coderwall.com 1
https://web.tweetdeck.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

13 of 3 previous next Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Link to PDF ( keynote presentation export ) of above slide

    http://www.techbracket.net/Building_Apis_That_Rock.pdf

    or

    http://www.scribd.com/doc/16032080/Building-Apis-That-Rock
    Are you sure you want to
    Your message goes here
    Processing…
  • hey Jeff
    I wanted to download this presentation, when i did , it was a ZIP file containing 2 folders 1. _macosx ( you made it on MAC) and 2. building-apis-that-rock.key , It contain many images and PDF , and some folders too.

    I am unable to get, how to open it as presentation and which software should i use. I dont have a MaC. I only have linux and windows. Can you please help me out here .
    Are you sure you want to
    Your message goes here
    Processing…
  • its rock dude!
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br /> <br />
  • <br /> <br />
  • You were promised puppets. Also, magic. <br /> Unfortunately, you’ve been deceived. There are no puppets. <br /> The ends justify the means: APIs are Drupal’s lifeblood. <br />
  • When I started using Drupal, it was a little goofy, but fundamentally simple. <br /> Core. Some modules (gallery? event? done!) <br /> Maybe a custom module and a theme if you were REALLY crazy. <br />
  • When I started using Drupal, it was a little goofy, but fundamentally simple. <br /> Core. Some modules (gallery? event? done!) <br /> Maybe a custom module and a theme if you were REALLY crazy. <br />
  • Today, lots and lots of smaller modules <br /> Image == Views, CCK, FileField, ImageField, ImageCache, ImageAPI, Custom Breadcrumbs. <br /> Flexibility vs. Complexity <br /> All the pieces have to work with each other! And that’s where APIs come in. <br />
  • Today, lots and lots of smaller modules <br /> Image == Views, CCK, FileField, ImageField, ImageCache, ImageAPI, Custom Breadcrumbs. <br /> Flexibility vs. Complexity <br /> All the pieces have to work with each other! And that’s where APIs come in. <br />
  • The pull between functionality and flexibility <br /> Building code that does stuff, APIs that let other code control it, and UIs that let users configure/control <br />
  • The pull between functionality and flexibility <br /> Building code that does stuff, APIs that let other code control it, and UIs that let users configure/control <br />
  • <br /> <br />
  • Imagine a Drupal module as a giant pile of money. <br /> Mmmmmmmmmmm. <br /> Each of those awesome features is like a crisp $20. <br /> <br /> <br /> <br /> Imagine “Code” -- other Drupal modules -- as users who can’t click on anything. All they can do is call other functions. <br /> Can they use your module? <br /> <br /> <br /> <br /> Could an install profile set up your module automatically? <br /> Can someone turn off your UI entirely, and make it automatic? <br /> Can someone build a new UI for your module? <br />
  • Imagine a Drupal module as a giant pile of money. <br /> Mmmmmmmmmmm. <br /> Each of those awesome features is like a crisp $20. <br /> <br /> <br /> <br /> Imagine “Code” -- other Drupal modules -- as users who can’t click on anything. All they can do is call other functions. <br /> Can they use your module? <br /> <br /> <br /> <br /> Could an install profile set up your module automatically? <br /> Can someone turn off your UI entirely, and make it automatic? <br /> Can someone build a new UI for your module? <br />
  • Imagine a Drupal module as a giant pile of money. <br /> Mmmmmmmmmmm. <br /> Each of those awesome features is like a crisp $20. <br /> <br /> <br /> <br /> Imagine “Code” -- other Drupal modules -- as users who can’t click on anything. All they can do is call other functions. <br /> Can they use your module? <br /> <br /> <br /> <br /> Could an install profile set up your module automatically? <br /> Can someone turn off your UI entirely, and make it automatic? <br /> Can someone build a new UI for your module? <br />
  • The ATM is a metaphor: it’s a basic way of controlling things that can be used externally. <br /> Flag <br /> Organic Groups <br /> node_save() <br />
  • The ATM is a metaphor: it’s a basic way of controlling things that can be used externally. <br /> Flag <br /> Organic Groups <br /> node_save() <br />
  • The ATM is a metaphor: it’s a basic way of controlling things that can be used externally. <br /> Flag <br /> Organic Groups <br /> node_save() <br />
  • The ATM is a metaphor: it’s a basic way of controlling things that can be used externally. <br /> Flag <br /> Organic Groups <br /> node_save() <br />
  • The ATM is a metaphor: it’s a basic way of controlling things that can be used externally. <br /> Flag <br /> Organic Groups <br /> node_save() <br />
  • The ATM is a metaphor: it’s a basic way of controlling things that can be used externally. <br /> Flag <br /> Organic Groups <br /> node_save() <br />
  • Something complicated can be simplified by putting a buffer between it, and you. <br /> ImageAPI <br /> Messaging <br /> Visitor <br /> cache_get() and cache_set() <br />
  • Something complicated can be simplified by putting a buffer between it, and you. <br /> ImageAPI <br /> Messaging <br /> Visitor <br /> cache_get() and cache_set() <br />
  • The value in credit cards isn’t that they’re thin and plastic <br /> It’s that everyone uses them, so the problem of “IOUs” and “Store credit” and “Pay you back later” are all handled with this. <br /> Everyone’s on the same page, so they can get on to solving other problems <br />
  • The value in credit cards isn’t that they’re thin and plastic <br /> It’s that everyone uses them, so the problem of “IOUs” and “Store credit” and “Pay you back later” are all handled with this. <br /> Everyone’s on the same page, so they can get on to solving other problems <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • History of VotingAPI - 2005 <br /> Was making a community site that needed to rate comments AND nodes, with a nice flash widget AND a nice <br /> Picked the one that seemed best and shamelessly ripped its guts out <br />
  • History of VotingAPI - 2005 <br /> Was making a community site that needed to rate comments AND nodes, with a nice flash widget AND a nice <br /> Picked the one that seemed best and shamelessly ripped its guts out <br />
  • History of VotingAPI - 2005 <br /> Was making a community site that needed to rate comments AND nodes, with a nice flash widget AND a nice <br /> Picked the one that seemed best and shamelessly ripped its guts out <br />
  • Voila! VotingAPI 1.0 Beta! Simple, but effective. <br /> How to start thinking about it like an API? <br /> Find the nouns <br /> Find the verbs <br /> This is similar to building good classes in OOP languages like Java. Those guys think about APIs all freakin’ day. <br />
  • Voila! VotingAPI 1.0 Beta! Simple, but effective. <br /> How to start thinking about it like an API? <br /> Find the nouns <br /> Find the verbs <br /> This is similar to building good classes in OOP languages like Java. Those guys think about APIs all freakin’ day. <br />
  • Voila! VotingAPI 1.0 Beta! Simple, but effective. <br /> How to start thinking about it like an API? <br /> Find the nouns <br /> Find the verbs <br /> This is similar to building good classes in OOP languages like Java. Those guys think about APIs all freakin’ day. <br />
  • Voila! VotingAPI 1.0 Beta! Simple, but effective. <br /> How to start thinking about it like an API? <br /> Find the nouns <br /> Find the verbs <br /> This is similar to building good classes in OOP languages like Java. Those guys think about APIs all freakin’ day. <br />
  • Voila! VotingAPI 1.0 Beta! Simple, but effective. <br /> How to start thinking about it like an API? <br /> Find the nouns <br /> Find the verbs <br /> This is similar to building good classes in OOP languages like Java. Those guys think about APIs all freakin’ day. <br />
  • Voila! VotingAPI 1.0 Beta! Simple, but effective. <br /> How to start thinking about it like an API? <br /> Find the nouns <br /> Find the verbs <br /> This is similar to building good classes in OOP languages like Java. Those guys think about APIs all freakin’ day. <br />
  • Discussions on drupal.org, working with other developers to gather use cases. <br /> Not flexible enough! My my noun weren’t precise enough… <br /> Additional data: “Tag” for multiple criteria voting <br /> My verbs were too broad! <br /> Sub-functions. <br /> Building in layers is important <br />
  • Discussions on drupal.org, working with other developers to gather use cases. <br /> Not flexible enough! My my noun weren’t precise enough… <br /> Additional data: “Tag” for multiple criteria voting <br /> My verbs were too broad! <br /> Sub-functions. <br /> Building in layers is important <br />
  • Discussions on drupal.org, working with other developers to gather use cases. <br /> Not flexible enough! My my noun weren’t precise enough… <br /> Additional data: “Tag” for multiple criteria voting <br /> My verbs were too broad! <br /> Sub-functions. <br /> Building in layers is important <br />
  • Discussions on drupal.org, working with other developers to gather use cases. <br /> Not flexible enough! My my noun weren’t precise enough… <br /> Additional data: “Tag” for multiple criteria voting <br /> My verbs were too broad! <br /> Sub-functions. <br /> Building in layers is important <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Feedback: Vote on a 1-100 scale! Or vote with “points” like Digg! And getting results is too slow -- sorting and filtering with them takes complex SQL! <br /> The “vote” noun has a ‘value type’ now. What does the number MEAN? <br /> New noun: “Results”, new verb “Recalculate” <br /> Now have votes that can be set, and retrieved. Results that can be recalculated and retrieved. “Value type” lets modules use it in unanticipated ways, too! <br />
  • Holy crap, someone hates me. <br /> Quick show of hands -- what’s wrong with this? <br />
  • Holy crap, someone hates me. <br /> Quick show of hands -- what’s wrong with this? <br />
  • Holy crap, someone hates me. <br /> Quick show of hands -- what’s wrong with this? <br />
  • Holy crap, someone hates me. <br /> Quick show of hands -- what’s wrong with this? <br />
  • Holy crap, someone hates me. <br /> Quick show of hands -- what’s wrong with this? <br />
  • Holy crap, someone hates me. <br /> Quick show of hands -- what’s wrong with this? <br />
  • We’ve covered the basics of letting other modules “steer” your code. <br /> The next step - giving your module points of expansion <br /> Several common patterns in Drupal <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />
  • <br /> <br />

Building Apis That Rock Building Apis That Rock Presentation Transcript

  • Building APIs That Rock Congratulations: If you’re here, you’re a nerd! Wednesday, March 4, 2009
  • hi. i’m eaton. • • Voting API eaton@lullabot.com • • Token eaton in #drupal • • Form API twitter.com/eaton • Render API • • @eaton is rambling in the Amazon API #drupalapi presentation. • no puppets yet! Twitter API Wednesday, March 4, 2009
  • You Have Been Deceived Wednesday, March 4, 2009
  • You Have Been Deceived Wednesday, March 4, 2009
  • http://www.flickr.com/photos/diamondduste/1918745208/ Wednesday, March 4, 2009
  • Drupal, 2004 http://www.flickr.com/photos/diamondduste/1918745208/ Wednesday, March 4, 2009
  • http://www.flickr.com/photos/ejpphoto/2314610838/ Wednesday, March 4, 2009
  • Drupal, 2009 http://www.flickr.com/photos/ejpphoto/2314610838/ Wednesday, March 4, 2009
  • http://www.flickr.com/photos/jphilipson/582274247/ Wednesday, March 4, 2009
  • Your Module http://www.flickr.com/photos/jphilipson/582274247/ Wednesday, March 4, 2009
  • What is an API? (Hint: If it’s got comments, it’s fair game) Wednesday, March 4, 2009
  • http://www.flickr.com/photos/noahwesley/120499365/ Wednesday, March 4, 2009
  • This is your code. http://www.flickr.com/photos/noahwesley/120499365/ Wednesday, March 4, 2009
  • This is your code. Can other devs use it? http://www.flickr.com/photos/noahwesley/120499365/ Wednesday, March 4, 2009
  • http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • An interface to reusable features http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • An Features! Ponies! interface to reusable features http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • Your API An Features! Ponies! interface to reusable features http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • Your UI Your API An Features! Ponies! interface to reusable features http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • Your UI Code! Your API An Features! Ponies! interface to reusable features http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • Wednesday, March 4, 2009
  • An abstraction that hides complexity Wednesday, March 4, 2009
  • http://www.flickr.com/photos/mikereys/2643220264/ Wednesday, March 4, 2009
  • An agreement about how things are done http://www.flickr.com/photos/mikereys/2643220264/ Wednesday, March 4, 2009
  • Gentlemen! A Recap! Wednesday, March 4, 2009
  • Gentlemen! A Recap! • Drupal is complicated Wednesday, March 4, 2009
  • Gentlemen! A Recap! • Drupal is complicated • APIs let other code use your features Wednesday, March 4, 2009
  • Gentlemen! A Recap! • Drupal is complicated • APIs let other code use your features • APIs hide complexity Wednesday, March 4, 2009
  • Gentlemen! A Recap! • Drupal is complicated • APIs let other code use your features • APIs hide complexity • APIs get everyone on the same page Wednesday, March 4, 2009
  • Screw this. Let’s make an API. http://www.flickr.com/photos/djou/2908514697/ Wednesday, March 4, 2009
  • When two modules love each other very much The real story of how one API came to be Wednesday, March 4, 2009
  • Wednesday, March 4, 2009
  • VotingAPI 0.1 “This module looks cool, but that one works better…” Wednesday, March 4, 2009
  • Wednesday, March 4, 2009
  • Find the nouns! Wednesday, March 4, 2009
  • Find the nouns! Wednesday, March 4, 2009
  • Find the nouns! They’re your data! Wednesday, March 4, 2009
  • Find the nouns! They’re your data! Find the verbs! Wednesday, March 4, 2009
  • Find the nouns! They’re your data! Find the verbs! Wednesday, March 4, 2009
  • Find the nouns! They’re your data! Find the verbs! They’re your functions! Wednesday, March 4, 2009
  • Step 2: Evolution! Are the verbs and nouns flexible enough? Wednesday, March 4, 2009
  • Wednesday, March 4, 2009
  • Step 3: Planning Ahead Letting other modules do the unanticipated Wednesday, March 4, 2009
  • Wednesday, March 4, 2009
  • Wednesday, March 4, 2009
  • Wednesday, March 4, 2009
  • Wednesday, March 4, 2009
  • Wednesday, March 4, 2009
  • Wednesday, March 4, 2009
  • SCREW YOU, MISTER API DESIGNER GUY http://www.flickr.com/photos/jayd/3296037643 Wednesday, March 4, 2009
  • http://www.flickr.com/photos/jayd/3296037643 Wednesday, March 4, 2009
  • What happens when someone adds a new type? http://www.flickr.com/photos/jayd/3296037643 Wednesday, March 4, 2009
  • What happens when someone adds a new type? What happens when another person does? http://www.flickr.com/photos/jayd/3296037643 Wednesday, March 4, 2009
  • What happens when someone adds a new type? What happens when another person does? Use enums for lists that won’t change. http://www.flickr.com/photos/jayd/3296037643 Wednesday, March 4, 2009
  • What happens when someone adds a new type? What happens when another person does? Use enums for lists that won’t change. Use strings for stuff you can’t predict http://www.flickr.com/photos/jayd/3296037643 Wednesday, March 4, 2009
  • Boldly going where no module has gone before Wednesday, March 4, 2009
  • Boldly going where no module has gone before (planning ahead) Wednesday, March 4, 2009
  • Remember the verbs? Wednesday, March 4, 2009
  • Remember the verbs? Are you doing things other modules care about? Wednesday, March 4, 2009
  • Remember the verbs? Are you doing things other modules care about? Wednesday, March 4, 2009
  • Remember the verbs? Are you doing things other modules care about? Wednesday, March 4, 2009
  • Remember the verbs? Are you doing things other modules care about? module_invoke_all() It’s like party invitations for code Wednesday, March 4, 2009
  • Remember the nouns? Wednesday, March 4, 2009
  • Remember the nouns? Are you building data other modules want to change? Wednesday, March 4, 2009
  • Remember the nouns? Are you building data other modules want to change? Wednesday, March 4, 2009
  • Remember the nouns? Are you building data other modules want to change? Wednesday, March 4, 2009
  • Remember the nouns? Are you building data other modules want to change? drupal_alter() It’s like passing around the doobie of data Wednesday, March 4, 2009
  • Is your name Adrian? Wednesday, March 4, 2009
  • Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • Is your name Adrian? Perhaps Earl? Custom data structures Build it, let modules alter it, then do stuff with it. Wednesday, March 4, 2009
  • Stop! Hammertime! Wednesday, March 4, 2009
  • Stop! Hammertime! • Identify verbs and nouns Wednesday, March 4, 2009
  • Stop! Hammertime! • Identify verbs and nouns • Layer your verbs to hide complexity Wednesday, March 4, 2009
  • Stop! Hammertime! • Identify verbs and nouns • Layer your verbs to hide complexity • Account for new uses Wednesday, March 4, 2009
  • Stop! Hammertime! • Identify verbs and nouns • Layer your verbs to hide complexity • Account for new uses • Broadcast events via hooks Wednesday, March 4, 2009
  • Stop! Hammertime! • Identify verbs and nouns • Layer your verbs to hide complexity • Account for new uses • Broadcast events via hooks • Let modules alter data Wednesday, March 4, 2009
  • http://www.flickr.com/photos/tonyjcase/2847943252/ Wednesday, March 4, 2009
  • The Seven Deadly Sins http://www.flickr.com/photos/tonyjcase/2847943252/ Wednesday, March 4, 2009
  • The Lone Ranger Wednesday, March 4, 2009
  • The Lone Ranger • Reinventing the wheel Wednesday, March 4, 2009
  • The Lone Ranger • Reinventing the wheel • Ignoring conventions Wednesday, March 4, 2009
  • The Lone Ranger • Reinventing the wheel • Ignoring conventions • Ignoring related APIs! Wednesday, March 4, 2009
  • The Lone Ranger • Reinventing the wheel • Ignoring conventions • Ignoring related APIs! • Common for newcomers, or obsessives Wednesday, March 4, 2009
  • Invisible Assumptions Wednesday, March 4, 2009
  • Invisible Assumptions • Assuming the global $user Wednesday, March 4, 2009
  • Invisible Assumptions • Assuming the global $user • Checking arg(0)… Wednesday, March 4, 2009
  • Invisible Assumptions • Assuming the global $user • Checking arg(0)… • Assuming logged in users… Wednesday, March 4, 2009
  • Invisible Assumptions • Assuming the global $user • Checking arg(0)… • Assuming logged in users… • Common with UI-bound APIs Wednesday, March 4, 2009
  • Helping them to death Wednesday, March 4, 2009
  • Helping them to death • “I’ll set the breadcrumb while I’m at it...” Wednesday, March 4, 2009
  • Helping them to death • “I’ll set the breadcrumb while I’m at it...” • “And I’ll send an email, too!” Wednesday, March 4, 2009
  • Helping them to death • “I’ll set the breadcrumb while I’m at it...” • “And I’ll send an email, too!” • “And add these links, and…” Wednesday, March 4, 2009
  • Helping them to death • “I’ll set the breadcrumb while I’m at it...” • “And I’ll send an email, too!” • “And add these links, and…” • Common when an API grows out of a specific use case, or an existing module Wednesday, March 4, 2009
  • Leaky Abstraction Wednesday, March 4, 2009
  • Leaky Abstraction • “Just use this function…” Wednesday, March 4, 2009
  • Leaky Abstraction • “Just use this function…” • ...And learn everything underneath it. Wednesday, March 4, 2009
  • Leaky Abstraction • “Just use this function…” • ...And learn everything underneath it. • Common in complex problem domains Wednesday, March 4, 2009
  • Leaky Abstraction • “Just use this function…” • ...And learn everything underneath it. • Common in complex problem domains • Simplify, or get out of the way Wednesday, March 4, 2009
  • Leaky Abstraction • “Just use this function…” • ...And learn everything underneath it. • Common in complex problem domains • Simplify, or get out of the way • Sometimes, problems are just complicated. Wednesday, March 4, 2009
  • Fake Flexibility Wednesday, March 4, 2009
  • Fake Flexibility • “Oh, you can save any data…” (votingapi) Wednesday, March 4, 2009
  • Fake Flexibility • “Oh, you can save any data…” (votingapi) • “Oh, there’s a hook for that…” (blogapi) Wednesday, March 4, 2009
  • Fake Flexibility • “Oh, you can save any data…” (votingapi) • “Oh, there’s a hook for that…” (blogapi) • Build 3 test implementations Wednesday, March 4, 2009
  • Fake Flexibility • “Oh, you can save any data…” (votingapi) • “Oh, there’s a hook for that…” (blogapi) • Build 3 test implementations • Step through different use cases Wednesday, March 4, 2009
  • Mission Creep Wednesday, March 4, 2009
  • Mission Creep • Even worse than feature creep Wednesday, March 4, 2009
  • Mission Creep • Even worse than feature creep • Common with “solve-a-big-problem” APIs Wednesday, March 4, 2009
  • Mission Creep • Even worse than feature creep • Common with “solve-a-big-problem” APIs • Focus, focus, focus. Wednesday, March 4, 2009
  • Mission Creep • Even worse than feature creep • Common with “solve-a-big-problem” APIs • Focus, focus, focus. • Split into complementary APIs Wednesday, March 4, 2009
  • Dependency Soup Wednesday, March 4, 2009
  • Dependency Soup • The flip side of mission creep Wednesday, March 4, 2009
  • Dependency Soup • The flip side of mission creep • Focus, focus, focus! Wednesday, March 4, 2009
  • Dependency Soup • The flip side of mission creep • Focus, focus, focus! • Make the dependencies optional Wednesday, March 4, 2009
  • Dependency Soup • The flip side of mission creep • Focus, focus, focus! • Make the dependencies optional • Pray for a package manager Wednesday, March 4, 2009
  • Oh, the Recappery! Wednesday, March 4, 2009
  • Oh, the Recappery! • Cooperate Wednesday, March 4, 2009
  • Oh, the Recappery! • Cooperate • Don’t assume too much Wednesday, March 4, 2009
  • Oh, the Recappery! • Cooperate • Don’t assume too much • Don’t be pushy Wednesday, March 4, 2009
  • Oh, the Recappery! • Cooperate • Don’t assume too much • Don’t be pushy • Simplify or step aside Wednesday, March 4, 2009
  • Oh, the Recappery! • Cooperate • Don’t assume too much • Don’t be pushy • Simplify or step aside • Test your extensions Wednesday, March 4, 2009
  • Oh, the Recappery! • Cooperate • Don’t assume too much • Don’t be pushy • Simplify or step aside • Test your extensions • Stay focused Wednesday, March 4, 2009
  • http://www.flickr.com/photos/-sel-/60124578/ Wednesday, March 4, 2009
  • What? That’s it? http://www.flickr.com/photos/-sel-/60124578/ Wednesday, March 4, 2009
  • Thanks, flickr! • • http://www.flickr.com/photos/mikereys http://www.flickr.com/photos/jayd • • http://www.flickr.com/photos/splorp http://www.flickr.com/photos/djou • • http://www.flickr.com/photos/ http://www.flickr.com/photos/-sel- noahwesley • http://www.flickr.com/photos/ • http://www.flickr.com/photos/tonyjcase diamondduste • • http://www.flickr.com/photos/ejpphoto http://www.flickr.com/photos/jphilipson Wednesday, March 4, 2009