Home arrow JavaScript arrow Making JavaScript Applications Degrade Gracefully
JAVASCRIPT

Making JavaScript Applications Degrade Gracefully


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.

Author Info:
By: Alejandro Gervasio
Rating: 4 stars4 stars4 stars4 stars4 stars / 10
June 20, 2007
TABLE OF CONTENTS:
  1. · Making JavaScript Applications Degrade Gracefully
  2. · Working with combo boxes to extend a site's behavior with JavaScript
  3. · Making JavaScript degrade gracefully
  4. · Assembling all the pieces

print this article
SEARCH DEVARTICLES

Making JavaScript Applications Degrade Gracefully
(Page 1 of 4 )

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!


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- Project Nashorn to Make Java, JavaScript Wor...
- JavaScript Virus Attacks Tumblr Blogs
- Google Releases Stable Dart Version, JavaScr...
- Khan Academy Unveils New JavaScript Learning...
- Accessing Nitro? There`s an App for That
- JQuery 2.0 Leaving Older IE Versions Behind
- Fastest JavaScript Engine Might Surprise You
- Microsoft Adjusting Chakra for IE 10
- Brendan Eich: We Don`t Need Google Native Cl...
- An Overview of JavaScript Statements
- An Overview of JavaScript Operators
- Overview of JavaScript Variables
- More of the Top jQuery Social Plugins
- The Top jQuery Social Plugins
- More of the Top jQuery Slider Plugins

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials