Posted by admin on Dec 9, 2008 in
browsers
It goes hand in hand with unobtrusive javascript, and really is just another name for the same thing. Here are some quotes from some decent articles on the subject:
from Dan’s Web Tips by Daniel Tobias
“Graceful Degradation” is an important principle in Web design. It means that, when you put in features designed to take advantage of the latest and greatest features of newer browsers, you should do it in a way that older browsers, and browsers letting users disable particular features, can “step down” to a method that still allows access to the basic content of the site, though perhaps not as snazzy in appearance.
from Augmentative authoring
- a different look at “graceful degradation” in Web authoring
The phrase “graceful degradation” is often used to describe the idea that a Web page that uses special technologies for presentation enhancements, animation, interactivity, etc., should “degrade” to a simpler, yet fully functional page in circumstancies where the technologies are not applicable. This document takes a somewhat different view: instead of considering how to provide “fallbacks” for various advanced constructs, we consider how to create first a robust document that works always, then augment it by providing optional alternatives to the simple constructs. We’ll discuss the different techniques that are needed for different enhancements.
We currently have a lot of old legacy javascript menus which contain all of the links to the various places on our sites. In our latest efforts, dubbed T2, we have introduced Spry and YUI libraries which use non-obtrusive javascript to manage the menus, sliding panels, collapsible panels and popups. In the article JS Menus – Good or Evil? the author highlights a few good reasons to get rid of those old javascript only menus and replace them with the new-fangled way of doing things in the Web 2.0 world, like Suckerfish. This article was written sometime in 2003, so it is quite old (as is the Suckerfish reference), however you will find after looking at the Suckerfish article that the SpryMenu we are using is actually uses this exact unobtrusive theory.
Tags: accessability, css, graceful degredation, javascript
Posted by admin on Dec 9, 2008 in
browsers
In my google search for why inline javascript is evil, I was able to come across some interesting information that was relevant and some that was not so relevant. The relevant part was this article on Separating Behavior and Structure. The article was written by the author of quirksmode.com, which happens to be a site I often frequent to find out why IE6 is so evil to me. The short answer is usually that there was a bug that I didn’t know about, but the author explains nicely, or has a reference to the explanation and off I go to solve the problem. Definitely a site for the tool box!
The article went into javascript leaking memory at one point, and I had to digress to figure out what that was all about. At work, I use a lot of Spry and YUI, and frankly don’t want to kill people’s browsers because I did something stupid, or didn’t clean up after myself. These two articles go into how DHTML leaks like a seive and how the IE6 bug fix to correct memory leaks was greatly exaggerated. In short, if you tie the DOM to javascript, untie it before you leave. This is something that I am no generally doing today, and must fix in my code, preferably on the library side. I would have thought the libraries would be set up to handle this automatically, but it appears not so much from what I’ve read so far.
The irrelevant information found, while on quirksmode.org, also happens to help me with other subjects that I’ve been reading up on and working with. There was an article showing the new CSS compatibility changes, adding the Google Chrome browser to the mix, as well as an article on iPhone events. The iPhone events article was information I have pretty much figured out by having an iPhone myself, but it is a good read anyway just to solidify my findings, or bring to mind things that I may not have been paying much attention to. Through QA, we have found that the Google Chrome browser acts just like the Safari browser, which we were already watching out for. This is good news to me, one less browser that I really have to *worry* about.
I will continue to link back to articles that solve my probems, or at least give relevant details both for my and your reading and educating pleasure.
Tags: inline, javascript