JavaScript
  Home arrow JavaScript arrow Making JavaScript Applications Degrade Gra...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
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? 
JAVASCRIPT

Making JavaScript Applications Degrade Gracefully with AJAX and MySQL
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2007-07-02

    Table of Contents:
  • Making JavaScript Applications Degrade Gracefully with AJAX and MySQL
  • Fetching database rows using a typical approach
  • Displaying additional database records with AJAX
  • Putting all the pieces together

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Making JavaScript Applications Degrade Gracefully with AJAX and MySQL


    (Page 1 of 4 )

    For many web developers, JavaScript can be the perfect client-side scripting language for turning a boring web site into a bunch of interactive elements. This impressive interactivity comes at a cost in those cases where a web application has been designed to depend entirely on this language for working appropriately. Fortunately, there is a solution; keep reading to learn more.

    Introduction

    If you want to learn how to solve this issue with relative ease, then this series of articles might be what you're looking for. Welcome to the last installment of the series that began with "Making JavaScript Applications Degrade Gracefully." As the title clearly says, over the course of these three tutorials you'll find concrete examples of how to develop JavaScript applications that degrade gracefully when scripting has been disabled on the browser.

    If you already went through the preceding articles of the series, then quite possibly you'll be very familiar with the basic concepts surrounding the development of JavaScript code that has the "ability" to fail transparently under certain client-side conditions. True to form, I demonstrated how to write some basic JavaScript routines aimed at expanding the existing functionality of a specific web application, while keeping its original capacity practically untouched.

    This concept is very important in the terrain of web development. When it's applied in conjunction with some others, such as the creation of unobtrusive JavaScript code, it can result in the construction of more robust and independent server-side applications.

    Nevertheless, it's quite possible that you already know in detail all of these fundamental concepts, thus I believe that it's time to introduce the topics that I plan to cover in this final article of the series. In this case, I'll be using a step-by-step process to demonstrate how to develop a typical web application that first retrieves some records from a MySQL database, and then displays them straight to the browser.

    But the catch here consists of fetching these records via AJAX, which means that no web page reloads will take place. However, if JavaScript has been disabled in the client, users still will be able to visualize the database records in question. Undoubtedly, this is an example where JavaScript can be used to extend the original functionality of a certain web application, but it doesn't affect the way this application works when scripting has been deactivated on the browser.

    With the preliminaries out of our way, let's move forward and learn together how to pull some database rows from MySQL via AJAX. It'll be a truly educational experience, trust me!

    More JavaScript Articles
    More By Alejandro Gervasio


       · Over the course of this last installment of the series, a simple MySQL-based...
     

    JAVASCRIPT ARTICLES

    - Detect Browser Compatibility with the Reques...
    - Using the EXT JS Date Picker Widget
    - Ajax Hack for Entering Information Without R...
    - EXT JS 2.1 Overview
    - Using the Style Object for Zebra Tables with...
    - Binary Searching
    - An Improved Approach to Building Zebra Tables
    - Assigning Background Colors Dynamically to Z...
    - Building Zebra Tables with CSS and JavaScript
    - JavaScript: Array Objects
    - A Closer Look at Smart Markers with Yahoo! M...
    - Using Polylines and Smart Markers with Yahoo...
    - Bulleted Menu of Links
    - Creating Click Loggers and Basic Markers wit...
    - Adding Pan Controls to Yahoo! Maps







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway