You are previewing Ruby on Rails Web Mashup Projects.
O'Reilly logo
Ruby on Rails Web Mashup Projects

Book Description

A step-by-step tutorial to building web mashups

  • Learn about web mashup applications and mashup plug-ins

  • Create practical real-life web mashup projects step by step

  • Access and mash up many different APIs with Ruby and Ruby on Rails

In Detail

A web mashup is a new type of web application that uses data and services from one or more external sources to build entirely new and different web applications. Web mashups usually mash up data and services that are available on the Internet— freely, commercially, or through other partnership agreements. The external sources that a mashup uses are known as mashup APIs.

This book shows you how to write web mashups using Ruby on Rails— the new web application development framework. The book has seven real-world projects and each project is described in a methodical step-by-step way, showing how you can write a web mashup from the ground up.

This book covers: Google Maps API, Yahoo geocoding services, Geocoder.us geocoding services, Geocoder.ca geocoding services, Hostip.info, Google Spreadsheet, EditGrid, Clickatell, Interfax, Amazon ECS, Sparklines, Facebook, Indeed, DayLife, Technorati, Futef, WebserviceX Currency Convertor, Weatherbug, Google Bases, Geonames, Flickr, Paypal, Google Calendar, Google Account Authentication, Google Data, and Google Spreadsheet Data.

Use Ruby and Ruby on Rails to create seven practical mashup projects following step-by-step instructions.

Table of Contents

  1. Ruby on Rails Web Mashup Projects
  2. Credits
  3. About the Author
  4. Acknowledgements
  5. About the Reviewer
  6. Preface
    1. What This Book Covers
    2. Conventions
    3. Reader Feedback
    4. Customer Support
      1. Downloading the Example Code for the Book
      2. Errata
      3. Questions
  7. 1. Introduction to Web Mashups
    1. Web mashups
      1. Ruby and Ruby on Rails
    2. Types of web mashups
    3. What can I do with web mashups?
      1. As a new breed of applications
      2. Access large sets of external sources
      3. Innovate and create extra value for your application
      4. Save on development and maintenance
      5. Leverage on and integrate common and widely available external applications
    4. Things to watch out for when doing web mashups
      1. Unreliable external APIs
      2. Commercial dependency
      3. Losing your users
    5. How this book works
      1. What does it do?
      2. Domain background
      3. Requirements overview
      4. Design
      5. Mashup APIs on the menu
      6. What we will be doing
    6. Summary
    7. Ready?
  8. 2. 'Find closest' mashup plugin
    1. What does it do?
    2. Building a kiosk locator feature for your site
    3. Requirements overview
    4. Design
    5. Mashup APIs on the menu
      1. Google Maps
      2. Yahoo Maps
      3. Geocoder.us
      4. Geocoder.ca
      5. Hostip.info
      6. GeoKit
        1. Configuring GeoKit
        2. Getting an application ID from Yahoo
        3. Getting a Google Maps API key from Google
        4. Configuring evironment.rb
      7. YM4R/GM
    6. What we will be doing
      1. Creating a new Rails project
      2. Installing the Rails plugins that will use the various mashup APIs
      3. Configuring database access and creating the database
      4. Creating scaffolding for the project
      5. Populating kiosk locations with longitude and latitude information
        1. Populate the database with sample data
        2. Bulk adding of longitude and latitude
      6. Adding longitude and latitude during kiosk creation entry
      7. Creating the find closest feature
      8. Displaying kiosks on Google Maps
    7. Summary
  9. 3. Proxy mailing list mashup plugin
    1. What does it do?
    2. Building a proxy mailing list feature for your website
    3. Requirements overview
    4. Design
      1. Define messages
      2. Get contacts and customized message data
      3. Send messages
        1. Sending SMS messages
        2. Sending fax messages
    5. Mashup APIs on the menu
      1. Google Spreadsheets
      2. EditGrid
      3. Clickatell
      4. Interfax
      5. Net::HTTP
    6. What we will be doing
      1. Creating a new Rails project
      2. Configuring the database access and creating the database
      3. Creating standard scaffolding
      4. Allowing the marketing people to create the message templates
      5. Allowing the reseller to provide contacts data through a remote link
        1. Uploading to and publishing from Google Spreadsheets
        2. Uploading to and publishing from EditGrid
      6. Creating the rake script to send messages at regular intervals
      7. Parsing data from the online spreadsheet
      8. Sending a fax with Interfax
      9. Sending an SMS through Clickatell
      10. Sending an email through ActionMailer
      11. Customizing text messages according to the individual recipient
    7. Using the mashup
    8. Summary
  10. 4. Book sales tracking mashup plugin
    1. What does it do?
    2. A book sales tracking and shopping cart feature
    3. Requirements overview
    4. Design
      1. Provide information
      2. Track sales ranking with a chart
      3. Show customer reviews
      4. Provide a shopping cart
      5. Allow visitors to buy related books
    5. Mashup APIs on the menu
      1. Amazon E-Commerce Services API
        1. Registering for an Amazon Web Service access key ID
        2. Registering as an Amazon Associate
      2. Amazon ECS Ruby library
      3. Sparklines web service
    6. What we will be doing
      1. Creating a new Rails project
      2. Installing the Amazon ECS Ruby library
      3. Creating the books controller
      4. Creating the Amazon Rails library
      5. Creating the sidebar
      6. Getting customer reviews
      7. Getting the daily sales ranking
      8. Displaying the sales ranking sparkline
      9. Creating a shopping cart
      10. Adding similar books to the shopping cart
    7. Summary
  11. 5. Job board mashup application
    1. What does it do?
    2. Job board
    3. Requirements overview
    4. Design
    5. Mashup APIs on the menu
      1. Facebook
        1. Facebook Platform
        2. RFacebook
      2. Google Maps
      3. Indeed
      4. Technorati
      5. Daylife
      6. Net::HTTP
      7. XmlSimple
    6. What we will be doing
      1. Acquire candidates through Facebook
      2. Search for jobs through Indeed
      3. Display jobs in Google Maps
      4. Search and display job news from Daylife
      5. Search and display job stories from Technorati
      6. Acquiring candidates through Facebook
        1. Creating a Rails application
        2. Creating a Facebook application
        3. Installing and configuring RFacebook
        4. Extracting the Facebook user profile
        5. Displaying the user profile and creating the search form
        6. Deploying and configuring the Facebook application
      7. Searching for jobs through Indeed
        1. Creating the search action
        2. Parsing and displaying the search results
      8. Display jobs in Google Maps
        1. Displaying the location of the jobs on the map
        2. Creating a link on each job to show the news and blog articles
      9. Searching and displaying news from Daylife
        1. Searching for news on the company
      10. Searching and displaying blog articles from Technorati
        1. Searching for blog entries on the company
    7. Summary
  12. 6. Trip organizer mashup application
    1. What does it do?
    2. Requirements overview
    3. Design
    4. Mashup APIs on the menu
      1. Google Maps
      2. FUTEF
      3. WebserviceX Currency Converter
      4. Yahoo Maps Geocoding API
      5. WeatherBug
      6. Kayak
      7. GeoNames
      8. Flickr
      9. Hostip.info
      10. Open URI
    5. What we will be doing
      1. Creating a Rails application
      2. Creating the basic Location object
      3. Creating a search form
      4. Creating the online map
      5. Creating the tabs for the information
      6. Getting information from Wikipedia
      7. Getting places information
      8. Getting hotel information
      9. Getting weather information
      10. Displaying pictures of the location
      11. Showing currency exchange rate
      12. Showing remote location time compared with local time
    6. Showing nice exception pages
    7. Summary
  13. 7. Ticketing mashup application
    1. What does it do?
    2. Online event ticketing
    3. Requirements overview
    4. Design
    5. Mashup APIs on the menu
      1. PayPal
        1. Website Payment Pro
        2. PayPal Sandbox
      2. Ruby-PayPal library
      3. Google Calendar
      4. GoogleCalendar library
      5. Clickatell
    6. What we will be doing
      1. Creating a Rails application
      2. Creating the flow for the ticketing application
      3. Integrating with PayPal for payment
      4. Integrating with Google Calendar
      5. Integrating with Clickatell
    7. Summary
  14. 8. Expenses claims mashup plugin
    1. What does it do?
    2. Salary and expense claims
    3. Requirements overview
    4. Design
    5. Mashup APIs on the menu
      1. PayPal
        1. Mass Payment
        2. PayPal Sandbox
      2. Google
        1. Google Account Authentication
        2. Google Data APIs
        3. Google Document Data List APIs
        4. Google Spreadsheet Data APIs
      3. Ruby-PayPal library
      4. Acts_as_state_machine plugin
      5. XmlSimple
    6. What we will be doing
      1. Creating a Rails application
      2. Setting up the database
      3. Creating the Payment and Claim Item scaffolds
      4. Modifying Payment and creatomg subclasses
      5. Creating the Google API access library
      6. Creating the Manager class and its controller and views
      7. Creating the expense claims parsing rake script
      8. Creating the mass payment rake script
      9. Modifying the Payment and Claim Item controllers
    7. How it works all together
    8. Summary