AJAX
  Home arrow AJAX arrow Build A Better Twitter Chat Client Than Chamillionaire
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
AJAX

Build A Better Twitter Chat Client Than Chamillionaire
By: Dev Shed
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 1
    2009-08-04


    Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Tuesday evening, August 4th, the musician Chamillionaire launched a live, first showing video on his website along with a Twitter-based chat client. While the Twitter chat client worked from a data perspective, based on what the code showed it looks like most browsers would crash.

    Chamillionaire, known for his song, "Ridin' Dirty", announced a live event on his website located at http://www.chamillionaire.com/live.html.  While traffic spiked, the site appeared to be functioning slowly but fine.  However, a clever implementation of a twitter chat client may have ruined the evening in the long run for thousands of fans.

    The site uses twitter's api to establish a user's identity, then allows them to tweet live, linking it to the hashtag "#chamillionaire".  The chat client then pulls live data down from the twitter server and shows it in a chronological order.  Thus, the site has effectively created a chat client with only api calls and twitter as it's backbone.

    Great and innovative so far.  However, two major problems exist with this implementation-

    1:  The chat window does not scroll, nor does it offer any kind of history.  With literally hundreds of tweets going by in seconds, it's impossible to see your own twitter chats appear in the client.  The right thing to do would be to limit the window to the past 100 tweets and allow scrolling of some sort, or a paginated cache to see what conversatons are going on.

    2:  The code, via AJAX, actually manipulates the DOM to insert new twitter chats into the client.  Not a problem, except no other list items (the tag used in this chat client) are being deleted.  At some point, depending on each person's memory and cpu, the browser will crash due to 1000's of list items being added to the DOM.  The right implementation of this twitter client, for AJAX, would be to set a maximum number of rows and for every new DOM list item (<li>) tag added, an old one would be deleted or removed from the stack.

    For more information:

    CHAMILLIONAIRE DROPS FINAL INSTALLMENT OF MIXTAPE - Hip Hop Press
    Twitter's API Guide - Twitter
    jQuery - PHP, AJAX and the Twitter's API - Steve Reynolds




    Discuss Build A Better Twitter Chat Client Than Chamillionaire
     
    >>> Be the FIRST to comment on this article!
     

     
     
    >>> More AJAX Articles          >>> More By Dev Shed
     

       

    AJAX ARTICLES

    - PHP AJAX Form Validation
    - Completing a User-Defined CSS Website with P...
    - Create a User-Defined CSS Website with PHP
    - Build A Better Twitter Chat Client Than Cham...
    - Using Division Equations to Make Web Forms S...
    - Using Integer Multiplication to Protect Web ...
    - Using Simple Checksums for Web Form Verifica...
    - Protecting Web Forms with AJAX
    - Using Prototip with AJAX
    - Using Prototip
    - Using the google.load() Method with Google`s...
    - How to Handle Ajax Errors
    - Uncompressing Source Files with Google`s AJA...
    - Using the jQuery Framework with Google`s Aja...
    - Using Google`s Ajax Libraries API




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek