A cheeky look at building Drupal web sites out of external web services. Drupal as a mashup engine? It can happen, but there are some important issues to consider.
11. Takin’ it up a notch
• Posting links? Use Delicious.
• Shoutbox/short updates? Use Twitter.
• Photos and galleries? Use Flickr!
• Video? Youtube, Blip.tv, etc.
• Reviewing books? Amazon, Goodreads.
• Comments? Disqus!
• Blogging? Use Wordpress.
http://www.flickr.com/photos/mr_diesio/2548025554
Monday, March 23, 2009
12. I… but… my forms!
• You will never enter product information as
accurately as Amazon.
• You will never be as popular as Flickr.
• You will never write a Firefox Plugin for
Link Field.
• You will never enjoy transcoding your own
video.
http://www.flickr.com/photos/mr_diesio/2548025554
Monday, March 23, 2009
13. Become the
crossroads, or
enhance native
content
http://www.flickr.com/photos/sidelong/542906832
Monday, March 23, 2009
14. Become the
crossroads, or
enhance native
Link to content
Content
http://www.flickr.com/photos/sidelong/542906832
Monday, March 23, 2009
15. When does it work?
• Common on social sites
• Ever used Facebook?
• News sites (CNN, etc.)
• Personal Aggregators (FriendFeed, Tumblr)
• External content is treated as something
that lives out there
http://www.flickr.com/photos/sidelong/542906832
Monday, March 23, 2009
16. How can you do it?
• Good ol’ aggregator (it’s themable now)
• Activity module (it supports views!)
• DayLife API, NowPublic’s new service
• Native modules (delicious, flick, etc.)
http://www.flickr.com/photos/sidelong/542906832
Monday, March 23, 2009
18. Gobble up
content
Use external sources
as your primary source
Monday, March 23, 2009
19. Does this make sense?
• How hardcore are you?
• How badly do your content producers hate
the node form?
• External content is treated as something
that lives in here.
• Drupal becomes a presentation engine
• Drupal becomes a… mashup?
Monday, March 23, 2009
20. How the..?
• Native modules
• FeedAPI + Feed Element Mapper
• Nodes become flexible wrappers
• Lay your own pipes (we’ll see this later)
Monday, March 23, 2009
21. Drupal
PHP
Apache MySQL
Operating System
Monday, March 23, 2009
22. Flickr
Drupal
Delicious
PHP
Google
Apache MySQL
Stuff
Operating System
Monday, March 23, 2009
23. Flickr
Delicious
Google
Drupal
Stuff
Amazon
Monday, March 23, 2009
24. Flickr
Delicious
Google
Drupal
Stuff
Amazon
Monday, March 23, 2009
25. Are you insane?
http://www.flickr.com/photos/beaub/2424695862/
Monday, March 23, 2009
26. Maybe a little insane
• Filtering the firehose (tagging helps)
• Importing the Internet
• 8192 auth methods (OAuth helps?)
• Even Amazon goes down.
• Magnolia (moment of silence)
http://www.flickr.com/photos/beaub/2424695862/
Monday, March 23, 2009
27. Yeah, kind of insane.
• Congratulations! You’re an integration
specialist!
• How much do you trust the Internet?
• You can’t form_alter someone else’s site.
• You’re assembling data streams instead of
modules.
http://www.flickr.com/photos/beaub/2424695862/
Monday, March 23, 2009
30. Doing it with Drupal
• drupal_http_request()
• PHP 5 - SimpleXML & JSON
• drupal_write_record()
• Expose your tables via Views
• Wrap local vs. remote
• (See “Building APIs That Rock”)
Monday, March 23, 2009
31. If you release it...
• Support the full API (or as much as you can)
• Fail gracefully
• Don’t force data into nodes
• Cache data whenever you can
• Don’t write a SQL query builder
• PHPDoc, PHPDoc, PHPDoc!
Monday, March 23, 2009
32. Don’t forget…
• Respect API policies (Limits, Caching)
• Don’t trust the data you get back
• There are cutting-edge options
• Custom Views queries (Flickr?)
• In Drupal 7, remote fields
• NowPublic’s Aggregation system
Monday, March 23, 2009
33. Leveraging our Synergy
• Drupal is a great tool
• Its strengths can be weaknesses
• Outsource services
• Drupal can be a mixer
• If you roll your own, think ahead
Monday, March 23, 2009
Notes de l'éditeur
I got started in Drupal 'cause it was very flexible, lots of stuff in one integrated package..
Wanted a blog that had wiki links that had image galleries and timelines and…
While other systems integrated, Drupal emphasized native systems and interconnections
The dark side: Not Invented Here syndrome. If it’s not made of nodes, it’s unclean!
This is what it can produce.
Talked to a client building a web app, data warehouse with drupal with firefox plugin.
They listened to the community, heard “Build it in Drupal: CCK, Nodes, Views!”
“OK, we’re trying to figure out how to do that and scale it to a billion or so records.
We need to see Drupal as one tool in a big toolbox
The LAMP stack is already designed this way!
We’re used to some things, like memcached, analytics, heck -- the database!
Web services and web APIs are starting to fill important roles, too.
Spam protection? Advertising?
Lots of people, lots of sites, are starting to rely on these services.
These aren’t controversial, and there are big wins.
Lots of people, lots of sites, are starting to rely on these services.
These aren’t controversial, and there are big wins
This is the first step: Drupal supported by services