Mashup University: Tapping The Portable Social Network

Kevin Lawver

This is a presentation. If you'd like to view all the slides like a normal web page, you can.

Tapping the Portable Social Network

Ingredients

  1. Ruby on Rails
  2. The following gems:
    • ruby-openid
    • mofo
  3. MySQL
  4. jquery
  5. A page with an OpenID delegate, an hcard and a blogroll with XFN
    • I mean, who doesn't have that?

Getting Started

  1. Create a rails app: rails mashup_u
  2. Make the changes in the README
  3. Configure the database in config/database.yml
  4. run script/server to make sure things work.

The Routine Stuff

  1. delete public/index.html
  2. put jquery.js in public/javascript
  3. create a layout
  4. add that layout to application.rb

Create Your Model

script/generate model User

Create Your Controllers

script/generate controller users
script/generate controller signin

Now, It's Time To Create a Signin Page!

  1. open up controllers/signin_controller.rb
  2. We need a few methods: index, aol_signin, aol_signedin, openid_signin, openid_signedin
  3. We'll start with OpenID...

Configuring

require "openid"
$OPENID_STORE = OpenID::FilesystemStore.new("#{RAILS_ROOT}/tmp/cache")
$OPENID_RETURN = "http://HOST:PORT/signin/openid_signedin"

Handling OpenID

Logging In With OpenID

Let's Log In!

Let's Add OpenAuth!

Let's Log In!

Time to make a User

Create Some Relationships

Now, We Need Some Users!

Time To Make The Tables!

We Need to do Something About the Login Process

Now, we're ready to do something cool!

For OpenID Users

Enter Microformats!

For AOL Users

Back to the Code!

Creating a Form

Finding the Network

Find the AOL Network

Creating Your User

Possibilities

Questions