Validating Web Forms: an Introduction to Progressive Enhancement
In this fifth part of the series, I partially create another situation where Progressive Enhancement can be applied successfully. In this case we'll look at validating data entered into a web form. Due to the focus of this article, the example will not include the PHP file responsible for performing the actual validation process; that file will be covered in the next part.
Validating Web Forms: an Introduction to Progressive Enhancement (Page 1 of 4 )
If the name doesn’t ring a bell for you, let me point you quickly in the right direction: Progressive Enhancement is a clever paradigm that can be used for developing more accessible and usable web pages, where the implementation of one or multiple features is designed to work in client machines with only a basic configuration. Once a client machine meets the minimum configuration requirements, users with more advanced configurations (and this includes both hardware and software elements) will be able to consume an enhanced or “improved” version of the pertinent features, hence the paradigm’s name.
In reality, understanding the theoretical concepts that surround the use of PE is a fairly straightforward process that has to do more with common sense than with an obscure scientific principle. Quite possibly, the most challenging facet of the paradigm is to demonstrate how to put it into practice during the development of certain web applications that are frequently found in the real world.
In an attempt to address this issue and discuss how to use PE from a practical point of view, in the previous part of the series I built some approachable examples that demonstrated how to take advantage of PE when constructing a few basic Ajax-driven programs. These included an image gallery and a file processing script written in PHP. In both cases, the core functionality of those programs remained nearly the same, even if JavaScript was disabled on the browser. This speaks for itself about the benefits offered by PE when used in the appropriate way.
It’s fair to note, however, that it’s feasible to implement PE in many other cases, too. In this fifth part of the series I’m going to illustrate how to use this methodology when validating web forms in the server side. This sample project will make use of jQuery and PHP to do the hard work behind the scenes, but naturally similar results can be obtained with the programming language and the JavaScript library of your choice.
So, does this proposal sound engaging enough for you? Then start reading right now!