Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
...in Drupal
Building Twitter in Drupal
What that means
What that means

 How we did it
What that means

  How we did it

Why you shouldn’t
So… what is Twitter?

• Streamlined info flow
• 140 character messages
• Just your friends
• ...And eighty jillion users
Twitter is growing.




Source: Jason Kottke (http://www.kottke.org/07/05/growth-of-twitter-vs-blogger)
Twitter is simple.
No, really. Simple.

 Public                User's               Friends'
Timeine                Page                  Posts



          Individual            Favorites   Update
             Post                  List      Form
What can users do?
What can users do?

• Post an update
What can users do?

• Post an update
• Follow a user
What can users do?

• Post an update
• Follow a user
• Bookmark a post
What can users do?

• Post an update
• Follow a user
• Bookmark a post
•…
What can users do?

• Post an update
• Follow a user
• Bookmark a post
•…
• Profit!
Why rebuild Twitter?




Image: Exploding Dog (http://www.explodingdog.com)
Why rebuild Twitter?
             • “Sandboxed” communication




Image: Exploding Dog (http://www.explodingdog.com)
Why rebuild Twitter?
             • “Sandboxed” communication
             • Integration into a larger site




Image: Exploding Dog (http://www.explodingdog.com)
Why rebuild Twitter?
             • “Sandboxed” communication
             • Integration into a larger site
             • The simplicity challenge




Image: Exploding Dog (http://www.explodingdog.com)
Why rebuild Twitter?
             • “Sandboxed” communication
             • Integration into a larger site
             • The simplicity challenge


             • Because it was there

Image: Exploding Dog (http://www.explodingdog.com)
What hath Drupal
   wrought?
What hath Drupal
       wrought?
• The actions (post, follow, favorite)
What hath Drupal
       wrought?
• The actions (post, follow, favorite)
• The views (timeline, friends, favorites)
What hath Drupal
       wrought?
• The actions (post, follow, favorite)
• The views (timeline, friends, favorites)
• The Simple™
What hath Drupal
       wrought?
• The actions (post, follow, favorite)
• The views (timeline, friends, favorites)
• The Simple™
• ...In 24 man-hours.
What hathn’t Drupal
    wrought?
What hathn’t Drupal
     wrought?
• Some layout details
What hathn’t Drupal
     wrought?
• Some layout details
• The SMS (SMS module)
What hathn’t Drupal
     wrought?
• Some layout details
• The SMS (SMS module)
• The API (Services module)
What hathn’t Drupal
     wrought?
• Some layout details
• The SMS (SMS module)
• The API (Services module)
• The Community (magic)
Building Twitter in Drupal
What did we just see?
What did we just see?
• One content type
What did we just see?
• One content type
• Two flags
What did we just see?
• One content type
• Two flags
• Four helper modules
What did we just see?
• One content type
• Two flags
• Four helper modules
• Five views
What did we just see?
• One content type
• Two flags
• Four helper modules
• Five views
• 200 lines of custom PHP
What did we just see?
• One content type
• Two flags
• Four helper modules
• Five views
• 200 lines of custom PHP
• One custom theme
The content type




• No title, no options: just a body field.
• Custom page.tpl.php in the theme
The sidebar

• Two blocks
• Defined by module
• 50-60 lines of PHP
• Faster, but brittle
Friends and favorites



• “Following” flag
• “Favorite” flag
• Works cleanly with Views
The update form




• Custom form in our module
• Simple validation
• Twitter’s Javascript
The listing pages




• Views module
• blittr.com/[list-style]/[username]
• Filtered by Flags
The look and feel!
The look and feel!

• Duplicates Twitter’s HTML
• Uses Twitter’s CSS
• Ignores the majority of Drupal’s data
• Seven replacement templates views fields)
  (page, page-node, block, node, views-table,
The other bits

• SMS Framework module
• Services module
• Mobile theme
• Personal CSS skins
• Privacy
The other bits

• SMS Framework module
• Services module
• Mobile theme
• Personal CSS skins
• Privacy
Yay!
This was a
Terrible Idea
Building Twitter in Drupal
Drupal is not
(just) a framework
Drupal’s mastery curve
   can be steep
Drupal is not
  an island
Drupal is
a powerful tool
Re-use the
techniques
Don’t rebuild Twitter...
Don’t rebuild Twitter...
  in any system!

More Related Content

Building Twitter in Drupal