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  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
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


    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

    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in
    - Active Client Pages at the Server
    - ACP Tab Web Page







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT