Building Apis That Rock
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Building Apis That Rock

on

  • 10,630 views

 

Statistics

Views

Total Views
10,630
Views on SlideShare
10,586
Embed Views
44

Actions

Likes
18
Downloads
217
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
  • 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 Presentation Transcript

  • 1. Building APIs That Rock Congratulations: If you’re here, you’re a nerd! Wednesday, March 4, 2009
  • 2. 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
  • 3. You Have Been Deceived Wednesday, March 4, 2009
  • 4. You Have Been Deceived Wednesday, March 4, 2009
  • 5. http://www.flickr.com/photos/diamondduste/1918745208/ Wednesday, March 4, 2009
  • 6. Drupal, 2004 http://www.flickr.com/photos/diamondduste/1918745208/ Wednesday, March 4, 2009
  • 7. http://www.flickr.com/photos/ejpphoto/2314610838/ Wednesday, March 4, 2009
  • 8. Drupal, 2009 http://www.flickr.com/photos/ejpphoto/2314610838/ Wednesday, March 4, 2009
  • 9. http://www.flickr.com/photos/jphilipson/582274247/ Wednesday, March 4, 2009
  • 10. Your Module http://www.flickr.com/photos/jphilipson/582274247/ Wednesday, March 4, 2009
  • 11. What is an API? (Hint: If it’s got comments, it’s fair game) Wednesday, March 4, 2009
  • 12. http://www.flickr.com/photos/noahwesley/120499365/ Wednesday, March 4, 2009
  • 13. This is your code. http://www.flickr.com/photos/noahwesley/120499365/ Wednesday, March 4, 2009
  • 14. This is your code. Can other devs use it? http://www.flickr.com/photos/noahwesley/120499365/ Wednesday, March 4, 2009
  • 15. http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • 16. An interface to reusable features http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • 17. An Features! Ponies! interface to reusable features http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • 18. Your API An Features! Ponies! interface to reusable features http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • 19. Your UI Your API An Features! Ponies! interface to reusable features http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • 20. Your UI Code! Your API An Features! Ponies! interface to reusable features http://www.flickr.com/photos/splorp/126523012/ Wednesday, March 4, 2009
  • 21. Wednesday, March 4, 2009
  • 22. An abstraction that hides complexity Wednesday, March 4, 2009
  • 23. http://www.flickr.com/photos/mikereys/2643220264/ Wednesday, March 4, 2009
  • 24. An agreement about how things are done http://www.flickr.com/photos/mikereys/2643220264/ Wednesday, March 4, 2009
  • 25. Gentlemen! A Recap! Wednesday, March 4, 2009
  • 26. Gentlemen! A Recap! • Drupal is complicated Wednesday, March 4, 2009
  • 27. Gentlemen! A Recap! • Drupal is complicated • APIs let other code use your features Wednesday, March 4, 2009
  • 28. Gentlemen! A Recap! • Drupal is complicated • APIs let other code use your features • APIs hide complexity Wednesday, March 4, 2009
  • 29. 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
  • 30. Screw this. Let’s make an API. http://www.flickr.com/photos/djou/2908514697/ Wednesday, March 4, 2009
  • 31. When two modules love each other very much The real story of how one API came to be Wednesday, March 4, 2009
  • 32. Wednesday, March 4, 2009
  • 33. VotingAPI 0.1 “This module looks cool, but that one works better…” Wednesday, March 4, 2009
  • 34. Wednesday, March 4, 2009
  • 35. Find the nouns! Wednesday, March 4, 2009
  • 36. Find the nouns! Wednesday, March 4, 2009
  • 37. Find the nouns! They’re your data! Wednesday, March 4, 2009
  • 38. Find the nouns! They’re your data! Find the verbs! Wednesday, March 4, 2009
  • 39. Find the nouns! They’re your data! Find the verbs! Wednesday, March 4, 2009
  • 40. Find the nouns! They’re your data! Find the verbs! They’re your functions! Wednesday, March 4, 2009
  • 41. Step 2: Evolution! Are the verbs and nouns flexible enough? Wednesday, March 4, 2009
  • 42. Wednesday, March 4, 2009
  • 43. Step 3: Planning Ahead Letting other modules do the unanticipated Wednesday, March 4, 2009
  • 44. Wednesday, March 4, 2009
  • 45. Wednesday, March 4, 2009
  • 46. Wednesday, March 4, 2009
  • 47. Wednesday, March 4, 2009
  • 48. Wednesday, March 4, 2009
  • 49. Wednesday, March 4, 2009
  • 50. SCREW YOU, MISTER API DESIGNER GUY http://www.flickr.com/photos/jayd/3296037643 Wednesday, March 4, 2009
  • 51. http://www.flickr.com/photos/jayd/3296037643 Wednesday, March 4, 2009
  • 52. What happens when someone adds a new type? http://www.flickr.com/photos/jayd/3296037643 Wednesday, March 4, 2009
  • 53. 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
  • 54. 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
  • 55. 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
  • 56. Boldly going where no module has gone before Wednesday, March 4, 2009
  • 57. Boldly going where no module has gone before (planning ahead) Wednesday, March 4, 2009
  • 58. Remember the verbs? Wednesday, March 4, 2009
  • 59. Remember the verbs? Are you doing things other modules care about? Wednesday, March 4, 2009
  • 60. Remember the verbs? Are you doing things other modules care about? Wednesday, March 4, 2009
  • 61. Remember the verbs? Are you doing things other modules care about? Wednesday, March 4, 2009
  • 62. 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
  • 63. Remember the nouns? Wednesday, March 4, 2009
  • 64. Remember the nouns? Are you building data other modules want to change? Wednesday, March 4, 2009
  • 65. Remember the nouns? Are you building data other modules want to change? Wednesday, March 4, 2009
  • 66. Remember the nouns? Are you building data other modules want to change? Wednesday, March 4, 2009
  • 67. 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
  • 68. Is your name Adrian? Wednesday, March 4, 2009
  • 69. Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • 70. Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • 71. Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • 72. Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • 73. Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • 74. Is your name Adrian? Perhaps Earl? Wednesday, March 4, 2009
  • 75. Is your name Adrian? Perhaps Earl? Custom data structures Build it, let modules alter it, then do stuff with it. Wednesday, March 4, 2009
  • 76. Stop! Hammertime! Wednesday, March 4, 2009
  • 77. Stop! Hammertime! • Identify verbs and nouns Wednesday, March 4, 2009
  • 78. Stop! Hammertime! • Identify verbs and nouns • Layer your verbs to hide complexity Wednesday, March 4, 2009
  • 79. Stop! Hammertime! • Identify verbs and nouns • Layer your verbs to hide complexity • Account for new uses Wednesday, March 4, 2009
  • 80. Stop! Hammertime! • Identify verbs and nouns • Layer your verbs to hide complexity • Account for new uses • Broadcast events via hooks Wednesday, March 4, 2009
  • 81. 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
  • 82. http://www.flickr.com/photos/tonyjcase/2847943252/ Wednesday, March 4, 2009
  • 83. The Seven Deadly Sins http://www.flickr.com/photos/tonyjcase/2847943252/ Wednesday, March 4, 2009
  • 84. The Lone Ranger Wednesday, March 4, 2009
  • 85. The Lone Ranger • Reinventing the wheel Wednesday, March 4, 2009
  • 86. The Lone Ranger • Reinventing the wheel • Ignoring conventions Wednesday, March 4, 2009
  • 87. The Lone Ranger • Reinventing the wheel • Ignoring conventions • Ignoring related APIs! Wednesday, March 4, 2009
  • 88. The Lone Ranger • Reinventing the wheel • Ignoring conventions • Ignoring related APIs! • Common for newcomers, or obsessives Wednesday, March 4, 2009
  • 89. Invisible Assumptions Wednesday, March 4, 2009
  • 90. Invisible Assumptions • Assuming the global $user Wednesday, March 4, 2009
  • 91. Invisible Assumptions • Assuming the global $user • Checking arg(0)… Wednesday, March 4, 2009
  • 92. Invisible Assumptions • Assuming the global $user • Checking arg(0)… • Assuming logged in users… Wednesday, March 4, 2009
  • 93. Invisible Assumptions • Assuming the global $user • Checking arg(0)… • Assuming logged in users… • Common with UI-bound APIs Wednesday, March 4, 2009
  • 94. Helping them to death Wednesday, March 4, 2009
  • 95. Helping them to death • “I’ll set the breadcrumb while I’m at it...” Wednesday, March 4, 2009
  • 96. 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
  • 97. 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
  • 98. 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
  • 99. Leaky Abstraction Wednesday, March 4, 2009
  • 100. Leaky Abstraction • “Just use this function…” Wednesday, March 4, 2009
  • 101. Leaky Abstraction • “Just use this function…” • ...And learn everything underneath it. Wednesday, March 4, 2009
  • 102. Leaky Abstraction • “Just use this function…” • ...And learn everything underneath it. • Common in complex problem domains Wednesday, March 4, 2009
  • 103. 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
  • 104. 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
  • 105. Fake Flexibility Wednesday, March 4, 2009
  • 106. Fake Flexibility • “Oh, you can save any data…” (votingapi) Wednesday, March 4, 2009
  • 107. Fake Flexibility • “Oh, you can save any data…” (votingapi) • “Oh, there’s a hook for that…” (blogapi) Wednesday, March 4, 2009
  • 108. 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
  • 109. 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
  • 110. Mission Creep Wednesday, March 4, 2009
  • 111. Mission Creep • Even worse than feature creep Wednesday, March 4, 2009
  • 112. Mission Creep • Even worse than feature creep • Common with “solve-a-big-problem” APIs Wednesday, March 4, 2009
  • 113. Mission Creep • Even worse than feature creep • Common with “solve-a-big-problem” APIs • Focus, focus, focus. Wednesday, March 4, 2009
  • 114. 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
  • 115. Dependency Soup Wednesday, March 4, 2009
  • 116. Dependency Soup • The flip side of mission creep Wednesday, March 4, 2009
  • 117. Dependency Soup • The flip side of mission creep • Focus, focus, focus! Wednesday, March 4, 2009
  • 118. Dependency Soup • The flip side of mission creep • Focus, focus, focus! • Make the dependencies optional Wednesday, March 4, 2009
  • 119. Dependency Soup • The flip side of mission creep • Focus, focus, focus! • Make the dependencies optional • Pray for a package manager Wednesday, March 4, 2009
  • 120. Oh, the Recappery! Wednesday, March 4, 2009
  • 121. Oh, the Recappery! • Cooperate Wednesday, March 4, 2009
  • 122. Oh, the Recappery! • Cooperate • Don’t assume too much Wednesday, March 4, 2009
  • 123. Oh, the Recappery! • Cooperate • Don’t assume too much • Don’t be pushy Wednesday, March 4, 2009
  • 124. Oh, the Recappery! • Cooperate • Don’t assume too much • Don’t be pushy • Simplify or step aside Wednesday, March 4, 2009
  • 125. Oh, the Recappery! • Cooperate • Don’t assume too much • Don’t be pushy • Simplify or step aside • Test your extensions Wednesday, March 4, 2009
  • 126. 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
  • 127. http://www.flickr.com/photos/-sel-/60124578/ Wednesday, March 4, 2009
  • 128. What? That’s it? http://www.flickr.com/photos/-sel-/60124578/ Wednesday, March 4, 2009
  • 129. 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