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  
Moblin 
JMSL Numerical Library 
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
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 6
    2007-06-20

    Table of Contents:
  • Making JavaScript Applications Degrade Gracefully
  • Working with combo boxes to extend a site's behavior with JavaScript
  • Making JavaScript degrade gracefully
  • Assembling all the pieces

  • 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


    (Page 1 of 4 )

    JavaScript is widely used for applications throughout the web. That's fine, but what happens when someone who has disabled JavaScript on their browser tries to use one of those applications? Nothing -- literally nothing. Fortunately, there is a way to make JavaScript degrade gracefully and improve your visitors' experiences. Keep reading to find out more. This article is the first in a series.

    Introduction

    As the enthusiast web developer that you certainly are, quite possibly you'll agree with me that the present and future of JavaScript-driven applications looks really brilliant and promising. Considering that the number of robust third-party JavaScript libraries available on the web these days continues growing, and that the range of web sites that rely upon this popular client-side scripting language is on the rise as well, it must be admitted that the health of JavaScript seems to be better than ever.

    However, this impressive growth in the development of JavaScript applications has also introduced an undesirable effect that many experienced users can see clearly when surfing the web. More and more web sites are replacing sections of their structural markup and their server-side web applications with JavaScript routines to provide potential users with a richer and more interactive experience.

    So now it's common to visit web sites that implement different kinds of fancy drop-down menus as part of their main navigational bars, or dynamically display their database contents via thorough AJAX-based applications. Indeed, this scenario sounds pretty neat, right? Well, not so fast. While JavaScript can be really handy for empowering the existing functionality of certain web-based applications, it's fair to say here that relying entirely on it to make these applications work correctly is an erroneous approach that should be avoided.

    As you can see, this opinion has much of common sense and little or nothing of proven software design principles. However, let me describe quickly a hypothetical situation to show you the magnitude of the problem: say you're using AJAX on your web site to pull out a product catalog from a database table and show the items to visitors. What happens if a user has disabled JavaScript on his or her browser? Of course, your nice catalog won't be displayed at all, which certainly has the opposite effect of what you were trying to achieve, right?

    This simple example leads me straight to the subject of this series: as you'll probably know, JavaScript should be used to extend the behavior of certain sections of a given web site, but never to display relevant content. Logically, this definition implies that it's possible to include, on a web site, JavaScript applications that eventually may degrade gracefully under specific client-side conditions, without having to sacrifice critical functionality.

    Thus, taking into account this fundamental concept of web development, in this series of articles I'm going to show you some concrete examples where JavaScript can be used to enrich the existing behavior of a particular web site, without breaking the site's functionality if scripting has been disabled by a user. 

    Having introduced you to the subject of this series, let's learn together how to make a specific JavaScript application degrade gracefully. Let's get going!

    More JavaScript Articles
    More By Alejandro Gervasio


       · In this first tutorial of the series, the concept of building JavaSCript code that...
     

    JAVASCRIPT ARTICLES

    - Book Review: Learning the Yahoo! User Interf...
    - Dynamically Generate a Selection List in a R...
    - Intergrate DWR into Your Java Web Application
    - 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...







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