Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Create your own information space with Ajax and del.icio.us

Design an Ajax "super page" to maximize your del.icio.us experience

Tyler Anderson, Freelance writer and developer, Backstop Media
Tyler Anderson holds a degree in computer science and a Master of Science degree in computer engineering, both from Brigham Young University. Tyler is currently a freelance writer and developer for Backstop Media.

Summary:  del.icio.us is a social bookmarking Web site that allows users to create and share browser-independent bookmarks, accessible directly over the Internet, in ways your browser won't allow. The traditional hierarchical organization of browser bookmarks is overhauled, allowing users to instead associate each and every bookmark with any number of descriptive tags. Imagine a single page where you and your friends can surf the Web and have your del.icio.us tags, links, and functions handy, or a single page where you can save the site you're browsing directly into your del.icio.us account, along with comments and chosen tags. This tutorial shows you how to use Ajax to build just such a page using a PHP script as the server-side proxy.

Date:  26 Feb 2008
Level:  Intermediate PDF:  A4 and Letter (1150 KB | 39 pages)Get Adobe® Reader®

Activity:  17613 views
Comments:  

Before you start

This tutorial is recommended for Ajax developers interested in complimenting their developer skills to better design Ajax pages by accessing Web APIs and parsing XML in their Ajax applications. Specifically, developers will access del.icio.us Web APIs to manage links and tags associated with their del.icio.us account.

About this tutorial

This tutorial shows you how to use Ajax and a PHP proxy script to access del.icio.us Web APIs, all from a single "super page" that can be simulated as the home page to your Harry Potter book club. You'll make this page publicly available on the Internet so that your book club can gain traction and attract new members (as an aside, you may want to make it registration-based so that you have control over who adds links to your club). The del.icio.us APIs make this possible by allowing developers to create custom applications that allow users (such as yourself and the members of your book club) to manage tags and bookmarks directly in the club's del.icio.us account from the main club's page, without having to stray off to del.icio.us first, or click on a button in the browser.

This tutorial will help you do the following:

  • Learn the del.icio.us way.
  • Learn the various APIs available and test them from the browser.
  • Design a super page using a table-free Web page design with a plethora of Ajax-friendly div tags.
  • Develop a server-side proxy using PHP to handle del.icio.us API calls and to surf the Web.
  • Parse XML returned as responses from del.icio.us API calls, and edit HTML within div tags with the parsed data.
  • Implement the following del.icio.us APIs in your super page:
    • tags/get -- To retrieve tags from your del.icio.us account
    • tags/rename -- To rename your tags
    • posts/add -- To add new bookmarks directly into your del.icio.us account
    • posts/get -- To retrieve bookmarks from your account associated with a tag you choose
    • posts/delete -- To delete existing bookmarks from your account

All this API functionality is what makes it possible for your book club members to access a customizable Web page you create, while simultaneously adding bookmarks and tags to the club's del.icio.us account.


Prerequisites

Beyond a text editor and a browser, you will need PHP and a Web server for your proxy:

  • PHP -- You'll implement the proxy in PHP. Any version will do.
  • Apache2 -- The Apache2 HTTP server is recommended as your server.

For an easy install on Windows® of both Apache2 and PHP, along with MySQL (not needed in this tutorial), see WampServer for their latest release.

1 of 10 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Web development, Open source, XML
ArticleID=291428
TutorialTitle=Create your own information space with Ajax and del.icio.us
publish-date=02262008
author1-email=tyleranderson5@yahoo.com
author1-email-cc=ruterbo@us.ibm.com