Is graceful degradation dead?
Join the DZone community and get the full member experience.Join For Free
Plain old HTML documents and web applications, before the advent of Ajax technologies, did not execute logic on the client and keep all the computations on the server. This resulted in a variety of non-ordinary clients, such as screen readers and crawlers, being easy to build and run over web pages; applications, where present at all, were a set of connected web pages and forms, processed by a smart server.
For testing at the acceptance level (the most coarse grained type of testing, where you exercise the app as a real user would in predefined scenarios), you need some kind of client that can programmatically execute your tests. Selenium uses a real web browser, while an application without AJAX calls can usually be tested by faking responses and requests, so that only a basic HTTP client or mock client is needed. In the Java worlds, this can be done by instantiating servlets single-handedly, or by opening a socket. In the PHP world, stub request and response object can be created by the testing framework (Zend_Test).
Note that niceful degradation does not satisfy testing requirements here: even if you test a degraded widget, you're still not testing the main version (non-degraded) that the users will see. This is not the time for plug-in scripts that embellish the user experience like a lightbox or AjaxLink. This is the time for entire desktop applications to be ported in the browser.
How the most popular websites face this
- Facebook does not work for the global timeline or private messages. I can view my own profile, but that's not astounding.
- Gmail solves the problem radically by linking to an alternate HTML version. Not every application can afford an alternate user interface, but maybe it can present a version with simplified controls. The HTML-based Gmail does not have the new Priority Inbox functionality as far as I can tell.
- Twitter works for some functionalities, like viewing replies, but it does not tweet. It is also fairly minimalistic (it consists of 4 or 5 user stories), so it's a pity as accessibility could be implemented right away.
Opinions expressed by DZone contributors are their own.